batrick
909b47f492
[NSE] Unprintable characters are now printed as "\xXX" where XX is the hexidecimal
...
representation of the character. (See: http://seclists.org/nmap-dev/2008/q3/0180.html )
2008-07-29 03:48:06 +00:00
batrick
5c79c3585a
Removed heap allocation (malloc) of struct run_record and included it
...
in the thread_record structure.
2008-07-07 17:50:47 +00:00
batrick
13452505a5
Added ScriptResult class change in order to avoid managing string memory
...
created via strdup(). Script output and id (strings) are now C++ std::string.
2008-07-07 17:37:08 +00:00
batrick
f9e6d7d01a
Adapted current nse_main to use the new action closure change discussed here:
...
(http://seclists.org/nmap-dev/2008/q2/0549.html ).
2008-07-07 17:34:37 +00:00
batrick
f424fd21b2
Updated some macros to clean up code. Moved
...
porttests and hosttests to Lua's registry where they belong.
2008-07-07 17:33:36 +00:00
batrick
3ae4bcfa9e
Removed nse_string. Equivalent procedures are placed in
...
nse_main and nse_nsock. nse_main now uses Lua to create printable output
while a cleaner hexify procedure has been placed in nsock.
nse_string is removed as a result.
2008-07-07 17:31:38 +00:00
batrick
fa93527653
Changed waiting2running to push threads to the back of running, it
...
caused some nasty bugs when a thread would yield and pop front (a
thread just added).
2008-06-21 18:52:08 +00:00
batrick
f117619044
Added mutex code.
2008-06-20 07:19:37 +00:00
batrick
0564b25559
Added jah's patch to fix Script Database bug: http://seclists.org/nmap-dev/2008/q2/0623.html
2008-06-09 19:46:54 +00:00
kris
743eb48856
o Fixed some memory leaks in NSE found with Valgrind. [Kris]
2008-06-09 16:54:08 +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
batrick
742ff67100
Removed nse_auxiliar. Updated Script Argument parsing. Fixed typos in
...
documentation. Improved MySQLinfo.nse. Nsock/dnet metatabels are now
protected.
2008-05-31 02:19:24 +00:00
kris
44a4cb90e6
Fixing the assertion failure: "Target.cc:396: void Target::stopTimeOutClock(const timeval*): Assertion 'htn.toclock_running == true' failed." This was caused when a target had scripts in multiple run levels. The problem was the time-out clocks added for --host-timeout support in NSE (r6657--appears to be present since 4.52). Now the time-out clocks are started before each runlevel execution, which (besides not failing assert) makes more sense because the timer would have been counting even when the target had no scripts in the current runlevel.
2008-04-16 17:56:48 +00:00
kris
fa9bd6be6e
Allow unfiltered ports to be selected in NSE
2008-04-09 01:54:14 +00:00
fyodor
d3d97d934b
print host name and IP in a script engine status message, rather than just hostname (which Nmap sometimes does not know). Patch from Jah
2008-04-05 23:52:41 +00:00
majek04
caf8008940
Previously, process_mainloop() assumed that there can occur only one event for l_nsock_loop(). This is obviously wrong. This caused that some lua threads wakeups (when multiple events happend for one nsock_loop) were delayed. They were handled but way after real events happened. This patch changes the handing of events. Now we execute every lua thread which is in running_scripts(). I hope that every thread will be scheduled in nsock and removed from running_scripts and added to waiting_scripts.
2008-02-27 00:56:19 +00:00
doug
da39aace20
NSE run-time interaction support
2007-12-30 03:26:43 +00:00
doug
4a2ca9b350
NSE --host-timeout support
2007-12-30 03:17:57 +00:00
fyodor
09512ff092
o Fix a bunch of warning/error messages which contained an extra
...
newline. Thanks to Brandon Enright for the patch.
2007-12-21 03:38:04 +00:00
kris
6d09f60956
From r6465, pass 0 as the third arg of lua_gc() instead of NULL. gcc gave me a warning because the argument is an int and not a pointer. I grepped in liblua/ and saw usage in there using 0 as well.
2007-12-09 00:50:33 +00:00
stoiko
c30adcd5bf
perform lua-garbage collection everytime a script finishes excecution
...
(should solve the endless loops of NSE)
2007-12-08 17:23:38 +00:00
stoiko
91e7ed8aa6
a quick hack to the scheduling algorithm of scripts, which allows scripts to
...
finish execution earlier (and thus close the sockets earlier)
2007-08-30 18:35:32 +00:00
stoiko
4767dd8c70
script arguments now get checked before nmap starts scanning
2007-08-20 21:56:36 +00:00
fyodor
d7f207450c
merge soc07 r5279 - nse fixes
2007-08-11 06:03:25 +00:00
fyodor
f025e86b0b
merge soc07 r5085:5094 - removed a period which could lead to slightly confusing output such as 'Read data files from: ..' when they are read from the current directory; Always print a message when the script database is updated successfully; Added a whole bunch of entries to the CHANGELOG in preparation for the first soc07 release; latest auto-generated files; add a question mark to a textual question
2007-08-11 05:14:52 +00:00
fyodor
a09a6e2007
merge soc07 r4994:5001 - Adding <portused> element for the open TCP port used when performing OS Detection. Only closed TCP and UDP were being printed; I guess it was just an oversight; Call endTask() in process_mainloop() in nse_main.cc so task ending information (like the <taskend> element) are printed; old_locale is allocated on the STACK not the HEAP; NULL is NOT a valid PCRE pointer.
2007-08-11 04:42:31 +00:00
fyodor
65e680a634
merge soc07 r4939 - fixed a small bug in formatscriptoutput (output.cc) which caused a core dump
2007-08-11 04:25:05 +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
b361685be8
NSE committed
2006-12-11 00:34:26 +00:00