You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 6, 2023. It is now read-only.
parser.add_argument("target", nargs='*', type=str, help="The target IP(s), range(s), CIDR(s), hostname(s), FQDN(s) or file(s) containg a list of targets")
57
+
parser.add_argument("-t", type=int, dest="threads", default=100, help="Set how many concurrent threads to use (defaults to 100)")
58
+
parser.add_argument('-id', metavar="CRED_ID", type=int, dest='cred_id', help='Database credential ID to use for authentication')
59
+
parser.add_argument("-u", metavar="USERNAME", dest='username', nargs='*', default=[], help="Username(s) or file(s) containing usernames")
rgroup=parser.add_argument_group("Credential Gathering", "Options for gathering credentials")
79
+
rgroup.add_argument("--sam", action='store_true', help='Dump SAM hashes from target systems')
80
+
rgroup.add_argument("--lsa", action='store_true', help='Dump LSA secrets from target systems')
81
+
rgroup.add_argument("--ntds", choices={'vss', 'drsuapi'}, help="Dump the NTDS.dit from target DCs using the specifed method\n(drsuapi is the fastest)")
cgroup=parser.add_argument_group("Command Execution", "Options for executing commands")
108
+
cgroup.add_argument('--exec-method', choices={"wmiexec", "smbexec", "atexec"}, default=None, help="Method to execute the command. Ignored if in MSSQL mode (default: wmiexec)")
109
+
cgroup.add_argument('--force-ps32', action='store_true', help='Force the PowerShell command to run in a 32-bit process')
110
+
cgroup.add_argument('--no-output', action='store_true', dest='no_output', help='Do not retrieve command output')
111
+
cgroup.add_argument("-x", metavar="COMMAND", dest='command', help="Execute the specified command")
112
+
cgroup.add_argument("-X", metavar="PS_COMMAND", dest='pscommand', help='Execute the specified PowerShell command')
113
+
114
+
mgroup=parser.add_argument_group("MSSQL Interaction", "Options for interacting with MSSQL DBs")
115
+
mgroup.add_argument("--mssql", action='store_true', help='Switches CME into MSSQL Mode. If credentials are provided will authenticate against all discovered MSSQL DBs')
116
+
mgroup.add_argument("--mssql-query", metavar='QUERY', type=str, help='Execute the specifed query against the MSSQL DB')
117
+
118
+
logger=CMEAdapter(setup_logger())
119
+
first_run_setup(logger)
120
+
121
+
iflen(sys.argv) ==1:
122
+
parser.print_help()
123
+
sys.exit(1)
124
+
125
+
cme_path=os.path.expanduser('~/.cme')
126
+
127
+
module=None
128
+
server=None
129
+
context=None
130
+
targets= []
131
+
server_port_dict= {'http': 80, 'https': 443}
132
+
133
+
args=parser.parse_args()
134
+
135
+
ifargs.verbose:
136
+
setup_debug_logger()
137
+
138
+
ifnotargs.server_port:
139
+
args.server_port=server_port_dict[args.server]
140
+
141
+
db_path=os.path.join(cme_path, 'cme.db')
142
+
# set the database connection to autocommit w/ isolation level
0 commit comments