mirror of
https://github.com/twhite96/smb-scanner.git
synced 2024-09-19 17:03:47 -04:00
Initial code commit
This commit is contained in:
parent
2f78dac119
commit
75237c5164
1 changed files with 33 additions and 0 deletions
|
@ -1,2 +1,35 @@
|
|||
import argparse
|
||||
from colorama import Fore, Style, init
|
||||
from impacket import smb, smb3, nmb, nt_errors, LOG
|
||||
import socket
|
||||
import urllib3
|
||||
import os
|
||||
from os.path import exists
|
||||
import datetime
|
||||
import sys
|
||||
|
||||
global domain
|
||||
|
||||
|
||||
def options():
|
||||
opt_parser = argparse.ArgumentParser(
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
epilog=textwrap.dedent(
|
||||
"""Example: python3 smb_scanner.py tool -t 192.168.1.1"""
|
||||
),
|
||||
)
|
||||
requiredNamed = opt_parser.add_argument_group("required arguments")
|
||||
requiredNamed.add_argument(
|
||||
"-t", "--target", help="Specifies the ip address of the target.", required=True
|
||||
)
|
||||
global args
|
||||
args = opt_parser.parse_args()
|
||||
if len(sys.argv) == 1:
|
||||
opt_parser.print_help()
|
||||
opt_parser.exit()
|
||||
global success, info, fail
|
||||
success, info, fail = (
|
||||
Fore.GREEN + Style.BRIGHT,
|
||||
Fore.YELLOW + Style.BRIGHT,
|
||||
Fore.RED + Style.BRIGHT,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue