-Pn
This commit is contained in:
parent
bc04ce19a7
commit
0ac085a97e
@ -8,7 +8,7 @@
|
|||||||
<xsl:param name="site"/>
|
<xsl:param name="site"/>
|
||||||
|
|
||||||
<xsl:template match="lanScan">
|
<xsl:template match="lanScan">
|
||||||
<xsl:text>nmap -v -T4 -p </xsl:text>
|
<xsl:text>nmap -v -T4 -Pn -p </xsl:text>
|
||||||
<xsl:apply-templates select="//service[not(.=preceding::*)]" />
|
<xsl:apply-templates select="//service[not(.=preceding::*)]" />
|
||||||
<xsl:text> --script nse/ --datadir nse/ --script-args-file script-args.ini -oX "</xsl:text>
|
<xsl:text> --script nse/ --datadir nse/ --script-args-file script-args.ini -oX "</xsl:text>
|
||||||
<xsl:value-of select="@scanpath"/>
|
<xsl:value-of select="@scanpath"/>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local stdnse = require "stdnse"
|
local stdnse = require "stdnse"
|
||||||
local smb = require "smb"
|
local smb = require "smb"
|
||||||
|
local smb2 = require "smb2"
|
||||||
local msrpc = require "msrpc"
|
local msrpc = require "msrpc"
|
||||||
local bin = require "bin"
|
local bin = require "bin"
|
||||||
local shortport = require "shortport"
|
local shortport = require "shortport"
|
||||||
@ -145,9 +146,13 @@ function send_transaction2(smbstate, sub_command, function_parameters, function_
|
|||||||
-- Send the transaction request
|
-- Send the transaction request
|
||||||
stdnse.debug2("SMB: Sending SMB_COM_TRANSACTION2")
|
stdnse.debug2("SMB: Sending SMB_COM_TRANSACTION2")
|
||||||
local result, err = smb.smb_send(smbstate, header, parameters, data, overrides)
|
local result, err = smb.smb_send(smbstate, header, parameters, data, overrides)
|
||||||
|
if(result == false) then
|
||||||
|
stdnse.debug1("SMB: Try SMBv2 connexion")
|
||||||
|
local result, err = smb2.smb2_send(smbstate, header, parameters, data, overrides)
|
||||||
if(result == false) then
|
if(result == false) then
|
||||||
return false, err
|
return false, err
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -156,9 +161,13 @@ function receive_transaction2(smbstate)
|
|||||||
|
|
||||||
-- Read the result
|
-- Read the result
|
||||||
local status, header, parameters, data = smb.smb_read(smbstate)
|
local status, header, parameters, data = smb.smb_read(smbstate)
|
||||||
|
if(status ~= true) then
|
||||||
|
stdnse.debug1("SMB: Try SMBv2 connexion")
|
||||||
|
local status, header, parameters, data = smb2.smb2_read(smbstate)
|
||||||
if(status ~= true) then
|
if(status ~= true) then
|
||||||
return false, header
|
return false, header
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Check if it worked
|
-- Check if it worked
|
||||||
local pos, header1, header2, header3, header4, command, status, flags, flags2, pid_high, signature, unused, tid, pid, uid, mid = bin.unpack("<CCCCCICSSlSSSSS", header)
|
local pos, header1, header2, header3, header4, command, status, flags, flags2, pid_high, signature, unused, tid, pid, uid, mid = bin.unpack("<CCCCCICSSlSSSSS", header)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user