Orgy

Shell Parser

Aug 25th, 2011
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. $shellArr = file("shells.txt");
  4.  
  5. $shellArr = array_unique($shellArr);
  6. $fixedShells = array();
  7. foreach ($shellArr as $shellStr)
  8. {
  9.     $shellStr = str_replace("\r", "", $shellStr);
  10.     $shellStr = str_replace("\n", "", $shellStr);
  11.     if (!is_numeric($shellStr))
  12.     {
  13.         if (!empty($shellStr))
  14.         {
  15.             $fixedShells[] = $shellStr;
  16.         }
  17.     }
  18. }
  19.  
  20. $fh = fopen("fixed.txt", "w");
  21.  
  22. foreach ($fixedShells as $fixedShell)
  23. {
  24.     fwrite($fh, $fixedShell . "\r\n");
  25. }
  26.  
  27. fclose($fh);
  28.  
  29. ?>
Add Comment
Please, Sign In to add comment