Advertisement
cdtoad

Quick Extract of IPs & Ports from Hide My Ass

Jan 26th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <pre>
  2.     <FORM ACTION="" method="post">
  3.    
  4.     <textarea NAME="IPS"></textarea>
  5.     <input type="submit" name="ACTION" value="GO">
  6. </form>
  7.     <?php
  8. // PULL IP ADDRESS OUT OF TEXT STRING IMPUTS
  9. // Simply goto www.hidemyass.com copy (ctrl-a) the page you want and paste it in the form box
  10. // OH yeah you need to have this script running somewhere.
  11. //No this won't pull it automatically.  Do some work .
  12.  
  13.  
  14. if(isset($_POST['IPS'])){
  15. $string=$_POST['IPS'];
  16.  
  17. $valid = preg_match_all('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(.*)\d{2,5}/', $string,$matches);
  18.  
  19. print("\n");
  20.  
  21.     foreach($matches[0] as $x){
  22.        
  23.         $part=explode(" ",$x);
  24.        
  25.         print(trim($part[0]).":".trim($part[1])."\n");
  26.        
  27.        
  28.     }
  29.  
  30.  
  31. }
  32.  
  33.  
  34.  
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement