SHARE
TWEET

Untitled

a guest Jul 17th, 2012 47 Never
  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()
RAW Paste Data
Top