Implements SMB file-sharing and Windows networking credential auth functions, wrapping impacket's SMBConnection.
# Source: https://github.com/OWASP/Nettacker | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
from impacket.smbconnection import SMBConnection
from nettacker.core.lib.base import BaseEngine, BaseLibrary
def create_connection(host, port):
return SMBConnection(host, remoteHost=host, sess_port=port)
class SmbLibrary(BaseLibrary):
def brute_force(self, *args, **kwargs):
host = kwargs["host"]
port = kwargs["port"]
username = kwargs["username"]
response = {
"host": host,
"port": port,
"username": username,
}
domain = "."
if "domain" in kwargs:
domain = kwargs["domain"]
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key