|
Nmap Development
mailing list archives
hp laserjet telnet NSE script
From: Aaron Leininger <rilian4 () hotmail com>
Date: Wed, 4 Mar 2009 11:26:32 -0800
This is my first humble attempt at functional NSE. I still really have no firm grasp over the language so please
forgive any mistakes.
The attached NSE script will connect to the telnet port on an HP laserjet and issue the commands /\r\n\r\n\r\n\r\n as a
probe of sorts.
This emulates the "/" command to display the default settings on the printer and the remaining carriage returns will
grab the rest of the output. If you look at the output, you'll see a few places where it says "press return to
continue"..That's what the extra carriage returns were for.
Anyway, it is VERY rough and not nearly ready for any production use. Please modify as you wish. I'd love to see how to
streamline it better. I'm very poor with LUA code. For example, it will run on any port 23 now. It probably should only
run when an open port between 9100-9107(standard for laserJets) is found as well as the open port 23. Also, maybe there
is a way to parse the more useful data out of the current rather large data dump. I just haven't been able to figure
out how exactly to do either of those things, nor am I 100% sure which parts of the data the average nmapper might
consider critical to have. Also attached is a text file containing sample output from the script in its current form.
Personal details of my network have been obscured in the output. I used nmap 4.85beta3 to test this script.
Thanks,
Aaron
_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme Attachment:
hptelnet.nse
Description:
Attachment:
sampleoutput.txt
Description:
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
By Date
By Thread
Current thread:
- hp laserjet telnet NSE script Aaron Leininger (Mar 04)
|