Graham Chiu wrote:

> On Sat, 05 Oct 2002 05:44:26 +0200
>  Petr Krenzelok <[EMAIL PROTECTED]> wrote:
>
>>
>> I have written very primitive script which scans given IP range and 
>> asks DNS for machine-name. BugBear opens certain listen port, so it 
>> is rather easy to find such machines :-) That kind of stuff can make 
>> rebol more popular among our company admins :-)
>>
>
> Do share :)

REBOL []

ip-sub: ask "Enter ip (e.g. 172.25.7): "

for i 1 255 1 [
   ip: join ip-sub ["." i]  
   print ["Checking IP: " ip]
   if not error? try [
       port: open join tcp:// [ip ":36794"]
   ][
       user?: read join dns:// ip
       write/append %infected.txt join "" [ip "  " user? newline]
       print ["IP " ip " infected" user?]
       close port
   ]
]

That is the general one. I have also slightly modified one, which takes 
list of IPs from user config objects we store for each user, so it 
checks certain IPs, not ranges.

It is pity we don't have async networking read yet, so we can't 
influence connection time ... so - it may appear slow at some 
situations, but will do the job.

-pekr-

>
> --
> Graham Chiu




-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to