From 7d0be9cad2120c998d5e2499e277c50cfdc2e570 Mon Sep 17 00:00:00 2001 From: Pyro57000 <147988717+Pyro57000@users.noreply.github.com> Date: Thu, 23 May 2024 17:37:21 +0000 Subject: [PATCH] Create parse_portscan --- fish_functions/parse_portscan | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 fish_functions/parse_portscan diff --git a/fish_functions/parse_portscan b/fish_functions/parse_portscan new file mode 100644 index 0000000..3100632 --- /dev/null +++ b/fish_functions/parse_portscan @@ -0,0 +1,40 @@ +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