Created
March 20, 2015 00:56
-
-
Save saltybeagle/4cb8910d602cc29bc067 to your computer and use it in GitHub Desktop.
FREAK IPs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file containing the nmap report | |
$file = file(__DIR__ . '/freak_443.txt'); | |
$current_ip_number = false; | |
$weak_ips = array(); | |
foreach ($file as $line) { | |
if (preg_match('/Nmap scan report for (.*)/', $line, $matches)) { | |
$current_ip_number = $matches[1]; | |
} | |
if (strpos($line, 'EXPORT') !== false) { | |
$weak_ips[$current_ip_number] = 'weak'; | |
} | |
} | |
foreach ($weak_ips as $weak_ip=>$blah) { | |
echo $weak_ip.PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment