Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: Fai Mao

Nice👍


39 posted on 01/12/2021 10:17:12 AM PST by TianaHighrider (God bless President Trump. Prayers for PDJT and his loyal supporters.)
[ Post Reply | Private Reply | To 35 | View Replies ]


To: TianaHighrider
For those of you running Linux, or OSX, here's a little script that will allow you to generate pretty decent passwords. One thing that is nice about this kind of thing is that it is a pretty random string, yet if you know how it is generated, you can recreate the password in question from scratch at will, unless you run it without arguments. The output has dashes in it to make it more easily read. You can keep them or toss them when you enter the password itself.

Here's the script itself, which in this example I've named 'poohbear':

$ cat poohbear 
#!/bin/bash
#
# This script will take any string as input. 
# If you include spaces in your string, you must quote the entire string.
# If no string is specified, the current Epoch time to the millisecond is used.

if [ "$1" = "" ]; then
        STRING=`date +%s%N`
    else
        STRING=$1
fi

echo "Starting with: $STRING"
MYSTRING=`echo $STRING | sha256sum`
echo "Now converted to: $MYSTRING"
echo "Parsing it out a bit more..."
echo "Your password string would be:"
echo ${MYSTRING:10:4}-${MYSTRING:14:4}-${MYSTRING:20:4}-${MYSTRING:24:4}-${MYSTRING:30:4}-${MYSTRING:34:4}-${MYSTRING:40:4}-${MYSTRING:44:4}

Here's the script in operation. In this example, I'm feeding it the name of the website as the initial string.

$ ./poohbear www.foobar.com
Starting with: www.foobar.com
Now converted to: 0114330729fa5ab07ba7ff3dab769a5164468c35c83d27095764572e5b237408  -
Parsing it out a bit more...
Your password string would be:
fa5a-b07b-ff3d-ab76-5164-468c-c83d-2709

Here's the same script with no arguments. The initial string is the unix time to the millisecond.

$ ./poohbear 
Starting with: 1610478451303734951
Now converted to: fab09df74c1275b4611cadaddb6a4e4fdb0298fe086c308f162b2ad7a1b84fd4  -
Parsing it out a bit more...
Your password string would be:
1275-b461-adad-db6a-4fdb-0298-086c-308f

One thing that is cool about using a script like this to generate passwords for you, is that once you have the password, if you want you can further obfuscate things by only taking the 2nd, 4th, 6th, and 8th set. You'd still end up with b461db6a0298308f as your password, which is pretty strong, and hard for someone to recreate unless they knew how you produced it.

52 posted on 01/12/2021 11:18:43 AM PST by zeugma (Stop deluding yourself that America is still a free country.)
[ Post Reply | Private Reply | To 39 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson