1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 06:29:03 +00:00
Commit Graph

12060 Commits

Author SHA1 Message Date
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
dmiller
69f1576c17 Fix a LGTM.com finding (false positive, but easier to just change it) 2019-12-22 14:32:05 +00:00
dmiller
bf9b61ad22 Fix comment style for LGTM alert suppression 2019-12-22 14:32:04 +00:00
dmiller
87a92c969f Fix some LGTM.com findings related to type widths 2019-12-20 21:51:01 +00:00
dmiller
e356ad1123 Add thread-safe wrapper for ctime. 2019-12-20 20:53:32 +00:00
dmiller
20f47dd6f2 Can't use a macro for a declared function (win32) 2019-12-20 20:53:31 +00:00
dmiller
162aa15d25 Delete unreferenced file. 2019-12-20 19:37:40 +00:00
dmiller
6a971163ac Fix calls to super from old-style classes. 2019-12-20 19:36:48 +00:00
nnposter
ccdb816552 Avoid traversing dot and dot-dot directories 2019-12-19 20:16:23 +00:00
nnposter
6998bfca49 Refactors function smb.find_files()
- Replaces its coroutine design to avoid sharing sockets across threads
    (Fixes #1837)
  - Corrects conversion of file attributes into bitmask
  - Removes side effect of modifying parameter "options" by populating
    member "srch_attrs"
  - Implements options.maxfiles to take advantage of script arg ls.maxfiles,
    reducing file requests that would be ultimately ignored anyway
  - Improves performace by supporting larger SMB block sizes
  - Implements rudimentary support for Trans2_Data by smb.send_transaction2()
  - Adds standard definitions for SMB file attributes
2019-12-19 20:13:16 +00:00
dmiller
1d8ed90a5c Change from mktemp to mkstemp. Related #1834 2019-12-19 05:27:48 +00:00
dmiller
d0c61b9cbb Avoid DeprecationWarning due to accessing BaseException.message 2019-12-19 05:25:21 +00:00
dmiller
260fa12cce Fix up some unused test code to silence LGTM. See #1834 2019-12-16 05:55:46 +00:00
dmiller
fa0353badd Fix 'Missing call to __init__ during object initialization' from LGTM. See #1834 2019-12-16 05:55:45 +00:00
nnposter
be3d719dd7 Correct a constant value typo 2019-12-15 20:45:54 +00:00
dmiller
4a1c9424d3 Replace localtime calls with thread-safe alternative. See #1834 2019-12-15 05:05:57 +00:00
dmiller
6995af0743 Note the fix to #1723 in changelog 2019-12-15 05:05:56 +00:00
david
5cc813f394 Fix an off-by-one error in stun.lua.
https://seclists.org/nmap-dev/2019/q4/8
2019-12-13 23:12:45 +00:00