mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Compare commits
5 Commits
6637d76846
...
b2cdb23fc0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2cdb23fc0 | ||
|
|
117329a5e4 | ||
|
|
c40965039b | ||
|
|
d91d876905 | ||
|
|
b6c3989259 |
@@ -188,7 +188,7 @@ const char *MACPrefix2Corp(const u8 *prefix) {
|
|||||||
mac_prefix_init();
|
mac_prefix_init();
|
||||||
|
|
||||||
/* MA-S: 36 bits (9 nibbles)*/
|
/* MA-S: 36 bits (9 nibbles)*/
|
||||||
key = ((u64)prefix[0] << 28) + (prefix[1] << 20) + (prefix[2] << 12) + (prefix[3] << 4) + (prefix[4] >> 4);
|
key = ((u64)prefix[0] << 28) + ((u64)prefix[1] << 20) + ((u64)prefix[2] << 12) + ((u64)prefix[3] << 4) + (prefix[4] >> 4);
|
||||||
corp = findMACEntry(((u64)9 << 36) + key);
|
corp = findMACEntry(((u64)9 << 36) + key);
|
||||||
if (corp)
|
if (corp)
|
||||||
return corp;
|
return corp;
|
||||||
|
|||||||
@@ -975,7 +975,7 @@ int netutil_eth_datalink(const netutil_eth_t *e) {
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define eth_handle(_eth) (_eth->pt)
|
#define eth_handle(_eth) (_eth->pt)
|
||||||
#define eth_handle_send pcap_inject
|
#define eth_handle_send pcap_inject
|
||||||
#define eth_handle_close eth_close
|
#define eth_handle_close pcap_close
|
||||||
#else
|
#else
|
||||||
#define eth_handle(_eth) (_eth->ethsd)
|
#define eth_handle(_eth) (_eth->ethsd)
|
||||||
#define eth_handle_send eth_send
|
#define eth_handle_send eth_send
|
||||||
|
|||||||
@@ -850,6 +850,7 @@ struct request_context {
|
|||||||
static int channel_request (lua_State *L, int status, lua_KContext ctx) {
|
static int channel_request (lua_State *L, int status, lua_KContext ctx) {
|
||||||
int rc;
|
int rc;
|
||||||
request_context *req_ctx = (request_context *)ctx;
|
request_context *req_ctx = (request_context *)ctx;
|
||||||
|
const char* request_str = req_ctx->request;
|
||||||
|
|
||||||
DO_OR_YIELD((rc = libssh2_channel_process_startup(req_ctx->channel,
|
DO_OR_YIELD((rc = libssh2_channel_process_startup(req_ctx->channel,
|
||||||
req_ctx->request, req_ctx->request_len,
|
req_ctx->request, req_ctx->request_len,
|
||||||
@@ -859,7 +860,7 @@ static int channel_request (lua_State *L, int status, lua_KContext ctx) {
|
|||||||
free(req_ctx);
|
free(req_ctx);
|
||||||
|
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return luaL_error(L, "Error sending %s request", req_ctx->request);
|
return luaL_error(L, "Error sending %s request", request_str);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -564,7 +564,10 @@ static int lzstream_decompress(lua_State *L) {
|
|||||||
success = (l == 0) ? lz_test_eof(L, s) : lz_read_chars(L, s, l);
|
success = (l == 0) ? lz_test_eof(L, s) : lz_read_chars(L, s, l);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const char *p = lua_tostring(L, n);
|
size_t l;
|
||||||
|
const char *p = lua_tolstring(L, n, &l);
|
||||||
|
if (l < 2)
|
||||||
|
return luaL_argerror(L, n, "invalid format");
|
||||||
luaL_argcheck(L, p && p[0] == '*', n, "invalid option");
|
luaL_argcheck(L, p && p[0] == '*', n, "invalid option");
|
||||||
switch (p[1]) {
|
switch (p[1]) {
|
||||||
case 'l': /* line */
|
case 'l': /* line */
|
||||||
|
|||||||
2
osscan.h
2
osscan.h
@@ -245,7 +245,7 @@ struct ObservationPrint {
|
|||||||
FingerPrintScan scan_info;
|
FingerPrintScan scan_info;
|
||||||
std::vector<FingerTest> extra_tests;
|
std::vector<FingerTest> extra_tests;
|
||||||
const char *getInfo(FingerPrintScan::Attribute attr) const {
|
const char *getInfo(FingerPrintScan::Attribute attr) const {
|
||||||
if (attr >= FingerPrintScan::MAX_ATTR)
|
if (attr >= FingerPrintScan::MAX_ATTR || attr < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
return scan_info.values[static_cast<int>(attr)];
|
return scan_info.values[static_cast<int>(attr)];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user