Skip to content

Commit 445edd4

Browse files
committedFeb 11, 2018
Added ConfigParser and terms of use
1 parent 29848a6 commit 445edd4

File tree

5 files changed

+58
-28
lines changed

5 files changed

+58
-28
lines changed
 

‎docs/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@ <h5>About</h5>
185185
function watch() {
186186
document.location.href = 'https://github.com/Manisso/fsociety/subscription'
187187
}
188+
188189
function star() {
189190
document.location.href = 'https://github.com/Manisso/fsociety'
190191
}
192+
191193
function fork() {
192194
document.location.href = 'https://github.com/Manisso/fsociety/fork'
193195
}

‎fsociety.cfg

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[fsociety]
2+
agreement = false
3+
tooldir = tools/
4+
logdir = logs/
5+
yes = yes y ye ya yep yeah

‎fsociety.py

+46-23
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import threading
3636
import base64
3737
import time
38+
import ConfigParser
3839
from sys import argv
3940
from commands import *
4041
from getpass import getpass
@@ -70,17 +71,16 @@ def yesOrNo():
7071

7172

7273
'''
73-
Variables
74+
Config
7475
'''
76+
configFile = 'fsociety.cfg'
7577

76-
toolDir = "tools/"
77-
logDir = "logs/"
78-
directories = ['/uploads/', '/upload/', '/files/', '/resume/', '/resumes/', '/documents/', '/docs/', '/pictures/', '/file/', '/Upload/', '/Uploads/', '/Resume/', '/Resume/', '/UsersFiles/', '/Usersiles/', '/usersFiles/', '/Users_Files/', '/UploadedFiles/',
79-
'/Uploaded_Files/', '/uploadedfiles/', '/uploadedFiles/', '/hpage/', '/admin/upload/', '/admin/uploads/', '/admin/resume/', '/admin/resumes/', '/admin/pictures/', '/pics/', '/photos/', '/Alumni_Photos/', '/alumni_photos/', '/AlumniPhotos/', '/users/']
80-
shells = ['wso.php', 'shell.php', 'an.php', 'hacker.php', 'lol.php', 'up.php', 'cp.php', 'upload.php',
81-
'sh.php', 'pk.php', 'mad.php', 'x00x.php', 'worm.php', '1337worm.php', 'config.php', 'x.php', 'haha.php']
82-
upload = []
83-
yes = ['yes', 'y', 'ye', 'Y']
78+
config = ConfigParser.RawConfigParser()
79+
config.read(configFile)
80+
81+
toolDir = config.get('fsociety', 'toolDir')
82+
logDir = config.get('fsociety', 'logDir')
83+
yes = config.get('fsociety', 'yes').split()
8484

8585
fsocietylogo = color.END + '''
8686
d88888b .d8888. .d88b. .o88b. d888888b d88888b d888888b db db
@@ -90,14 +90,32 @@ def yesOrNo():
9090
88 db 8D `8b d8' Y8b d8 .88. 88. 88 88
9191
YP `8888Y' `Y88P' `Y88P' Y888888P Y88888P YP YP
9292
'''
93+
fsocietyPrompt = "fsociety ~# "
9394
alreadyInstalled = "Already Installed"
9495
continuePrompt = "\nClick [Return] to continue"
9596

97+
termsAndConditions = '''
98+
I shall not use fsociety to:
99+
(i) upload or otherwise transmit, display or distribute any
100+
content that infringes any trademark, trade secret, copyright
101+
or other proprietary or intellectual property rights of any
102+
person; (ii) upload or otherwise transmit any material that contains
103+
software viruses or any other computer code, files or programs
104+
designed to interrupt, destroy or limit the functionality of any
105+
computer software or hardware or telecommunications equipment;
106+
'''
107+
96108

97109
'''
98110
Starts Menu Classes
99111
'''
100-
112+
def agreement():
113+
while not config.getboolean("fsociety", "agreement"):
114+
clearScr()
115+
print(termsAndConditions)
116+
agree = raw_input("You must agree to our terms and conditions first (Y/n) ").lower()
117+
if agree in yes:
118+
config.set('fsociety', 'agreement', 'true')
101119

102120
class fsociety:
103121
def __init__(self):
@@ -119,7 +137,7 @@ def __init__(self):
119137
{11}-CONTRIBUTORS
120138
{99}-EXIT\n
121139
''')
122-
choice = raw_input("fsociety~# ")
140+
choice = raw_input(fsocietyPrompt)
123141
clearScr()
124142
if choice == "1":
125143
informationGatheringMenu()
@@ -142,12 +160,16 @@ def __init__(self):
142160
elif choice == "11":
143161
self.githubContributors()
144162
elif choice == "99":
163+
#with open(configFile, 'wb') as configfile:
164+
#config.write(configfile)
145165
sys.exit()
166+
elif choice == "\r" or choice == "\n" or choice == "" or choice == " ":
167+
self.__init__()
146168
else:
147169
try:
148170
print(os.system(choice))
149171
except:
150-
self.__init__()
172+
pass
151173
self.completed()
152174

153175
def githubContributors(self):
@@ -198,7 +220,7 @@ def __init__(self):
198220
" {3}--pyPISHER - Tool to create a mallicious website for password pishing")
199221
print(" {4}--SMTP Mailer - Tool to send SMTP mail\n ")
200222
print(" {99}-Back To Main Menu \n")
201-
choice6 = raw_input("fsociety~# ")
223+
choice6 = raw_input(fsocietyPrompt)
202224
clearScr()
203225
if choice6 == "1":
204226
setoolkit()
@@ -244,7 +266,7 @@ def __init__(self):
244266
" {11}-BruteX - Automatically brute force all services running on a target")
245267
print(" {12}-Arachni - Web Application Security Scanner Framework \n ")
246268
print(" {99}-Back To Main Menu \n")
247-
choiceweb = raw_input("fsociety~# ")
269+
choiceweb = raw_input(fsocietyPrompt)
248270
clearScr()
249271
if choiceweb == "1":
250272
maine()
@@ -316,7 +338,7 @@ def __init__(self):
316338
print(" {2}--POET")
317339
print(" {3}--Phishing Framework \n")
318340
print(" {99}-Return to main menu \n ")
319-
choice11 = raw_input("fsociety~# ")
341+
choice11 = raw_input(fsocietyPrompt)
320342
clearScr()
321343
if choice11 == "1":
322344
sitechecker()
@@ -361,7 +383,7 @@ def __init__(self):
361383
print(" {7}--Doork")
362384
print(" {8}--Crips\n ")
363385
print(" {99}-Back To Main Menu \n")
364-
choice2 = raw_input("fsociety~# ")
386+
choice2 = raw_input(fsocietyPrompt)
365387
clearScr()
366388
if choice2 == "1":
367389
nmap()
@@ -433,7 +455,7 @@ def menu(self, target):
433455
print(" {2}--Port Scan [-Pn]")
434456
print(" {3}--Operating System Detection [-A]\n")
435457
print(" {99}-Return to information gathering menu \n")
436-
response = raw_input("nmap~# ")
458+
response = raw_input("nmap ~# ")
437459
clearScr()
438460
logPath = "logs/nmap-" + strftime("%Y-%m-%d_%H:%M:%S", gmtime())
439461
try:
@@ -532,7 +554,7 @@ def menu(self, target):
532554
print(" {2}--Plugin Enumeration [--enumerate p]")
533555
print(" {3}--All Enumeration Tools [--enumerate]\n")
534556
print(" {99}-Return to information gathering menu \n")
535-
response = raw_input("wpscan~# ")
557+
response = raw_input("wpscan ~# ")
536558
clearScr()
537559
logPath = "../../logs/wpscan-" + \
538560
strftime("%Y-%m-%d_%H:%M:%S", gmtime()) + ".txt"
@@ -719,7 +741,7 @@ def __init__(self):
719741
print(
720742
" {2}--BruteX - Automatically bruteforces all services running on a target\n")
721743
print(" {99}-Back To Main Menu \n")
722-
choice3 = raw_input("passwd~# ")
744+
choice3 = raw_input("passwd ~# ")
723745
clearScr()
724746
if choice3 == "1":
725747
cupp()
@@ -785,7 +807,7 @@ def __init__(self):
785807
print(" {2}--pixiewps")
786808
print(" {3}--Bluetooth Honeypot GUI Framework \n")
787809
print(" {99}-Back To The Main Menu \n")
788-
choice4 = raw_input("fsociety~# ")
810+
choice4 = raw_input(fsocietyPrompt)
789811
clearScr()
790812
if choice4 == "1":
791813
reaver()
@@ -903,7 +925,7 @@ def __init__(self):
903925
print(" {8}--Bruteforce the Android Passcode given the hash and salt")
904926
print(" {9}--Joomla SQL injection Scanner \n ")
905927
print(" {99}-Go Back To Main Menu \n")
906-
choice5 = raw_input("fsociety~# ")
928+
choice5 = raw_input(fsocietyPrompt)
907929
clearScr()
908930
if choice5 == "1":
909931
atscan()
@@ -1329,7 +1351,7 @@ def __init__(self, serverip):
13291351
self.getSites(False)
13301352
print menuu
13311353
while True:
1332-
choice = raw_input('fsociety~# ')
1354+
choice = raw_input(fsocietyPrompt)
13331355
if choice == '1':
13341356
self.getSites(True)
13351357
elif choice == '2':
@@ -1747,7 +1769,7 @@ def getdrupal():
17471769

17481770

17491771
def drupallist():
1750-
listop = raw_input("Enter The list Txt ~# ")
1772+
listop = raw_input("Enter The list Txt: ")
17511773
fileopen = open(listop, 'r')
17521774
content = fileopen.readlines()
17531775
for i in content:
@@ -2050,6 +2072,7 @@ def wpminiscanner():
20502072

20512073
if __name__ == "__main__":
20522074
try:
2075+
agreement()
20532076
fsociety()
20542077
except KeyboardInterrupt:
20552078
print(" Finishing up...\r"),

‎install.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ fi
6666

6767
echo "[✔] Installing ...";
6868
echo "";
69-
git clone https://github.com/Manisso/fsociety "$INSTALL_DIR";
69+
git clone --depth=1 https://github.com/Manisso/fsociety "$INSTALL_DIR";
7070
echo "#!$BASH_PATH
7171
python $INSTALL_DIR/fsociety.py" '${1+"$@"}' > "$INSTALL_DIR/fsociety";
7272
chmod +x fsociety;
7373
if [ "$TERMUX" = true ]; then
74-
cp fsociety "$BIN_DIR"
74+
cp "$INSTALL_DIR/fsociety" "$BIN_DIR"
7575
else
76-
sudo cp fsociety "$BIN_DIR"
76+
sudo cp "$INSTALL_DIR/fsociety" "$BIN_DIR"
7777
fi
78-
rm fsociety;
78+
rm "$INSTALL_DIR/fsociety";
7979

8080

8181
if [ -d "$INSTALL_DIR" ] ;

‎update.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
git clone https://github.com/Manisso/fsociety.git
1+
git clone --depth=1 https://github.com/Manisso/fsociety.git
22
sudo chmod +x fsociety/install.sh
33
bash fsociety/install.sh

0 commit comments

Comments
 (0)
Please sign in to comment.