Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lionsec
GitHub Repository: lionsec/xerosploit
Path: blob/master/install.py
517 views
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
import os
4
import sys
5
6
#---------------------------------------------------------------------------#
7
# This file is part of Xerosploit. #
8
# Xerosploit is free software: you can redistribute it and/or modify #
9
# it under the terms of the GNU General Public License as published by #
10
# the Free Software Foundation, either version 3 of the License, or #
11
# (at your option) any later version. #
12
# #
13
# Xerosploit is distributed in the hope that it will be useful, #
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16
# GNU General Public License for more details. #
17
# #
18
# You should have received a copy of the GNU General Public License #
19
# along with Xerosploit. If not, see <http://www.gnu.org/licenses/>. #
20
# #
21
#---------------------------------------------------------------------------#
22
# #
23
# Copyright © 2016 LionSec (www.lionsec.net) #
24
# #
25
#---------------------------------------------------------------------------#
26
27
if not os.geteuid() == 0:
28
sys.exit("""\033[1;91m\n[!] Xerosploit installer must be run as root. ¯\_(ツ)_/¯\n\033[1;m""")
29
30
print(""" \033[1;36m
31
┌══════════════════════════════════════════════════════════════┐
32
█ █
33
█ Xerosploit Installer █
34
█ █
35
└══════════════════════════════════════════════════════════════┘ \033[1;m""")
36
37
def main():
38
39
print("\033[1;34m\n[++] Please choose your operating system.\033[1;m")
40
41
print("""
42
1) Ubuntu / Kali linux / Others
43
2) Parrot OS
44
""")
45
system0 = input(">>> ")
46
if system0 == "1":
47
print("\033[1;34m\n[++] Installing Xerosploit ... \033[1;m")
48
install = os.system("apt-get update && apt-get install -y nmap hping3 build-essential python-pip ruby-dev git libpcap-dev libgmp3-dev && pip install tabulate terminaltables")
49
50
install1 = os.system("""cd tools/bettercap/ && gem build bettercap.* && sudo gem install xettercap-* && rm xettercap-* && cd ../../ && mkdir -p /opt/xerosploit && cp -R tools/ /opt/xerosploit/ && cp xerosploit.py /opt/xerosploit/xerosploit.py && cp banner.py /opt/xerosploit/banner.py && cp run.sh /usr/bin/xerosploit && chmod +x /usr/bin/xerosploit && tput setaf 34; echo "Xerosploit has been sucessfuly instaled. Execute 'xerosploit' in your terminal." """)
51
elif system0 == "2":
52
print("\033[1;34m\n[++] Installing Xerosploit ... \033[1;m")
53
54
bet_un = os.system("apt-get remove bettercap") # Remove bettercap to avoid some problems . Installed by default with apt-get .
55
bet_re_ins = os.system("gem install bettercap") # Reinstall bettercap with gem.
56
57
install = os.system("apt-get update && apt-get install -y nmap hping3 ruby-dev git libpcap-dev libgmp3-dev python-tabulate python-terminaltables")
58
59
install1 = os.system("""cd tools/bettercap/ && gem build bettercap.* && sudo gem install xettercap-* && rm xettercap-* && cd ../../ && mkdir -p /opt/xerosploit && cp -R tools/ /opt/xerosploit/ && cp xerosploit.py /opt/xerosploit/xerosploit.py && cp banner.py /opt/xerosploit/banner.py && cp run.sh /usr/bin/xerosploit && chmod +x /usr/bin/xerosploit && tput setaf 34; echo "Xerosploit has been sucessfuly instaled. Execute 'xerosploit' in your terminal." """)
60
61
62
else:
63
print("Please select the option 1 or 2")
64
main()
65
main()
66
67