Hi there,
Print IP Address:
grep 'HostID :' 10.244.9.124\ nessus.html | awk -F '<br>' '{print $12}' | tr -s ' ' | awk -F ':' '{print "<tr><td>" $2 "</td><td>"}'
Print Respective Ports:
grep 'classsubsection\|./tcp\|./udp' 10.244.9.124\ nessus.html | grep -v 'h2.classsubsection {\|Port\|0/' | sed 's/<[^>]*>//g'
Print IP Address:
10.244.9.124
Print Respective Ports:
25/tcp 53/tcp 53/udp 88/tcp 123/udp 135/tcp 137/udp 139/tcp 389/tcp 445/tcp 464/tcp 593/tcp 636/tcp 1025/tcp 1027/tcp 1044/tcp 1058/tcp 1063/tcp 1067/tcp 1115/tcp 2301/tcp 2381/tcp 3181/tcp 3268/tcp 3269/tcp 3389/tcp
I would like to print out in this format say if I would have multiple files to get the IP Addresses and its Ports
<table border='1'>
<tr><td>10.244.9.124</td><td>25/tcp</br>53/tcp</br>53/udp</br>88/tcp</td></tr>
<tr><td>10.244.9.125</td><td>53/tcp</br>53/udp</br>88/tcp</td></tr>
.........................................
</table>
Another seperate issue is how to search for ip address in the html file instead of using
grep 'HostID :'