|
|
| |
# They don't want lua | # They don't want lua |
if test "$no_lua" = "yes"; then | if test "$no_lua" = "yes"; then |
CXXFLAGS="-DNOLUA $CXXFLAGS" |
CPPFLAGS="-DNOLUA $CPPFLAGS" |
LIBLUA_LIBS="" | LIBLUA_LIBS="" |
LUA_DEPENDS="" | LUA_DEPENDS="" |
LUA_BUILD="" | LUA_BUILD="" |
|
|
| |
# They don't want lua | # They don't want lua |
if test "$no_lua" = "yes"; then | if test "$no_lua" = "yes"; then |
CXXFLAGS="-DNOLUA $CXXFLAGS" |
CPPFLAGS="-DNOLUA $CPPFLAGS" |
LIBLUA_LIBS="" | LIBLUA_LIBS="" |
LUA_DEPENDS="" | LUA_DEPENDS="" |
LUA_BUILD="" | LUA_BUILD="" |
|
|
if(ipoptions && osscan) | if(ipoptions && osscan) |
error("WARNING: Ip options are NOT used while OS scanning!"); | error("WARNING: Ip options are NOT used while OS scanning!"); |
| |
|
#ifndef NOLUA |
/* Make sure nmap.registry.args is available (even if it's empty) */ | /* Make sure nmap.registry.args is available (even if it's empty) */ |
if (!scriptargs) | if (!scriptargs) |
scriptargs = strdup(""); | scriptargs = strdup(""); |
|
#endif |
} | } |
| |
void NmapOps::setMaxOSTries(int mot) { | void NmapOps::setMaxOSTries(int mot) { |
|
|
| |
if (FPR) delete FPR; | if (FPR) delete FPR; |
| |
|
#ifndef NOLUA |
if (o.script) { | if (o.script) { |
ScriptResults::iterator sriter; | ScriptResults::iterator sriter; |
for (sriter = scriptResults.begin(); sriter != scriptResults.end(); sriter++) | for (sriter = scriptResults.begin(); sriter != scriptResults.end(); sriter++) |
free((*sriter).id); | free((*sriter).id); |
} | } |
|
#endif |
} | } |
| |
/* Creates a "presentation" formatted string out of the IPv4/IPv6 address. | /* Creates a "presentation" formatted string out of the IPv4/IPv6 address. |
|
|
if (o.dns_servers) free(o.dns_servers); | if (o.dns_servers) free(o.dns_servers); |
if (o.extra_payload) free(o.extra_payload); | if (o.extra_payload) free(o.extra_payload); |
if (o.ipoptions) free(o.ipoptions); | if (o.ipoptions) free(o.ipoptions); |
|
#ifndef NOLUA |
free(o.scriptargs); | free(o.scriptargs); |
|
#endif |
} | } |
| |
/* Reads in a (normal or machine format) Nmap log file and gathers enough | /* Reads in a (normal or machine format) Nmap log file and gathers enough |
|
|
#ifndef NMAP_LUA_H | #ifndef NMAP_LUA_H |
#define NMAP_LUA_H | #define NMAP_LUA_H |
| |
|
#ifndef NOLUA |
extern "C" { | extern "C" { |
#include "lua.h" | #include "lua.h" |
#include "lualib.h" | #include "lualib.h" |
#include "lauxlib.h" | #include "lauxlib.h" |
} | } |
|
#endif |
| |
#include <vector> | #include <vector> |
#include <list> | #include <list> |
|
|
free(serviceprobe_service); | free(serviceprobe_service); |
if (serviceprobe_fp) | if (serviceprobe_fp) |
free(serviceprobe_fp); | free(serviceprobe_fp); |
|
#ifndef NOLUA |
if (o.script) { | if (o.script) { |
ScriptResults::iterator sriter; | ScriptResults::iterator sriter; |
for (sriter = scriptResults.begin(); sriter != scriptResults.end(); sriter++) | for (sriter = scriptResults.begin(); sriter != scriptResults.end(); sriter++) |
free((*sriter).id); | free((*sriter).id); |
} | } |
|
#endif |
} | } |
| |
// Uses the sd->{product,version,extrainfo} if available to fill | // Uses the sd->{product,version,extrainfo} if available to fill |