batrick
07cfc5aee4
Corrected many #includes for header files (where they are included).
...
Moved the includes for Lua headers to the .cc files so they are
not needlessly, repeatedly included.
Similarly, moved some standard headers to the .cc files and reorganized
includes to be uniform for all nse_* source files.
Fixed whitespace (removed tabs).
2009-03-10 05:56:10 +00:00
batrick
9a81f00641
Removed INITIAL from port version enum (it was accidently left in).
2009-03-09 10:56:45 +00:00
david
a173fe6ce1
Add the stdnse.sleep function.
2009-02-23 23:57:39 +00:00
batrick
1a22089dd0
Changed nil or none to be acceptable for the first value of the try function.
2008-12-30 06:56:44 +00:00
batrick
3016193c11
Improvements to the nmap library. See [1] for discussion and a full listing of
...
the changes.
[1] http://seclists.org/nmap-dev/2008/q4/0663.html
2008-12-29 21:59:08 +00:00
batrick
e6505d9954
Corrected nmap.print_debug_unformatted to print if the verbosity is greater
...
than or _equal_ to the specified verbosity.
See http://nmap.org/nsedoc/modules/stdnse.html#print_debug
2008-12-07 09:22:29 +00:00
batrick
c361d17734
Cleaned up some code for mutexes.
2008-12-07 01:25:14 +00:00
batrick
0f28f2818b
Fixed host.os table to be a 1 based array rather than 0 based.
2008-11-20 20:30:43 +00:00
david
c2deb92228
Remove dead code from nse_nmaplib.cc.
2008-11-20 17:29:36 +00:00
david
20cf487b33
Replace the mix of spaces and tabs in the main NSE files with uniform two-space
...
indents, which seems to be the dominant style.
2008-11-18 21:11:27 +00:00
pgpickering
0e7549c485
added nmap.get_dns_servers() to the NSE
2008-08-21 09:25:28 +00:00
batrick
35553f80bd
[NSE] Added fix for deadlocks on sockets. Now, 10 or max.parallelism threads
...
can have as many sockets open as they need. Previously, only 10 sockets could
be open.
See: http://seclists.org/nmap-dev/2008/q3/0130.html
2008-07-31 07:35:19 +00:00
batrick
49a919f401
Fixed nmap library which was returning it's first argument
...
instead of the library table.
2008-06-22 18:38:53 +00:00
batrick
ac52d97c25
Updated library handling in nse_init, and made
...
nmap library properly return its library table.
2008-06-21 13:28:03 +00:00
batrick
bb07552e94
Changed a bad reference to the table.remove function for the mutex code.
...
The main branch does not yet have the changes to init that includes all
Lua functions being in the Registry with shorthand names.
2008-06-20 07:28:58 +00:00
batrick
f117619044
Added mutex code.
2008-06-20 07:19:37 +00:00
batrick
00c55e7e42
Removed old commented code.
2008-06-20 07:07:13 +00:00
fyodor
92e39aa66f
o Update the HTTP library to use the new timing_level functionality to
...
set connection and response timeouts. An error preventing the new
timing_level feature from working was also fixed. [Jah]
2008-06-18 00:15:27 +00:00
fyodor
ac12ab6b41
o Added a new timing_level() function to NSE which reports the Nmap
...
timing level from 0 to 5, as set by the Nmap -T option. The default
is 3. [Thomas Buchanan]
2008-06-14 00:22:05 +00:00
batrick
d0bc640db8
Large recode of nse_init.cc
...
Now does most of it's work through Lua:
From Nmap-dev: "Many of the changes consist of changing how Nmap interfaces
with Lua that were sometimes awkward or inflexible. Most of the functions
have been made to be callable directly by Lua which offers many technical
advantages: stack management is alleviated, errors are handled cleanly and
are more descriptive, and there is increased reusability."
Additionally:
-- Moved all lua_State * symbols from "l" to "L". This is to maintain
consistency with other Lua libraries (convention) and to make our macros portable.
-- Moved file system manipulation over to nse_fs.cc (from nse_init.cc)
2008-05-31 02:39:27 +00:00
david
c7017806cc
Remove some dead gen-1 OS code.
2008-04-11 03:54:44 +00:00
kris
5f81cca485
When using the NSE nmap.set_port_state(), check if the requested port is already in the requested state. Otherwise, "Duplicate port" messages are printed, and the inaccurate "script-set" state reason is used. This mostly just occurs when -sV is used (I first spotted this when using Brandon's nbstat.nse with -sV, although other scripts do the same thing)
2008-03-27 22:15:50 +00:00
fyodor
61b976a45c
o Nmap now saves the target name (if any) specified on the command
...
line, since this can differ from the reverse DNS results. It can be
particularly important when doing HTTP tests against virtual hosts.
The data can be accessed from target->HostName() from Nmap proper
and host.targetname from NSE scripts. The NSE HTTP library now uses
this for the Host header. Thanks to Sven Klemm for adding this
useful feature.
2008-02-04 22:10:29 +00:00
kris
1dd2fa821d
adding nmap.fetchfile() function so scripts can find the nmap-* data files
2007-12-22 06:56:22 +00:00
diman
6229774103
fixed a problem which caused a segfault when using set_port_version with a version table which does not have all of its values set
2007-12-04 10:30:54 +00:00
david
53752ad8de
Change l_exc_finalize to recognize both nil and false as exception indicators.
...
Previously only nil did this but most of NSE's internal functions return nil. A
value of true means there was no exception and anything else is a fatal error.
2007-11-22 08:31:13 +00:00
david
3782d2c020
Add an nmap.have_ssl NSE function and use it in the script showHTMLTitle.nse to
...
avoid doing an SSL probe if SSL is not available.
2007-11-22 06:38:23 +00:00
kris
7f1654e3ac
Adding a couple free()s when having an early return in l_port_accessor() in nse_nmaplib.cc. Coverity (CID 32) found function_name, I added target_ip.
2007-11-16 02:20:09 +00:00
fyodor
acdaac1464
Update port state reason to script-set when an NSE script changes the --reason of a port state. Also make reason element available in port-table. Patch by Matthew Boyle
2007-11-15 21:03:00 +00:00
kris
c3b2e9af3f
Adding nmap.verbosity() and nmap.debugging() for scripts so they can get the o.verbose and o.debugging values
2007-09-15 01:04:53 +00:00
fyodor
c124e918b7
merge soc07 r5360:5367 - Merge Majek's raw packet NSE patch
2007-08-11 06:13:25 +00:00
fyodor
d7f207450c
merge soc07 r5279 - nse fixes
2007-08-11 06:03:25 +00:00
fyodor
5528726e5b
merge soc07 r5124:5142 - build/install system updates; changelog updates; umit install code; compilation fixes; integrate umit
2007-08-11 05:41:41 +00:00
fyodor
e988f4878d
merge soc07 r4989 - applied mathew boyle's patch for print_debug
2007-08-11 04:39:17 +00:00
fyodor
1e2f0bea4f
merge soc07 r4921:4925 - Fixed a bug in NSE that caused incorrect state summaries (and an assertion failure); added udp iax2 test script
2007-08-11 04:23:17 +00:00
fyodor
cafec3593d
merge soc07 r4891 - nse improvements
2007-08-11 04:12:45 +00:00
fyodor
58522c59f6
merge soc07 r4822 - Reduce the number of build dependencies.
2007-08-11 03:35:46 +00:00
fyodor
cb8101dbcc
merge soc07 r4821 - fix nse build system issues
2007-08-11 03:35:12 +00:00
fyodor
f5e32d305f
merge soc07 r4780 - Moved OSScan warning message (may not be reliable because could not find 1 open and 1 closed port) so it is printed along with the OSScan results instead of above it
2007-08-11 03:24:04 +00:00
fyodor
b361685be8
NSE committed
2006-12-11 00:34:26 +00:00