1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Remove bin.lua calls from some scripts and libraries

This commit is contained in:
dmiller
2018-08-29 03:06:40 +00:00
parent dc996da218
commit 0d18bcdbc2
17 changed files with 65 additions and 67 deletions

View File

@@ -1,4 +1,3 @@
local bin = require "bin"
local brute = require "brute"
local creds = require "creds"
local mysql = require "mysql"
@@ -80,7 +79,7 @@ Driver = {
stdnse.debug1( "Trying %s ...", pass)
local auth_string = stdnse.fromhex("0000018d00000000") .. pass .. stdnse.fromhex("00504e5f5155454d4500"); -- old authentication method
local err
status, err = self.socket:send(bin.pack("c",string.len(auth_string)-3) .. auth_string) --send initial auth
status, err = self.socket:send(string.pack("b",#auth_string-3) .. auth_string) --send initial auth
status, response = self.socket:receive_bytes(0)
if not status then
return false,brute.Error:new( "Incorrect username" )