August 9th, 2005, 12:49 PM
port scanner...just curious(i.e. dont kill me)
Just curious. Is it was possible to make a port scanner with shell script??? I mean...of cource not pure shell scriupt but is there a way to do the winsock bit?
August 9th, 2005, 01:33 PM
There is an old cliche that says if there is a will there is a way... And this happens to be true... Do a search on Tedob... He wrote a port scanner for DoS... (You still need mad praise for that Tedob, that thing is farrrr more complicated than my none DoS using ass wants to put effort into to figure out.)
Here I am even nice enough to put some effort in for you..
(Update, I actually just read the code in that, it's not that complicated. But, still rather nice.)
Edit because: Memory Sucks
August 9th, 2005, 06:42 PM
August 10th, 2005, 09:39 AM
Bet you could use a bash script and netcat to do this - im not sure what the returns are when netcat fails but maybe something like this would work (pseudo code by the way - Im not very familiar with shell scripting, tend to be able to achieve everything I need to do with python)
Maybe that will work, maybe it won't the basic idea is there...
toport = 100;
for port in toport; do
if( nc -w 1 $ip $port)
echo"Port $port is open"
August 10th, 2005, 06:33 PM
Doesn't netcat already have that function on *nix systems? It does on the win32 version. I believe that the syntax is nc -z -vv 192.168.10.1 10-20 off the top of my head where 10-20 is the port range and 192.168.10.1 is any ip address you choose to put in here. I think you can use other options to randomise the ports you connect from and such but I think thats the basics.
If everything looks perfect, then there is something you don\'t know
August 10th, 2005, 09:02 PM
Yes exactly, it does, I was going to post that, but theres no harm letting him do some research for himself, besides he wanted to use a shell script!
might as well obfuscate things that little bit further!