403Webshell
Server IP : 101.53.144.229  /  Your IP : 216.73.216.181
Web Server : Apache
System : Linux host.gdigitalindia.in 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : digitalshiksha ( 1179)
PHP Version : 5.6.40
Disable Function : eval,show_source,system,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,curl_multi_exechellcmd, ini_restore,apache_get_modules,get_cfg_var,passthru, exec ,proc_get_status,fpassthru,c999_buff_prepare,c999_sess_put,c99_buff_prepare,c99_sess_put,proc_close,ini_alter,dl,symlink,link,proc_close,ini_alter,dl,symlink,link,mail
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/nmap/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/nmap/scripts/omp2-brute.nse
local brute = require "brute"
local creds = require "creds"
local omp2 = require "omp2"
local shortport = require "shortport"

description = [[
Performs brute force password auditing against the OpenVAS manager using OMPv2.
]]

---
-- @usage
-- nmap -p 9390 --script omp2-brute <target>
--
-- @output
-- PORT     STATE SERVICE REASON
-- 9390/tcp open  openvas syn-ack
-- | svn-brute:
-- |   Accounts
-- |_    admin:secret => Valid credentials
--

author = "Henri Doreau"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"brute", "intrusive"}


portrule = shortport.port_or_service(9390, "openvas")


Driver = {
  new = function(self, host, port)
    local o = {}
    setmetatable(o, self)
    self.__index = self
    o.host = host
    o.port = port
    o.session = omp2.Session:new()
    return o
  end,

  --- Connects to the OpenVAS Manager
  --
  -- @return status boolean for connection success/failure
  -- @return err string describing the error on failure
  connect = function(self)
    return self.session:connect(self.host, self.port)
  end,

  --- Closes connection
  --
  -- @return status boolean for closing success/failure
  disconnect = function(self)
    return self.session:close()
  end,

  --- Attempts to login the the OpenVAS Manager using a given username/password
  -- couple. Store the credentials in the registry on success.
  --
  -- @param username string containing the login username
  -- @param password string containing the login password
  -- @return status boolean for login success/failure
  -- @return err string describing the error on failure
  login = function(self, username, password)
    if self.session:authenticate(username, password) then
      -- store the account for possible future use
      omp2.add_account(self.host, username, password)
      return true, brute.Account:new(username, password, creds.State.VALID)
    else
      return false, brute.Error:new("login failed")
    end
  end,

}

action = function(host, port)
  local engine = brute.Engine:new(Driver, host, port)
  engine.options.script_name = SCRIPT_NAME
  local status, result = engine:start()
  return result
end


Youez - 2016 - github.com/yon3zu
LinuXploit