mirror of
https://github.com/nmap/nmap.git
synced 2026-02-14 09:26:35 +00:00
Fix spelling in some identifiers. wierd_responses -> weird_responses,
printStatsIfNeccessary -> printStatsIfNecessary.
This commit is contained in:
@@ -124,7 +124,7 @@ void Target::Initialize() {
|
||||
distance = -1;
|
||||
FPR = NULL;
|
||||
osscan_flag = OS_NOTPERF;
|
||||
wierd_responses = flags = 0;
|
||||
weird_responses = flags = 0;
|
||||
memset(&to, 0, sizeof(to));
|
||||
memset(&targetsock, 0, sizeof(targetsock));
|
||||
memset(&sourcesock, 0, sizeof(sourcesock));
|
||||
|
||||
4
Target.h
4
Target.h
@@ -256,8 +256,8 @@ class Target {
|
||||
|
||||
// unsigned int up;
|
||||
// unsigned int down;
|
||||
int wierd_responses; /* echo responses from other addresses, Ie a network broadcast address */
|
||||
unsigned int flags; /* HOST_UP, HOST_DOWN, HOST_FIREWALLED, HOST_BROADCAST (instead of HOST_BROADCAST use wierd_responses */
|
||||
int weird_responses; /* echo responses from other addresses, Ie a network broadcast address */
|
||||
unsigned int flags; /* HOST_UP, HOST_DOWN, HOST_FIREWALLED, HOST_BROADCAST (instead of HOST_BROADCAST use weird_responses */
|
||||
struct timeout_info to;
|
||||
char *hostname; // Null if unable to resolve or unset
|
||||
char * targetname; // The name of the target host given on the commmand line if it is a named host
|
||||
|
||||
2
nmap.cc
2
nmap.cc
@@ -1646,7 +1646,7 @@ int nmap_main(int argc, char *argv[]) {
|
||||
currenths->setSourceSockAddr(&ss, sslen);
|
||||
}
|
||||
|
||||
/* I used to check that !currenths->wierd_responses, but in some
|
||||
/* I used to check that !currenths->weird_responses, but in some
|
||||
rare cases, such IPs CAN be port successfully scanned and even connected to */
|
||||
if (!(currenths->flags & HOST_UP)) {
|
||||
delete currenths;
|
||||
|
||||
2
nmap.h
2
nmap.h
@@ -333,7 +333,7 @@ void *realloc();
|
||||
#define HOST_UP 1
|
||||
#define HOST_DOWN 2
|
||||
#define HOST_FIREWALLED 4
|
||||
#define HOST_BROADCAST 8 /* use the wierd_responses member of hoststruct instead */
|
||||
#define HOST_BROADCAST 8 /* use the weird_responses member of hoststruct instead */
|
||||
|
||||
#define PINGTYPE_UNKNOWN 0
|
||||
#define PINGTYPE_NONE 1
|
||||
|
||||
@@ -418,7 +418,7 @@ int process_mainloop(lua_State *L) {
|
||||
if(o.verbose > 1 || o.debugging)
|
||||
progress.printStats(done, NULL);
|
||||
else
|
||||
progress.printStatsIfNeccessary(done, NULL);
|
||||
progress.printStatsIfNecessary(done, NULL);
|
||||
})
|
||||
|
||||
gettimeofday(&now, NULL);
|
||||
|
||||
10
output.cc
10
output.cc
@@ -1358,21 +1358,21 @@ void write_host_status(Target *currenths, int resolve_all) {
|
||||
write_xml_initial_hostinfo(currenths, "unknown");
|
||||
}
|
||||
|
||||
else if (currenths->wierd_responses) { /* SMURF ADDRESS */
|
||||
else if (currenths->weird_responses) { /* SMURF ADDRESS */
|
||||
/* Write xml "down" or "up" based on flags and the smurf info */
|
||||
write_xml_initial_hostinfo(currenths,
|
||||
(currenths->flags & HOST_UP)? "up" : "down");
|
||||
log_write(LOG_XML, "<smurf responses=\"%d\" />\n",
|
||||
currenths->wierd_responses);
|
||||
log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Smurf (%d responses)\n", currenths->targetipstr(), currenths->HostName(), currenths->wierd_responses);
|
||||
currenths->weird_responses);
|
||||
log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Smurf (%d responses)\n", currenths->targetipstr(), currenths->HostName(), currenths->weird_responses);
|
||||
|
||||
if (o.pingscan)
|
||||
log_write(LOG_PLAIN,"Host %s seems to be a subnet broadcast address (returned %d extra pings).%s\n", currenths->NameIP(hostname, sizeof(hostname)), currenths->wierd_responses,
|
||||
log_write(LOG_PLAIN,"Host %s seems to be a subnet broadcast address (returned %d extra pings).%s\n", currenths->NameIP(hostname, sizeof(hostname)), currenths->weird_responses,
|
||||
(currenths->flags & HOST_UP)? " Note -- the actual IP also responded." : "");
|
||||
else {
|
||||
log_write(LOG_PLAIN,"Host %s seems to be a subnet broadcast address (returned %d extra pings). %s.\n",
|
||||
currenths->NameIP(hostname, sizeof(hostname)),
|
||||
currenths->wierd_responses,
|
||||
currenths->weird_responses,
|
||||
(currenths->flags & HOST_UP)?
|
||||
" Still scanning it due to ping response from its own IP"
|
||||
: "Skipping host");
|
||||
|
||||
@@ -2180,7 +2180,7 @@ bool HostScanStats::completed() {
|
||||
|
||||
/* With ping scan, we are done once we know the host is up or down. */
|
||||
if (USI->ping_scan && ((target->flags & HOST_UP)
|
||||
|| (target->flags & HOST_DOWN) || target->wierd_responses)) {
|
||||
|| (target->flags & HOST_DOWN) || target->weird_responses)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3336,7 +3336,7 @@ static void printAnyStats(UltraScanInfo *USI) {
|
||||
}
|
||||
|
||||
if (USI->SPM->mayBePrinted(&USI->now))
|
||||
USI->SPM->printStatsIfNeccessary(USI->getCompletionFraction(), &USI->now);
|
||||
USI->SPM->printStatsIfNecessary(USI->getCompletionFraction(), &USI->now);
|
||||
}
|
||||
|
||||
/* Does a select() call and handles all of the results. This handles both host
|
||||
@@ -4157,14 +4157,14 @@ static int get_ping_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
|
||||
probeI = hss->probes_outstanding.end();
|
||||
listsz = hss->num_probes_outstanding();
|
||||
|
||||
/* A check for wierd_responses is needed here. This is not currently
|
||||
/* A check for weird_responses is needed here. This is not currently
|
||||
possible because we don't have a good way to look up the original
|
||||
target of an ICMP probe based on the response. (massping encoded an
|
||||
array index in the ICMP sequence, which won't work here.) Once we've
|
||||
found the host that sent the probe that elicited the response, the
|
||||
test for wierd_responses is
|
||||
test for weird_responses is
|
||||
if (sending_host->v4host().s_addr != ip->ip_src.s_addr)
|
||||
hss->target->wierd_responses++;
|
||||
hss->target->weird_responses++;
|
||||
(That is, the target that sent the probe is not the same one that
|
||||
sent the response.)
|
||||
*/
|
||||
|
||||
@@ -1865,7 +1865,7 @@ static void considerPrintingStats(ServiceGroup *SG) {
|
||||
/* Perhaps this should be made more complex, but I suppose it should be
|
||||
good enough for now. */
|
||||
if (SG->SPM->mayBePrinted(nsock_gettimeofday())) {
|
||||
SG->SPM->printStatsIfNeccessary(SG->services_finished.size() / ((double)SG->services_remaining.size() + SG->services_in_progress.size() + SG->services_finished.size()), nsock_gettimeofday());
|
||||
SG->SPM->printStatsIfNecessary(SG->services_finished.size() / ((double)SG->services_remaining.size() + SG->services_in_progress.size() + SG->services_finished.size()), nsock_gettimeofday());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -460,7 +460,7 @@ ScanProgressMeter::~ScanProgressMeter() {
|
||||
might as well check this before spending much time computing
|
||||
progress info. now can be NULL if caller doesn't have the current
|
||||
time handy. Just because this function returns true does not mean
|
||||
that the next printStatsIfNeccessary will always print something.
|
||||
that the next printStatsIfNecessary will always print something.
|
||||
It depends on whether time estimates have changed, which this func
|
||||
doesn't even know about. */
|
||||
bool ScanProgressMeter::mayBePrinted(const struct timeval *now) {
|
||||
@@ -495,7 +495,7 @@ bool ScanProgressMeter::mayBePrinted(const struct timeval *now) {
|
||||
so if mayBePrinted() is true, and it seems reasonable to do so
|
||||
because the estimate has changed significantly. Returns whether
|
||||
or not a line was printed.*/
|
||||
bool ScanProgressMeter::printStatsIfNeccessary(double perc_done,
|
||||
bool ScanProgressMeter::printStatsIfNecessary(double perc_done,
|
||||
const struct timeval *now) {
|
||||
struct timeval tvtmp;
|
||||
long time_used_ms;
|
||||
|
||||
6
timing.h
6
timing.h
@@ -191,7 +191,7 @@ class ScanProgressMeter {
|
||||
might as well check this before spending much time computing
|
||||
progress info. now can be NULL if caller doesn't have the current
|
||||
time handy. Just because this function returns true does not mean
|
||||
that the next printStatsIfNeccessary will always print something.
|
||||
that the next printStatsIfNecessary will always print something.
|
||||
It depends on whether time estimates have changed, which this func
|
||||
doesn't even know about. */
|
||||
bool mayBePrinted(const struct timeval *now);
|
||||
@@ -200,7 +200,7 @@ class ScanProgressMeter {
|
||||
so if mayBePrinted() is true, and it seems reasonable to do so
|
||||
because the estimate has changed significantly. Returns whether
|
||||
or not a line was printed.*/
|
||||
bool printStatsIfNeccessary(double perc_done, const struct timeval *now);
|
||||
bool printStatsIfNecessary(double perc_done, const struct timeval *now);
|
||||
|
||||
/* Prints an estimate of when this scan will complete. */
|
||||
bool printStats(double perc_done, const struct timeval *now);
|
||||
@@ -210,7 +210,7 @@ class ScanProgressMeter {
|
||||
|
||||
struct timeval begin; /* When this ScanProgressMeter was instantiated */
|
||||
private:
|
||||
struct timeval last_print_test; /* Last time printStatsIfNeccessary was called */
|
||||
struct timeval last_print_test; /* Last time printStatsIfNecessary was called */
|
||||
struct timeval last_print; /* The most recent time the ETC was printed */
|
||||
char *scantypestr;
|
||||
struct timeval last_est; /* The latest PRINTED estimate */
|
||||
|
||||
Reference in New Issue
Block a user