Fortress updated.

Tuesday, 18 October 2005

Scanner

Fortress the simple scanner, or scriptable network system is coming along nicely.

For example the script test-port-identification.lua

--
--  Detect the ports open a host, and attempt to identify their services.
--

--
-- Create a helper function.
--
function identify_ports( host )

  print( 'Scanning: ' .. host );

  open = portscan( host );

  for i=0,table.getn(open) do
     service = detect_service( host, open[i] );
     print( ' Open port ' .. open[i] .. ' identified as ' .. service );
  end

  print( table.getn(open) .. ' ports open on ' .. host );
  print();
end

--
-- Now do some scans.
--
identify_ports( 'localhost' );
identify_ports( 'itchy' );
identify_ports( 'scratchy' );

This produces:

skx@lappy:~/cvs/fortress$ ./fortress tests/test-port-identification.lua
Scanning: localhost
 Open port 22 identified as ssh
 Open port 25 identified as smtp
 Open port 80 identified as www
3 ports open on localhost

...
...

I’ve also added primitives for working with SHA1 and MD5 hashes (both strings and file contents). Once I can get a few more primitives added I’ll make a 0.3 release and see if people care.


In other news, nothing much is happening. I’m waiting to hear about the results from my sleep study. I’ve had verbal results, but they don’t count for much and miss important details – hopefully not too much longer as I’m due back at work fairly soon ..

| No comments

 

 

Recent Posts

Recent Tags