Advertisement
Guest User

Untitled

a guest
Nov 19th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.99 KB | None | 0 0
  1. <link rel="stylesheet" type="text/css" href="master.css">
  2. <?php
  3. if (isset($_POST['site'], $_POST['mastpass']) && $_POST['mastpass']!=NULL && $_POST['length'] > 7 && $_POST['length'] < 20){
  4. $a_ani_1 = array("able","acid","automatic","bright","broken","cheap","chemical","clean","common","complex","conscious","elastic","electric","fat","free","great","happy","hollow","kind","medical","military","new","normal","political","poor","private","probable","quick","quiet","ready","regular","responsible","same","second","serious","sharp","smooth","sticky","strong","sudden","sweet","tired","warm","wise","young");
  5. $a_ani_2 = array("alpaca","bear","bird","camel","cat","cheetah","chicken","chimp","crocodile","deer","dog","dolphin","duck","eagle","elephant","fish","fly","fox","frog","gator","giraffe","goat","goldfish","hamster","horse","kangaroo","kitten","lion","lobster","octopus","owl","panda","pig","rabbit","rat","scorpion","seal","shark","sheep","snake","spider","squirrel","tiger","turtle","zebra");
  6. $a_names_1 = array("ash","brook","corey","dannie","evan","francis","glenn","harper","izzy","jude","kerry","logan","madison","noel","olly","pat","riley","shay","tailor","vic","wesley");
  7. $a_names_2 = array("amney","burke","cull","dodds","ellis","fabian","gledhill","herman","lawson","marsh","nowak","orowski","price","quale","redfern","tuowy","usher","void","whitaker","xano","yates","zayne");
  8.  
  9. $key = crypt($_POST['site'].$_POST['mastpass'],'$2a$16$'.md5($_POST['gen']));
  10. $length = $_POST['length']-1;
  11. $final = preg_replace('/[^[:alnum:]]/','-',substr($key,"-".$length));
  12.  
  13. echo '<body style="font-family: courier;">';
  14. $number = preg_match_all('/[0-9]/',$key,$matches);
  15. $_nice = str_split(preg_replace('/[^0-9]+/', '', hash('sha512',htmlspecialchars($_POST['site']) . $number)));
  16. $_nice_first = $_nice[0].$_nice[1];
  17. $_nice_second = $_nice[2].$_nice[3];
  18. $_nice_third = $_nice[5].$_nice[6].$_nice[7];
  19.  
  20. $_nice_selector = preg_replace('/[^0-9]+/', '', $_POST['dict']);
  21.  
  22. switch($_nice_selector){
  23. case 0: $_words1 = $a_ani_1; $_words2 = $a_ani_2; break;
  24. case 1: $_words1 = $a_names_1; $_words2 = $a_names_2; break;
  25. default: $_words1 = $a_ani_1; $_words2 = $a_ani_2; break;
  26. }
  27.  
  28. // Don't wanna get an empty piece of the username.
  29. if ($_nice_first > count($_words1)) $_nice_first = $_nice[0];
  30. if ($_nice_first-1 < 0) $_nice_first = 1;
  31. if ($_nice_second > count($_words2)) $_nice_second = $_nice[2];
  32. if ($_nice_second-1 < 0) $_nice_second = 1;
  33.  
  34. echo $_POST['gen'],' was used for the generation of ',$_POST['site'],'.';
  35. echo "<br>Username: " . $_words1[$_nice_first-1] . $_words2[$_nice_second-1] . $_nice_third . "<br>Password (" . (strlen($final)+1) . " characters): ";
  36. die("-".$final);}?>
  37.  
  38. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
  39. <select name="dict" class="ui primary button" >
  40. <option value="0">Animals</option>
  41. <option value="1">Names</option>
  42. </select>
  43. Enter site name:
  44. <input type="text" class="ui input" name="site" autofocus/>
  45. Enter mastpass:
  46. <input type="password" class="ui input" name="mastpass" />
  47. Generation:
  48. <select name="gen" class="ui primary button" >
  49. <?php $a_gen=array("Aztec","Alexandria","Rome","Persepolis","Troy","Beroe","Babylon","Carthage","Sukhothai","Norse","Caral","Han","Pompeii","Timgad","Hatra","Hattusa","Memphis","Persia","Teotihuacan","Tikal","Angkor","Thracia","Egypt","Taxila","Mongol","Palmyra","Ctesiphon","Hvalsey","Palenque","Tiwanaku","Andromedae","Aquarii","Aquilae","Arae","Arietis","Aurigae","Austrinus","Brandenburgicum","Cancri","Capricorni","Carinae","Caroli","Cassiopeia","Centauri","Cephei","Ceti","Columbae","Crateris","Crucis","Cygni","Delphini","Draconis","Equulei","Eridani","Geminorum","Gruis","Herculis","Hydrae","Hydri","Leonis","Leporis","Librae","Lyncis","Lyrae","Octantis","Ophiuchi","Orionis","Pavonis","Pegasi","Phoenicis","Piscium","Sagittarii","Scorpii","Secchi","Serpentis","Tauri","Trianguli","Velorum","Virginis","Vulpeculae","Acarnanian","Acastus","Achilles","Admetus","Adonis","Adrastus","Amphilochus","Amphitrite","Anchises","Aphrodite","Apollo","Ares","Argonauts","Artemis","Attica","Carnus","Cepheus","Cerberus","Cinyras","Cresphontes","Cronus","Cyprus","Eetion","Electryon","Ennomus","Erginus","Gaia","Hades","Hephaestus","Hera","Homer","Iolcus","Ixion","Lapiths","Leto","Maia","Messene","Myrmidons","Mysia","Odysseus","Peleus","Periphas","Pherae","Plouton","Rhea","Tegea","Telephus","Tiryns","Aaron","Adam","Alan","Albert","Alice","Allen","Amanda","Amy","Andrea","Andrew","Angela","Ann","Anna","Anne","Annie","Anthony","Antonio","Arthur","Ashley","Barbara","Benjamin","Betty","Beverly","Billy","Bobby","Bonnie","Brandon","Brenda","Brian","Bruce","Bryan","Carl","Carlos","Carmen","Carol","Carolyn","Catherine","Charles","Cheryl","Chris","Christina","Christine","Christopher","Cindy","Clarence","Connie","Craig","Crystal","Curtis","Cynthia","Dale","Daniel","Danny","David","Dawn","Deborah","Debra","Denise","Dennis","Diana","Diane","Donald","Donna","Doris","Dorothy","Douglas","Earl","Edna","Edward","Elizabeth","Emily","Eric","Ernest","Eugene","Evelyn","Florence","Frances","Frank","Fred","Gary","George","Gerald","Gladys","Gloria","Grace","Gregory","Harold","Harry","Heather","Helen","Henry","Howard","Irene","Jack","Jacqueline","James","Jane","Janet","Janice","Jason","Jean","Jeffrey","Jennifer","Jeremy","Jerry","Jesse","Jessica","Jimmy","Joan","Joe","John","Johnny","Jonathan","Jose","Joseph","Joshua","Joyce","Juan","Judith","Judy","Julia","Julie","Justin","Karen","Katherine","Kathleen","Kathryn","Kathy","Keith","Kelly","Kenneth","Kevin","Kimberly","Larry","Laura","Lawrence","Leonard","Lillian","Linda","Lisa","Lois","Lori","Louis","Louise","Luis","Manuel","Margaret","Maria","Marie","Marilyn","Mark","Martha","Martin","Marvin","Mary","Matthew","Melissa","Michael","Michelle","Mike","Mildred","Nancy","Nathan","Nicholas","Nicole","Norma","Norman","Pamela","Patricia","Patrick","Paul","Paula","Peggy","Peter","Philip","Phillip","Phyllis","Rachel","Ralph","Randy","Raymond","Rebecca","Richard","Rita","Robert","Robin","Rodney","Roger","Ronald","Rosa","Rose","Roy","Ruby","Russell","Ruth","Ryan","Samuel","Sandra","Sara","Sarah","Scott","Sean","Sharon","Shawn","Shirley","Stanley","Stephanie","Stephen","Steve","Steven","Susan","Tammy","Teresa","Terry","Theresa","Thomas","Tiffany","Timothy","Tina","Todd","Tony","Tracy","Victor","Victoria","Vincent","Virginia","Walter","Wanda","Wayne","Wendy","William","Willie");
  50. $rand = rand(0,count($a_gen));
  51. echo '<option value="',$a_gen[$rand],'">',$a_gen[$rand],'</option>','<option disabled>---</option>';
  52. foreach($a_gen as $gen) echo '<option value="',$gen,'">',$gen,'</option>'; ?>
  53. </select><br><br>
  54. Random generation string out of <?php echo count($a_gen);?> available. Memorize it if this is your first time using this or select the same string from the dropdown.<br><br>
  55. Enter length:
  56. <select name="length" class="ui primary button">
  57. <option value="8">8</option>
  58. <option value="10">10</option>
  59. <option value="19" selected>19</option>
  60. </select><br><br>
  61. <input type="submit" class="ui primary button" value="Make me some creds!"/><br>
  62. <form><br>
  63. MPW v5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement