Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

LAI

by LAI (Hermit)
on Jul 02, 2002 at 16:10 UTC ( [id://178898]=user: print w/replies, xml ) Need Help??

Random password generator

Yeah, it's a shell s‎crip‎t right now, but that's because I wrote it as a one-liner. I'll probably golf it. Yeah, I'm gonna golf it. Cool. I'll make it all perl first, though. Anyway, here's the code (also on LAI's scratchpad):

head -c 200 /dev/urandom | perl -e '$i=0;foreach (split //, <>) {s/[\s +\W]//g;print}#$i++,$_,$/}' | head -c 8; echo

Ooh! Oh, it's so annoying. Grrrrr....

As anyone who's spoken to me much on the CB can guess, I'm talking about the friggin' VB crap I have to do for work. You know what I wound up doing at one point? Writing a sprintf, and m() and s() functions. How useless is VB, if it has no built-in capacity to perform these simple tasks? Argh! I did have the code here at one point, but realized that this was akin to walking into a monastery covered head to toe in blood and carrying the severed heads of a family of innocents in order to demonstrate the wrongness of murder.


Here's a recent monk: Ella ... and I'm still waiting for Andy...


Keep your eye on this ball.

Okay, so that's not really moving along. It was supposed to; I had written a patch for it and everything! But seems like the author has a lot more on his plate, and the admins of CPAN want him to change his namespace, and stuff. Oh, well.

I've been having fun with a little app on fsckme.com: my Command Prompt. The idea is to simulate a command prompt, with certain commands allowed and properly filtered arguments. So far I've enabled the following commands:

/^ls[ a-zA-Z\d\/\.~\-_\*\?]*$/ /^du[ a-zA-Z\d\/\.~\-_\*\?]*$/ /^df$/ /^uptime$/
I figure this much is relatively safe. What with the inclusive filtering instead of exclusive. Like starting your access rules with deny to all. Especially since while testing I left it completely unfiltered... and on that box apache ran as the same user who owned all the files!

Anyway, the original idea of this was to have some sort of shell access on my host's box. I had downgraded my plan with them and had lost the right to SSH in... so my hacker instinct took over and decided to find a way to circumvent that limitation. (I've since changed hosts and now have full access to my box, but it's still a neat project.) It's still far from complete, as I have yet to implement proper login authentication (if you like, you can login as user:pass or uname:passwd; it doesn't really do anything yet). But it would be nice to eventually enable some user accounts with that.

Maybe I'll eventually post it as a CUfP...

-----BEGIN PERL GEEK CODE BLOCK-----
Version: 0.01
P++>++++$c--P6-R++M+>++O++MA+++>++++E
PU >++++BD C++D+S+++$X WP+MO
PP!n-CO--PO
o+G+A->+++OL!OLJ--Ee---Ev+Eon!uL+++uB
uS w-$m!
------END PERL GEEK CODE BLOCK------
----- (DECODE IT|GET YOUR OWN) -----

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-28 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found