1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-02 04:49:02 +00:00
Commit Graph

12077 Commits

Author SHA1 Message Date
dmiller
ea8917ca1d Remove a script that exists elsewhere in updated format. 2020-01-01 23:04:53 +00:00
dmiller
ef52628bbc Remove unused variable. #1834 2020-01-01 23:04:52 +00:00
dmiller
e01ddaf1e8 Avoid retrying iod_read if we already got ENOTSOCK. 2019-12-30 16:14:10 +00:00
dmiller
c7932d2fc6 Don't break out of loop on just any error, since loop condition expects to test for EINTR. #1834 2019-12-30 16:14:09 +00:00
dmiller
f3f3a8367e Don't check for char greater than CHAR_MAX. #1834 2019-12-30 16:14:09 +00:00
dmiller
c89035b6dd Avoid 'import *' where __all__ not defined. #1834 2019-12-30 15:54:34 +00:00
dmiller
2abcac9925 Don't bother maintaining compat with Python 2.5. #1834 2019-12-30 06:57:04 +00:00
dmiller
d75e255113 Avoid handling BaseException, so SysExit and KeyboardInterrupt are propagated. #1834 2019-12-30 06:46:36 +00:00
dmiller
74708c3e3a Hash Port objects by port spec, fixing breakage 2019-12-30 06:46:35 +00:00
dmiller
3e58be1551 Use 'with' statements for file open/close. #1834 2019-12-30 06:46:34 +00:00
dmiller
02212559d2 Delete unused variables and unreachable statements. #1834 2019-12-30 06:46:33 +00:00
dmiller
65450a0654 Actually delete Nmap output object in property deleter method. #1834 2019-12-30 06:46:32 +00:00
dmiller
33aca7c8f5 Avoid using for/else when loop doesn't break. #1834 2019-12-30 06:46:32 +00:00
dmiller
d3267a93c4 Fix a crash, config_parser referenced before assignment. 2019-12-30 05:05:39 +00:00
dmiller
499c07d9f9 Replace redundant function, permit ranges in udp payload specs. 2019-12-30 04:48:50 +00:00
dmiller
697a22fd63 Move some flag defines from services.h to scan_lists.h where they make more sense. 2019-12-30 04:48:50 +00:00
dmiller
17304bf825 Remove debug to file from OS X launcher. Closes #1777 2019-12-30 04:48:49 +00:00
dmiller
ea4e2d6657 Avoid 'using namespace std' causing name conflicts. Fixes #1363, fixes #1867 2019-12-30 04:03:03 +00:00
dmiller
085cd7fd34 Suppress unused import LGTM.com alert for I18N
I18N installs the `_` function into the builtin namespace, so it looks
like it's unused when it's not. #1834
2019-12-30 00:53:25 +00:00
dmiller
866dc375e4 Correctly print VM socket address. Closes #1868 2019-12-30 00:53:23 +00:00
dmiller
254d155634 Update LGTM config to skip javascript analysis, which fails anyway since we don't have any. 2019-12-29 20:18:52 +00:00
dmiller
156cb98fd0 Fix up some LGTM issues in ndiff. #1834 2019-12-29 20:05:05 +00:00
dmiller
33346f7651 Remove unused variables. #1834 2019-12-29 19:56:26 +00:00
dmiller
92270f313e Fix some 'import *' messiness. #1834 2019-12-29 19:56:26 +00:00
dmiller
e3f884a301 Silence some LGTM warnings, since the script is modified on install. #1834 2019-12-29 19:28:57 +00:00
dmiller
2a0c1eca5c Remove unused variables. #1834 2019-12-29 19:28:56 +00:00
dmiller
fa7cdb2c9f Remove unneeded delete (var goes out of scope). #1834 2019-12-29 15:57:31 +00:00
dmiller
0403751060 Be more clear for static analysis (LGTM) that this does not overflow. #1834 2019-12-29 15:52:59 +00:00
dmiller
ee95fa8d30 Avoid extra copying of sockaddr storage; pass by reference. #1834 2019-12-29 15:52:58 +00:00
dmiller
3618f48b89 Instruct LGTM to ignore short names of global variables. #1834 2019-12-29 15:52:58 +00:00
dmiller
1059e25a7b Avoid hiding global with parameter. #1834 2019-12-29 06:18:33 +00:00
dmiller
3c7f2de01b Properly return negative on error from vsnprintf
Our implementation of vsnprintf for systems where it is missing did not
correctly return a negative value on error, instead returning the size
passed in. We got this code from tcpdump/libpcap, and it was wrong
there, too, though their latest master branch has removed it in favor of
requiring a C99 compiler (C99 guarantees vsnprintf).

This should remove a LGTM code analysis finding (See #1834) of
cpp/constant-comparison in Ncat because we were checking for a negative
return from Snprintf, which would never occur.
2019-12-29 05:53:27 +00:00
dmiller
736cefcdb6 Pass ScriptResult by const reference instead of copying. #1834 2019-12-29 05:15:12 +00:00
dmiller
784142022d Make destructor virtual (no effect at the moment). #1834 2019-12-29 05:15:11 +00:00
dmiller
5e30d6e29e Fix loop flow. #1834 2019-12-29 05:15:10 +00:00
dmiller
b74f70fb33 Avoid integer overflow in multiplication. See #1834 2019-12-29 05:15:10 +00:00
dmiller
d5b57a8cd9 Replace ncat's custom hexdump function with the one from nbase. 2019-12-28 20:12:45 +00:00
dmiller
92bf83aaba Remove unused imports 2019-12-28 02:42:14 +00:00
dmiller
6d624f9ed7 Correct function prototypes from earlier change 2019-12-26 16:46:18 +00:00
dmiller
898988dcd3 Remove dangling else 2019-12-26 16:46:17 +00:00
dmiller
d497aa268e Instruct LGTM.com to ignore some external libraries. 2019-12-25 20:06:55 +00:00
dmiller
ee32b56ebb Comment some empty blocks. #1834 2019-12-25 20:01:18 +00:00
dmiller
be0818a664 Use different variable name for local vs param. #1834 2019-12-25 20:01:18 +00:00
dmiller
7d1530476d Remove some unnecessary/constant comparisons. #1834 2019-12-25 20:01:17 +00:00
dmiller
c155bf1bdc Be sure to free a strdup'd string in NpingOps destructor. #1834 2019-12-25 20:01:16 +00:00
dmiller
8ad0a33c37 Add header guards to Nping headers. #1834 2019-12-25 20:01:16 +00:00
dmiller
0c2a3776f0 Remove incorrect use of const on return type (not pointer). #1834 2019-12-25 20:01:15 +00:00
dmiller
8192ce2b6c Avoid using global names as function params. #1834 2019-12-25 20:01:14 +00:00
dmiller
5abe0aa8cc Combine/simplify conditional branches, eliminating dead code. See #1834 2019-12-22 21:50:55 +00:00
dmiller
61d77a2165 Remove some constant-false conditionals and dead code. See #1834 2019-12-22 21:50:54 +00:00