Skip to content

Commit 9f8acfe

Browse files
committed
Reorganized finding settings rc
1 parent 3d6c273 commit 9f8acfe

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

searchsploit.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
from sys import argv, exit
33
import os
44

5-
# settings
6-
SETTINGS_LOC = ""
7-
# This should be the only variable that you need to edit manually.
8-
# place the file path of .searchsploit_rc so that the script can get the
9-
# rest of the settings from anywhere
10-
11-
125
# Default options
136
COLOUR = True
147
EDBID = False
@@ -49,15 +42,13 @@ def scrapeRC():
4942
divider = []
5043

5144
try:
52-
if(SETTINGS_LOC != ""): # Checks if the variable is empty
53-
settingsFile = open(os.path.relpath(SETTINGS_LOC), "r")
54-
else:
55-
settingsFile = open(".searchsploit_rc", "r")
45+
settingsFile = open("/etc/.searchsploit_rc", "r")
5646
except:
5747
try:
58-
settingsFile = open(os.path.abspath("/etc/.searchsploit_rc"), "r")
59-
except:
6048
settingsFile = open(os.path.expanduser("~/.searchsploit_rc"), "r")
49+
except:
50+
settingsFile = open(os.path.abspath(
51+
os.sys.path[0] + "/.searchsploit_rc"), "r")
6152
# Checks for config in home directory
6253

6354
settings = settingsFile.read().split("\n")

0 commit comments

Comments
 (0)