[Chugalug] silly perl one liner to randomize passwords

Alex Smith (K4RNT) shadowhunter at gmail.com
Wed Mar 5 21:20:30 UTC 2014

Oh god, is that really a Perl script?

...I don't think I want to learn it anymore. :P

" ' With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.' Those words were uttered by Judge Aaron Satie as wisdom and
warning... The first time any man's freedom is trodden on we’re all
damaged." - Jean-Luc Picard, quoting Judge Aaron Satie, Star Trek: TNG
episode "The Drumhead"
- Alex Smith
- Dulles Technology Corridor (Chantilly/Ashburn/Dulles), Virginia USA

On Wed, Mar 5, 2014 at 4:09 PM, <flushy at flushy.net> wrote:

> I was bored yesterday and a FB status spawned this:
> sudo cat /etc/shadow | perl -pe 'sub r{$l=shift;open(R,"base64
> /dev/urandom|")||die$!;sysread(R,$R,$l*4);close(R);$
> R=~s/[^\w]//g;substr($R,0,$l)}@P=split/:/;if($P[1]=~/\$6/){$
> s=&r(8);$p=&r(16);$P[1]=crypt($p,"\$6\$$s");$_=join(":", at P);}'
> It will ready in the shadow file, and output stdout with new shadow file
> data with any defined passwords randomized.
> --b
> _______________________________________________
> Chugalug mailing list
> Chugalug at chugalug.org
> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://chugalug.org/pipermail/chugalug/attachments/20140305/30e12e38/attachment.html>

More information about the Chugalug mailing list