Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


bash_portscan_banners

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
bash_portscan_banners [2017/08/31 06:30] – [Sequential portscan] adminbash_portscan_banners [2017/08/31 06:37] – [Parallel portscan] admin
Line 2: Line 2:
 ~~TOC~~ ~~TOC~~
  
-=====Pure bash portscan====+=====Pure bash TCP portscan====
  
 ====Sequential portscan==== ====Sequential portscan====
Line 19: Line 19:
  
 ====Parallel portscan==== ====Parallel portscan====
 +Test 10 ports in parallel.
 <code> <code>
 #!/bin/bash #!/bin/bash
Line 32: Line 33:
 done done
 ) )
 +</code>
 +
 +====Bannergrab====
 +<code>
 +#!/bin/bash
 +
 +IP=1.2.3.4
 +
 +for i in {1..1000}
 +do
 + echo -n "${IP} port ${i} - "
 + timeout 1s bash -c "head -1 </dev/tcp/${IP}/${i}" 2>/dev/null || echo closed
 +done
 +
 </code> </code>
bash_portscan_banners.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1