mirror of
https://github.com/nmap/nmap.git
synced 2025-12-14 19:59:02 +00:00
Merged in my changes from nmap-smb. The primary changes are:
* Updated the way authentication works on smb -- it's significantly cleaner now * smb-enum-shares.nse gives significantly better output now (it checks if shares are writable) * Added a script that checks if smbv2 is enabled on a server * Added smb-psexec, a script for executing commands on a remote Windows server. I also included some default scripts, a compiled .exe to run everything, and a ton of documentation (in the form of NSEDoc) * Added 'override' parameters to some of the functions in smb.lua, which lets the programmer override any field in an outgoing SMB packet without modifying smb.lua. * Lots of random code cleanups in the smb-* scripts/libraries
This commit is contained in:
50
nselib/data/psexec/drives.lua
Normal file
50
nselib/data/psexec/drives.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
module(... or "drive", package.seeall)
|
||||
---This configuration file pulls info about a given harddrive
|
||||
|
||||
-- Any variable in the 'config' table in smb-psexec.nse can be overriden in the
|
||||
-- 'overrides' table. Most of them are not really recommended, such as the host,
|
||||
-- key, etc.
|
||||
overrides = {}
|
||||
--overrides.timeout = 40
|
||||
|
||||
modules = {}
|
||||
local mod
|
||||
|
||||
mod = {}
|
||||
mod.upload = false
|
||||
mod.name = "Drive type"
|
||||
mod.program = "fsutil"
|
||||
mod.args = "fsinfo drivetype $drive"
|
||||
mod.req_args = {"drive"}
|
||||
mod.maxtime = 1
|
||||
table.insert(modules, mod)
|
||||
|
||||
mod = {}
|
||||
mod.upload = false
|
||||
mod.name = "Drive info"
|
||||
mod.program = "fsutil"
|
||||
mod.args = "fsinfo ntfsinfo $drive"
|
||||
mod.req_args = {"drive"}
|
||||
mod.replace = {{" :",":"}}
|
||||
mod.maxtime = 1
|
||||
table.insert(modules, mod)
|
||||
|
||||
mod = {}
|
||||
mod.upload = false
|
||||
mod.name = "Drive type"
|
||||
mod.program = "fsutil"
|
||||
mod.args = "fsinfo statistics $drive"
|
||||
mod.req_args = {"drive"}
|
||||
mod.replace = {{" :",":"}}
|
||||
mod.maxtime = 1
|
||||
table.insert(modules, mod)
|
||||
|
||||
mod = {}
|
||||
mod.upload = false
|
||||
mod.name = "Drive quota"
|
||||
mod.program = "fsutil"
|
||||
mod.args = "quota query $drive"
|
||||
mod.req_args = {"drive"}
|
||||
mod.maxtime = 1
|
||||
table.insert(modules, mod)
|
||||
|
||||
Reference in New Issue
Block a user