[PATCH] mini port scanner for busybox
Tito
farmatito at tiscali.it
Wed Jun 13 21:54:05 UTC 2007
Hi,
this patch adds a very simple port scanner based on connect() to busybox.
I developed it for fun and to improve my skills.
Include it if you like it. Critics, hints and improvements are welcome.
It is turned off by default. Bloat-o-meter says:
scripts/bloat-o-meter busybox_old busybox_unstripped
function old new delta
pscan_main - 472 +472
.rodata 122515 122707 +192
packed_usage 22284 22334 +50
my_gettimeofday - 35 +35
applets 3084 3096 +12
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 761/0) Total: 761 bytes
BTW: the increase in .rodata seems very big (maybe too big) to me, but i'm not a guru in this things....
Output looks like:
root at localhost:~/Desktop/busybox.orig# ./busybox pscan www.busybox.net
Scanning www.busybox.net ports 1 to 1024
Port Proto State Service
22 tcp open ssh
25 tcp open smtp
53 tcp open domain
80 tcp open www
443 tcp open https
873 tcp open rsync
0 stealth, 1018 closed, 6 open ports
Have fun,
Ciao
Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pscan01.patch
Type: text/x-diff
Size: 5296 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070613/fa781ce0/attachment-0002.bin
More information about the busybox
mailing list