EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff

Training Missions

Read Me First
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Captcha Cracking
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom
/dev/extra

Knowledge Bank

Discussion Forums
Exploit Database New
PasteBin New
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Downloads
Tools

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Pimp Us Out!

Review enigmagroup.org on alexa.com

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.

Enigma Group

Enigma Group

Enigma Group

Enigma Group

 

Affiliates



The Urinal

hackhound.org

suck-o.com

hack.org.za

flyninja.net

 

Enigma Group's Code Bank


passwd.pl

By: toast  -  Date Submitted: 2009-05-17 04:49:09

  1. #=======================================================================================#
  2. # Written by: Toast #
  3. # #
  4. # Name : passwdgen.pl #
  5. # #
  6. # Random password generator will let the user choose how long the passwd will be if not #
  7. # specified it will default to 10 characters #
  8. # #
  9. # It will also print the MD5 Hash and SHA1 Hash of the password #
  10. # #
  11. # Written under Slackware 12.2 tested and working #
  12. #=======================================================================================#
  13.  
  14. use strict;
  15. use warnings;
  16.  
  17. use Digest::MD5 qw(md5_hex);
  18. use Digest::SHA1 qw(sha1_hex);
  19.  
  20. my $passwd;
  21. my $rand;
  22.  
  23. # Password Length
  24. my $passwd_length = $ARGV[0] ;
  25. if (!$passwd_length ) {
  26. $passwd_length = 10;
  27. }
  28.  
  29. # Characters that will be used to generate the random password
  30. my @chars = split ( " ", "q w e r t y u i o p a s d f g h j k l z x c v b n m Q W E R T Y U I O P A S D F G H J K L Z X C V B N M 1 2 3 4 5 6 7 8 9 0 ! @ $ % ^ & # * ( ) + - = | / < > ~ ` : ; [ ] { } | , . ? _") ;
  31.  
  32. for (my $i=0; $i<$passwd_length ;$i++) {
  33. $rand = int(rand 91);
  34. $passwd .= $chars[$rand];
  35. }
  36. # Prints the generated password to the screen
  37. print "Your new password is: $passwd\n";
  38.  
  39. # Hashes the password to MD5 and print to screen.
  40. my $md5_hash = md5_hex($passwd);
  41. print "The MD5 Hash is: $md5_hash\n";
  42.  
  43. # Hashes the password to SHA1 and prints to the screen.
  44. my $sha1_hash = sha1_hex($passwd);
  45. print "The SHA1 Hash is: $sha1_hash\n";
Return to perl category list

Who Visited EnigmaGroup Today?

1563 Guests, 265 Users (178 Spiders)
TheHarrisonW, lonely.connection, IvanDimitriev, 2142, CloverCipher, 2345, Hessesian, vnd, suetekh, Distorted, aurena, Rex_Mundi, m0rt, 3ntr0py, rospark, valy1177, whisperer, Blavatsky, lotato, nmobin27, learning, st3alth, Partisan, hackaday, K0gller, fitz, DrOptix, Jayjay, JohnMalkovitzch, psychomarine, whoami, Vspectrum, San Marino, TinCardinal, brunoriversyhn, code-g, yshiau, BillTuer, Psiber_Syn, Klosse, Seasharp, obencefoozy, SlayingDragons, Link-, tinuigimeni, jasonbourne, Fred, GothicLogic, strudels, somebody777, Meonkzt, CJ_Omaha, jearrorne, cls777, unsugsNashy, Balksnuntails, trueorfalse, Sir D. Naut, zach, batsbargy, Rik, Macabre, ellisp, Nightraven, Iccyx, Repuhlsive, vipervince2002, Janomatrix, lol, veceattainc, techno, Exclaw, limited, Nikhil, evjfvir967nj, blackknight911, Mod777, dark_void, nermtode, Tjm, bjy1997, hecky, saraf, elprof, damoniceht, trik, jordan86, SnoopSky, dan_movie, OnetInsolefon, darkfire1515, seojlhmyrhwh, Thoplehap, MaxMeier, 1028rajeev, Abhinav2107, autotuneuser, riesenjoe, alexelixir, Tauya, Jozinbrejl, kernel_mod, quolc, anandoump, vladavlada, Taicadine, AnnaNoult, GreenTiger, baripadatimes, Ewing, Blackbeard, thepuppeteer, BON-SELE, hak4r, Unotohumsmush, NIGHTWOLF, m4f10, Vengeance987, avacraft, Bumpadjuppy, becool, thecoder, ddxc, n01se, alpha1, saki, ObesseJew, ActictGlync, sajan, unicornrainbow, Domihoolbob, matt.14, max66, SnowFury, Spud101, myfabregas, Ausome1, kajman121, Frudopvia, ideveloper6, OLOLO, Bugshuppy, lamb, VagWirura, LialiTiTviors, Ordeptpen, scifics, Pozycj-Z21, RomeoG, Gkjt, interPuscruse, aaftab, TheCheeseDemon, blackcyxx21, jollyjimbo, N4g4c3N, rineDriekly, Rap70r, Xargos, flarornEral, ovetz13, sonu sahu, Breezy, emitleBen, Hackpad, JWTSR, nicyun, kaizo, itevainee, advilapyday, luke460, AverageJoe, zeratu92, litbk, Mr.Pickle, mannavard1611, LoopyLion, NexusVos, mtroscheck, burberrybagsjr, nikedunksxm, xordux, jeho, Lonewolf034, Dragonite, nhorton, Reloaded, Odile, Kaptain_k1rk, Teefelltugh, grizzly, posthuman01, jakesboy2, pwnpwnlolz, Sabo, Lakhoamnmek, Røgue, dot_Cipher, mori, snickerless1, cart1m, Xendz, KELATALFTUS, hubris, Afrika, welepocourl, carpinteyrofbt, ReottphoffBom, Reahastegah, pumashoesld, pdanielt, dmac006, DnA-Ender, Red Fox, couptupleakb, ryanjcrook, iMaxx, sh3llcod3, TimHortons, EmilaHapsaums, Feld Grau, burgeoningneophyte, Maroonhat, CookieAu, tinkansinar, Mitodina, timberlandoutletlufc, zsefvy, guccioutletox, AlexDiru, AbercrombieFitchhl, Ryuske, r0z4, slchill, kalak55, Ph4Kt480ii, beefarn, Jigoku, WrossyJes, pollolololo, ZepSung, Fragility, jell0, C9019, Othrguy, Noticon, KIKNWING, llasarus, mdubz, leah027, iellswo, MAZI_, Estilaamoli, subtentar, Trollorful, no, nas0151, Traybo, howisthechicken, thethird3y3, Somethingclever, marplusz, MSI52, twink gay cam dUi8D, temoJessy
 
Enigma Group