RE: PHP MD5-SHA1 Cracker 04-05-2013, 03:26 PM
#21
(04-05-2013, 01:30 PM)1llusion Wrote: Added:Great to see members here helping each other that much. I like your approach, however I would do it a bit different:
- Array of pre-defined wordlists named $files (add wordlist locations there)
- SELECT tag where user chooses the wordlist (This tag is automatically generated from the $files array).
- Secured passing of values. Now only integer values can be submitted as wordlist
Unfortunately, it looks like I broke the design a bit. I'm sorry for that!
The script right now is not vulnerable to XSS nor file location brute-force
- get the files from a folder eg /wordlists
PHP Code:
<?php
function GetFilesByDirectory($sDir){
if(!$rHandle = @opendir($sDir)){
return(false);
}
$aFileBuffer = array();
while(false!==($sFile = @readdir($rHandle))){
// buffer all files
if($sFile!="." && $sFile!=".."){
if(!is_dir($sDir."/".$sFile)){
$aFileBuffer[] .= $sFile;
}
}
}
@closedir($rHandle);
return $aFileBuffer;
}
?>
- you don't have to use regular expressions to filter for integers
PHP Code:
<?php
$iVal = "11";
if(@is_int(intval($iVal))){
echo"casted to int";
}
else{
echo"not an int value";
}
?>
BTW I just noticed the thread's title is md5/sha1 cracker. I assume you know that md5 is different from sha1?
(This post was last modified: 04-05-2013, 03:49 PM by xAttack.)