This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: Perl  |  size: 0.49 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!perl
  2.  
  3. $LOGFILE="debug-20120718-0021.log";  #put log name here
  4. $SKYPENAME="-askypename-";                      #put Skype name here
  5.  
  6. open(RD,$LOGFILE);
  7. open(WR,">_ip_logger.txt");
  8. while(<RD>){ chomp;
  9.  $line=$_;
  10.  
  11.  if( ($line=~ /PresenceManager:/) and ($line=~ /noticing/) ){
  12.   $line=~ /-r(\d+.\d+.\d+.\d+)/;
  13.   $ip=$1;
  14.  
  15.   print WR $line."\n";
  16.   print WR "IP: $ip\n";
  17.  
  18.   if ($line=~ /$SKYPENAME/){
  19.    print $line."\n";
  20.    print "${SKYPENAME} IP: $ip\n";
  21.   };
  22.  };
  23.  
  24. };
  25. close(RD);
  26. close(WR);
  27. sleep()
clone this paste RAW Paste Data