Files
Pyro57000 960078d17c Rename parse_portscan to parse_portscan.fish
fixed the name to add the fish extension
2024-05-23 17:38:09 +00:00

41 lines
1.8 KiB
Fish
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function parse_csportscan
     for line in $(cat $argv[1])
         set ip  $(echo $line | cut -d \t -f 1)
         set port $(echo $line | cut -d \t -f 2)
         switch $port
             case 21
                 echo $ip >> ./ftphosts.txt
             case 22
                 echo $ip >> ./sshhosts.txt
             case 23
                 echo $ip >> ./telnethosts.txt
             case 53
                 echo $ip >> ./dnshosts.txt
             case 135
                 echo $ip >> ./windowshosts.txt
             case 3306
                 echo $ip >> ./mysqlhosts.txt
             case 3389
                 echo $ip >> ./rdphosts.txt
             case 5985
                 echo $ip >> ./winrmhosts.txt
             case 1433
                 echo $ip >> ./mssqlhosts.txt
             case 80
                 echo $ip >> ./webhosts.txt
             case 443
                 echo $ip >> ./webhosts.txt
             case 8080
                 echo $ip >> ./webhosts.txt
             case 8181
                 echo $ip >> ./webhosts.txt
             case 8443
                 echo $ip >> ./webhosts.txt
             case 4433
                 echo $ip >> ./webhosts.txt
             case 4443
                 echo $ip >> ./webhosts.txt
         end
     end
 end