Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit a01c46c

Browse files
author
byt3bl33d3r
committed
Some output and usage fixes
1 parent 2a18c36 commit a01c46c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crackmapexec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ def search_content(smb, path, result, share, pattern, ip):
26452645
return
26462646

26472647
if re.findall(pattern, contents):
2648-
print_att("//{}/{}/{} offset:{} pattern:{}".format(ip, path.replace("//",""), result.get_longname().encode('utf8'), rfile.tell(), pattern.pattern))
2648+
print_att("//{}/{}/{} [offset:{} pattern:{}]".format(ip, path.replace("//",""), result.get_longname().encode('utf8'), rfile.tell(), pattern.pattern))
26492649
rfile.close()
26502650
return
26512651
except Exception:
@@ -3043,10 +3043,10 @@ def concurrency(hosts):
30433043
egroup.add_argument("--wmi", metavar='QUERY', type=str, dest='wmi_query', help='Issues the specified WMI query')
30443044

30453045
sgroup = parser.add_argument_group("Spidering", "Options for spidering shares")
3046-
sgroup.add_argument("--spider", metavar='FOLDER', type=str, default='', help='Folder to spider (defaults to share root dir)')
3046+
sgroup.add_argument("--spider", metavar='FOLDER', type=str, help='Folder to spider')
30473047
sgroup.add_argument("--search-content", dest='search_content', action='store_true', help='Enable file content searching')
30483048
sgroup.add_argument("--exclude-dirs", metavar='DIR_LIST', dest='exclude_dirs', type=str, help='Directories to exclude from spidering')
3049-
sgroup.add_argument("--pattern", type=str, default= '', help='Pattern to search for in folders filenames and file content (if enabled)')
3049+
sgroup.add_argument("--pattern", type=str, help='Pattern to search for in folders, filenames and file content (if enabled)')
30503050
sgroup.add_argument("--patternfile", type=str, help='File containing patterns to search for in folders, filenames and file content (if enabled)')
30513051
sgroup.add_argument("--depth", type=int, default=10, help='Spider recursion depth (default: 10)')
30523052

0 commit comments

Comments
 (0)