Nmap Development mailing list archives
RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions
From: Aaron Leininger <rilian4 () hotmail com>
Date: Mon, 13 Jul 2009 08:18:20 -0700
The name "msg" is too general for the script arg name. Maybe it can be pjl.ready-message or pjl-ready-message.message. Those are a bit long, but it should be something that identifies it as belonging to this script.
In trying to incorporate a variable name like yours I am getting a very weird result and I am hoping someone can shed some light on this for me. I noticed that any attempt at using a hyphen in a variable name results in the script doing nothing, whether or not I provide an argument to the script.... ex from my script: if not nmap.registry.args.pjl-msg then If I use pjl-msg as the variable instead of msg like I had before(no other changes to the script), I get the following output (w/ --script-trace on) ========= $nmap -p9100 --script-trace --script=./hprdymsg.nse printerip Starting Nmap 4.85BETA10 ( http://nmap.org ) at 2009-07-13 08:08 PDT Warning: File ./nselib/ exists, but Nmap is using /usr/local/share/nmap/nselib/ for security and consistency reasons. set NMAPDIR=. to give priority to files in your local directory (may affect the other data files too). NSOCK (0.2090s) nsock_loop() started (timeout=50ms). 0 events pending Interesting ports on printername (printerip): PORT STATE SERVICE 9100/tcp open jetdirect Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds ========= Notice the distinct lack of any output from the script... If I change the variable reference to pjl_msg or back to msg, I get the following from the exact same command (as expected): ========= $nmap -p9100 --script-trace --script=./hprdymsg.nse printerip Starting Nmap 4.85BETA10 ( http://nmap.org ) at 2009-07-13 08:08 PDT Warning: File ./nselib/ exists, but Nmap is using /usr/local/share/nmap/nselib/ for security and consistency reasons. set NMAPDIR=. to give priority to files in your local directory (may affect the other data files too). NSOCK (0.2070s) nsock_loop() started (timeout=50ms). 0 events pending NSOCK (0.2080s) TCP connection requested to printerip:9100 (IOD #1) EID 8 NSOCK (0.2080s) nsock_loop() started (timeout=50ms). 1 events pending NSOCK (0.2540s) Callback: CONNECT SUCCESS for EID 8 [10.4.10.77:9100] NSE: TCP hostip:33167 > printerip:9100 | CONNECT NSOCK (0.2550s) nsock_loop() started (timeout=50ms). 0 events pending NSE: TCP hostip:33167 > printerip:9100 | 00000000: 40 50 4a 4c 20 52 44 59 4d 53 47 20 44 49 53 50 @PJL RDYMSG DISP 00000010: 4c 41 59 20 3d 20 22 52 45 41 44 59 22 0d 0a LAY = "READY" NSOCK (0.2550s) Write request for 31 bytes to IOD #1 EID 19 [10.4.10.77:9100]: @PJL RDYMSG DISPLAY = "READY".. NSOCK (0.2560s) nsock_loop() started (timeout=50ms). 1 events pending NSOCK (0.2560s) Callback: WRITE SUCCESS for EID 19 [10.4.10.77:9100] NSOCK (0.2560s) nsock_loop() started (timeout=50ms). 0 events pending NSE: TCP hostip:33167 > printerip:9100 | CLOSE Interesting ports on printername (printerip): PORT STATE SERVICE 9100/tcp open jetdirect |_ hprdymsg: "READY" was set as the display for printer at printerip Nmap done: 1 IP address (1 host up) scanned in 0.26 seconds ========= Why is it that I can't use variables with hyphens (-) in them? I suppose I could use underscores instead if needed. Thanks, Aaron _________________________________________________________________ Windows Live™ SkyDrive™: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions, (continued)
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions Aaron Leininger (Jul 12)
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions Aaron Leininger (Jul 13)
- Re: [PATCH] nmap-service-probes: Misc database corrections, printer additions David Fifield (Jul 13)
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions Aaron Leininger (Jul 14)
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions Aaron Leininger (Jul 15)
- Re: [PATCH] nmap-service-probes: Misc database corrections, printer additions Fyodor (Jul 15)
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions Aaron Leininger (Jul 16)
- Re: [PATCH] nmap-service-probes: Misc database corrections, printer additions Brandon Enright (Jul 16)
- Re: [PATCH] nmap-service-probes: Misc database corrections, printer additions David Fifield (Jul 16)
- RE: [PATCH] nmap-service-probes: Misc database corrections, printer additions Aaron Leininger (Jul 13)
- Re: [PATCH] nmap-service-probes: Misc database corrections, printer additions David Fifield (Jul 13)