Advertisement
loozr

/usb/modules/sslstrip/sslstrip_data.php

Sep 23rd, 2012
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.62 KB | None | 0 0
  1. <?php
  2.  
  3. require("sslstrip_vars.php");
  4.  
  5. if (isset($_GET[history]))
  6. {
  7.     $log_list = array_reverse(glob($module_path."log/*"));
  8.  
  9.     if(count($log_list) == 0)
  10.         echo "<em>No log history...</em>";
  11.    
  12.     for($i=0;$i<count($log_list);$i++)
  13.     {
  14.         if(basename($log_list[$i]) != "tmp")
  15.         {
  16.             $info = explode("_", basename($log_list[$i]));
  17.             echo date('Y-m-d H-i-s', $info[1])." [";
  18.             echo "<a href=\"javascript:load_file('".basename($log_list[$i])."');\">view</a> | ";
  19.             echo "<a href=\"javascript:javascript:location.href='log/".basename($log_list[$i])."'\">download</a> | ";
  20.             echo "<a href=\"javascript:delete_file('log','".basename($log_list[$i])."');\">delete</a>]";
  21.             echo " [";
  22.             echo "<a href=\"javascript:clean('log','".basename($log_list[$i])."');\">Clean</a> - ";
  23.             echo "<a href=\"javascript:javascript:location.href='html/".basename($log_list[$i]).".html'\">View</a>]<br />";
  24.         }
  25.     }
  26. }
  27.  
  28. if (isset($_GET[lastlog]))
  29. {
  30.     if ($is_sslstrip_running)
  31.     {
  32.         $path = $module_path."log";
  33.  
  34.         $latest_ctime = 0;
  35.         $latest_filename = '';    
  36.  
  37.         $d = dir($path);
  38.         while (false !== ($entry = $d->read())) {
  39.           $filepath = "{$path}/{$entry}";
  40.           if (is_file($filepath) && filectime($filepath) > $latest_ctime) {
  41.               $latest_ctime = filectime($filepath);
  42.               $latest_filename = $entry;
  43.             }
  44.         }
  45.  
  46.         if($latest_filename != "")
  47.         {
  48.             $log_date = date ("F d Y H:i:s", filemtime($module_path."log/".$latest_filename));
  49.             echo "sslstrip ".$latest_filename." [".$log_date."]\n";
  50.             echo file_get_contents($module_path."log/".$latest_filename);
  51.         }
  52.     }
  53.     else
  54.     {
  55.         echo "sslstrip is not running...";
  56.     }
  57. }
  58.  
  59. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement