Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   перловый брутфорс md5 (https://forum.antichat.xyz/showthread.php?t=11873)

DetMyl 18.12.2005 01:46

Простой брутфорсер на перле для vBulletin
 
Мне сегодня понадобилось разшифровать пару хэшей от vBulletin 3.0.7, полазив по инету я нашел единственно полезную вещь Здесь .
Но так как я предпочитаю перл (и думаю немного побыстрей будет), написал вариант простого брутфорсера для хэшей от vBulletin 3.х. Т.е. расшифровка хэшей созданных по алгоритму md5(md5($pass).$salt)

Если кто-то может улучшить скорость работы скрипта, пишите плс! :rolleyes:
PHP код:

# This is a very simple perl brutforcer for vBulletin 3.x MD5 hashes.
# For usage you need a dictionary file and file with hashes (:-))
# Hashes have to be in this form: "username:hash:salt"
# Good Luck!
#
# (c)DetMyl 17.12.2005, Detmyl@bk.ru

if (@ARGV 2)
 {
 print 
q(
 +++++++++++++++++++++++++++++++++++++++++++++++++++
 
Usageperl vB_hash.pl [dictionary file] [username:hash:salt file]
 
I.e. : perl vB_hash.pl someBigDitionary.dic spizhzhenyeHashy.md5
 
++++++++++++++++++++++++++++++++++++++++++++++++++++
           );
 exit;
 }

 use 
Digest::MD5 'md5_hex';

 
$hashSaltFile $ARGV[1];
 
$dictfile $ARGV[0];
    
  
open (HASHFILE$hashSaltFile) || die "couldn't open the file $hashSaltFile";

   while (
$hashes = <HASHFILE>) {
    
open (DICTFILE$dictfile) || die "couldn't open the file $dictfile";
    (
$user,$hash,$salt) = split(/:/, $hashes);
        
$salt =~ s/\n//;
      
while ($words = <DICTFILE>) {
            
$words =~ s/\n//;
                
if ( $hash eq md5_hex(md5_hex($words).$salt)) { print "FOUND!!! user: ".$user." pass:".$words."\n";}
                            
        }
      
close(DICTFILE);
      }
   
close(HASHFILE); 


vector 24.12.2005 19:30

Спасибо это - полезная вещь!

DetMyl 26.12.2005 15:52

Немного улучшил скрипт: теперь по-умолчению проверяется имя пользователя как пароль, и при нахождении пароля скрипт сразу переходит к следующему хэшу.
PHP код:

# This is a very simple perl brutforcer for vBulletin 3.x MD5 hashes.
# For usage you need a dictionary file and file with hashes (:-))
# Hashes have to be in this form: "username:hash:salt"
# Good Luck!
#
#
# (c)DetMyl 17.12.2005, Detmyl@bk.ru



if (@ARGV 2)
 {
 print 
q(
 +++++++++++++++++++++++++++++++++++++++++++++++++++
 
Usageperl vB_hash.pl [dictionary file] [username:hash:salt file
 
I.e. : perl vB_hash.pl someBigDitionary.dic spizhzhenyeHashy.md5
 
+++++++++++++++++++++++++++++++++++++++++++++++++++
           );
 exit;
 }

 use 
Digest::MD5 'md5_hex';

 
$dictfile $ARGV[0];
 
$hashSaltFile = ($ARGV[1ne '') ? $ARGV[1] : $ARGV[0];
    
  
open (HASHFILE$hashSaltFile) || die "couldn't open the file $hashSaltFile";
   

   while (
$hashes = <HASHFILE>) {
       (
$user,$hash,$salt) = split(/:/, $hashes);
        
$salt =~ s/\n//;
        
if ( $hash eq md5_hex(md5_hex($user).$salt)) { print "FOUND!!! user: ".$user." pass:".$user."\n";next#check with username
        
open (DICTFILE$dictfile) || die "couldn't open the file $dictfile";
       while (
$words = <DICTFILE>) {
            
$words =~ s/\n//;
                
if ( $hash eq md5_hex(md5_hex($words).$salt)) { print "FOUND!!! user: ".$user." pass:".$words."\n"last;}
                            
        }
      
close(DICTFILE);
      
      }
   
close(HASHFILE); 



Время: 20:09