Skip to content

Commit 3d33086

Browse files
committed
Added /etc as a searching position for rc
1 parent 29cc70f commit 3d33086

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

searchsploit.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ def scrapeRC():
5555
settings = open(".searchsploit_rc", "r").read().split("\n")
5656
except:
5757
try:
58-
settings = open(os.path.expanduser("~").replace(
59-
"\\", "/") + "/.searchsploit_rc", "r").read().split("\n")
60-
# Checks for home directory in linux/mac
58+
settings = open("/etc/.searchsploit_rc", "r").read().split("\n")
6159
except:
62-
settings = open(os.getenv("userprofile").replace(
63-
"\\", "/") + "/.searchsploit_rc", "r").read().split("\n")
64-
# Checks for home directory in windows
60+
try:
61+
settings = open(os.path.expanduser("~").replace(
62+
"\\", "/") + "/.searchsploit_rc", "r").read().split("\n")
63+
# Checks for home directory in linux/mac
64+
except:
65+
settings = open(os.getenv("userprofile").replace(
66+
"\\", "/") + "/.searchsploit_rc", "r").read().split("\n")
67+
# Checks for home directory in windows
6568
for i in settings:
6669
if(i == "" or i[0] == "#"):
6770
continue # Ignores lines that are empty or are just comments

0 commit comments

Comments
 (0)