mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Make some change to make --without-liblua work again.
This commit is contained in:
@@ -462,9 +462,11 @@ void NmapOps::ValidateOptions() {
|
||||
if(ipoptions && osscan)
|
||||
error("WARNING: Ip options are NOT used while OS scanning!");
|
||||
|
||||
#ifndef NOLUA
|
||||
/* Make sure nmap.registry.args is available (even if it's empty) */
|
||||
if (!scriptargs)
|
||||
scriptargs = strdup("");
|
||||
#endif
|
||||
}
|
||||
|
||||
void NmapOps::setMaxOSTries(int mot) {
|
||||
|
||||
8
nmap.cc
8
nmap.cc
@@ -1631,7 +1631,11 @@ int nmap_main(int argc, char *argv[]) {
|
||||
if (currenths->flags & HOST_UP && !o.listscan)
|
||||
o.numhosts_up++;
|
||||
|
||||
if ((o.pingscan && !o.traceroute && !o.script) || o.listscan) {
|
||||
if ((o.pingscan && !o.traceroute
|
||||
#ifndef NOLUA
|
||||
&& !o.script
|
||||
#endif
|
||||
) || o.listscan) {
|
||||
/* We're done with the hosts */
|
||||
log_write(LOG_XML, "<host>");
|
||||
write_host_status(currenths, o.resolve_all);
|
||||
@@ -1909,7 +1913,9 @@ void nmap_free_mem() {
|
||||
if (o.dns_servers) free(o.dns_servers);
|
||||
if (o.extra_payload) free(o.extra_payload);
|
||||
if (o.ipoptions) free(o.ipoptions);
|
||||
#ifndef NOLUA
|
||||
free(o.scriptargs);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Reads in a (normal or machine format) Nmap log file and gathers enough
|
||||
|
||||
@@ -836,7 +836,7 @@ log_write(LOG_PLAIN, "%d service%s unrecognized despite returning data. If you k
|
||||
}
|
||||
|
||||
#ifndef NOLUA
|
||||
char* formatScriptOutput(ScriptResult sr) {
|
||||
static char* formatScriptOutput(ScriptResult sr) {
|
||||
std::string result = std::string(), output = sr.get_output();
|
||||
string::size_type pos;
|
||||
char *c_result, *c_output = new char[output.length()+1];
|
||||
|
||||
1
output.h
1
output.h
@@ -196,7 +196,6 @@ void printosscanoutput(Target *currenths);
|
||||
void printserviceinfooutput(Target *currenths);
|
||||
|
||||
void printhostscriptresults(Target *currenths);
|
||||
char* formatScriptOutput(ScriptResult sr);
|
||||
|
||||
/* Print a detailed list of Nmap interfaces and routes to
|
||||
normal/skiddy/stdout output */
|
||||
|
||||
Reference in New Issue
Block a user