Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!perl
- $LOGFILE="asd.log";
- $SKYPENAME="id";
- open(RD,$LOGFILE);
- open(WR,">_ip_logger.txt");
- while(<RD>){ chomp;
- $line=$_;
- if( ($line=~ /PresenceManager:/) and ($line=~ /noticing/) ){
- $line=~ /-r(\d+.\d+.\d+.\d+)/;
- $ip=$1;
- print WR $line."\n";
- print WR "IP: $ip\n";
- if ($line=~ /$SKYPENAME/){
- print $line."\n";
- print "${SKYPENAME} IP: $ip\n";
- };
- };
- };
- close(RD);
- close(WR);
- ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement