LAI's user image
User since: Jul 02, 2002 at 16:10 UTC (22 years ago)
Last here: Sep 10, 2012 at 13:55 UTC (12 years ago)
Experience: 1435
Level:Hermit (10)
Writeups: 134
Location:Montreal, People's Free Reformed Socialist Democratic Republic of Québec
Latest nickname:querida ranita
User's localtime: Jul 21, 2024 at 22:07 -04
Scratchpad: View
For this user:Search nodes

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 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...

Version: 0.01
PU >++++BD C++D+S+++$X WP+MO
uS w-$m!
----- (DECODE IT|GET YOUR OWN) -----