Reputation: 1
im kinda new to coding (know how to write a basic tool), and im having trouble with os.system(""). im using kali linux and im creating a framework but it wont work :( I have tried to use sys.path.insert and then i have writed somthing like
import sys
sys.path.insert(0, '/root/Desktop/jaws/tools')
import Setoolkit
and then it works but as fast as im using if, elif and else it wont work plus im going to use like 10 tools so it wont work with just one. I know it might have something to do with init.py but i have looked on the internet and I dont understand, I have all the tools in a folder and they all look the same like the one above just other names.
this is the code I have wrote so far
import os
import sys
os.system("clear")
print """
[1] Social Engineering Tool Kit
[2] Searchsploit
[3] Medusa (Brute-Force)
[4] MsfConsole
[5] Nmap
[6] Msfvenom
[7] Aircrack-ng (WiFi hacking)
[8] Wireshark
[9] Sqlmap
[10] pico (Python)
[99] Exit JaWs
"""
tool = int(input("======>"))
if tool == '1':
os.system('clear')
os.system('setoolkit')
elif tool == '2':
os.system('clear')
os.system('searchsploit')
elif tool == '3':
os.system('clear')
os.system('SocialFish')
elif tool == '4':
os.system('clear')
os.system('medusa')
elif tool == '5':
os.system('clear')
os.system('msfconsole')
elif tool == '6':
os.system('clear')
os.system('nmap')
elif tool == '8':
os.system('clear')
os.system('msfvenom')
elif tool == '9':
os.system('clear')
os.system('aircrack-ng')
elif tool == '10':
os.system('clear')
os.system('wireshark')
elif tool == '11':
os.system('clear')
os.system('sqlmap')
elif tool == '12':
os.system('clear')
os.system('pico JaWs1.py')
elif tool == '99':
sys.exit()
os.system('clear')
else:
print("something want wrong!")
and when i run it the and I enter like 1 the only thing that comes up is the something went wrong.
I would love to get some help but if it takes to much time of yours you dont need to. Im using python 2.7 //Anton
Upvotes: 0
Views: 81
Reputation: 10107
You've assigned tool
with type int
:
tool = int(input("======>"))
while comparing it with those str like '1'
, '2'
, '3'
...etc.
Upvotes: 2