[Chugalug] silly perl one liner to randomize passwords

Alex Smith (K4RNT) shadowhunter at gmail.com
Wed Mar 5 22:15:27 UTC 2014


Agreed. I'm in the process of learning Python and Ruby. I also need to
build my shell scripting up a little more. That and awk. awk saved me in
the data center, especially when parsing 12+ hard disks SMART data on a
single host to identify failed disks.

" ' 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:47 PM, AverageSecurityGuy <
stephen at averagesecurityguy.info> wrote:

> For the sake of your sanity DO NOT LEARN Perl. Learn Bash for simple stuff
> an Python for complex stuff. Let Perl DIAF.
>
> --
> Stephen Haywood
> Owner, ASG Consulting
> CISSP, OSCP
> 423.305.3700
> asgconsulting.co
>
>
>
> On Mar 5, 2014, at 4:20 PM, Alex Smith (K4RNT) <shadowhunter at gmail.com>
> wrote:
>
> > 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
> >
> > _______________________________________________
> > Chugalug mailing list
> > Chugalug at chugalug.org
> > http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
>
>
> _______________________________________________
> 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/5853d9e5/attachment.html>


More information about the Chugalug mailing list