def do_tor(self, inp): try: if varis.initip is "": initcheck() if "on" in inp.lower(): p = torpipe(True) if p: print(" [+] Tor > ON") else: varis.tor = False start = input(" [?] Do you want to start the Tor service? (enter if not) :> ") if start is not "": try: os.system("systemctl start tor") print(" [+] Tor service successfully started. Give it some time and run 'tor on' again.") except Exception as e: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Starting Tor service failed:"+"\033[0m"+ color.CURSIVE +"\n{}".format(e) + C) elif "off" in inp.lower(): torpipe(False) stop = input(" [?] Do you want to stop the Tor service? (enter if not) :> ") if stop is not "": try: os.system("systemctl stop tor") print(" [+] Tor service successfully stopped.") except Exception as e: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Stopping Tor service failed:"+"\033[0m"+ color.CURSIVE +"\n{}".format(e) + C) print(" [+] Tor > OFF") else: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Syntax: tor on|off") except: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Tor connection failed: IPcheck service not available.")
def do_tor(self, inp): try: initv = varis.initip == "" acc = False if initv: try: initcheck() acc = True except: acc = False if "on" in inp.lower(): if acc or not initv: p = torpipe(True) if p: print(" [+] Tor > ON") else: varis.tor = False start = input( " [?] Do you want to start the Tor service? (enter if not) :> " ) if start is not "": try: os.system("systemctl start tor") print(" [+] Tor service successfully started.") self.do_tor("on") except Exception as e: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Starting Tor service failed:" + "\033[0m" + color.CURSIVE + "\n{}".format(e) + C) else: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Starting Tor service failed: Initial IP not set." + "\033[0m" + C) elif "off" in inp.lower(): torpipe(False) stop = input( " [?] Do you want to stop the Tor service? (enter if not) :> " ) if stop is not "": try: os.system("systemctl stop tor") print(" [+] Tor service successfully stopped.") except Exception as e: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Stopping Tor service failed:" + "\033[0m" + color.CURSIVE + "\n{}".format(e) + C) print(" [+] Tor > OFF") else: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Syntax: tor on|off") except: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Tor connection failed: IPcheck service not available.")
def do_tor(self, inp, shell=True): try: initv = varis.initip == "" acc = False if initv: try: """ check the initial IP - will be used later to verify that Tor works """ initcheck() acc = True except: acc = False if "on" in inp.lower(): #check if Tor service is running; if not, prompt user to start it if acc or not initv: p = torpipe(True) if p: print(O + " [+] Tor" + C + color.TR3 + C + G + "ON" + C + color.TR2 + C) else: varis.tor = False if shell: start = input( color.END + " [?] Do you want to start the Tor service? (enter if not) :> " ) else: start = "yes" if start != "": try: os.system("systemctl start tor") print( G + " [+] Tor service successfully started." + C + color.TR2 + C) self.do_tor("on") except Exception as e: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Starting Tor service failed:" + "\033[0m" + color.CURSIVE + "\n{}".format(e) + C) else: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Starting Tor service failed: Initial IP not set." + "\033[0m" + C) elif "off" in inp.lower(): torpipe(False) if shell: stop = input( color.END + " [?] Do you want to stop the Tor service? (enter if not) :> " ) else: stop = "yes" if stop != "": try: os.system("systemctl stop tor") print(G + " [+] Tor service successfully stopped." + C + color.TR2 + C) except Exception as e: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Stopping Tor service failed:" + "\033[0m" + color.CURSIVE + "\n{}".format(e) + C) print(O + " [+] Tor" + C + color.TR3 + C + G + "OFF" + C + color.TR2 + C) else: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Syntax: tor on|off") except: print(R + " [-] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Tor connection failed: IPcheck service not available.")
def main(): parser = build_parser() opt = vars(parser.parse_args()) args = parser.parse_args() os.system('clear') if str(platform.system()) != "Linux": sys.exit( R + " [!] " + color.UNDERLINE + "\033[1m" + "You are not using a Linux Based OS! Linux is a must-have for " "this script!" + color.END) if not os.geteuid() == 0: sys.exit(R + " [!] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Must be run as root." + B + " :)" + color.END) if 'no' in open('core/doc/choice').read(): prnt.disclaimer() a1 = input(B + ' [?] Do you agree to these terms and conditions? :> ' + C) if a1.lower().startswith('y'): print(B + ' [+] That\'s awesome! Move on...') time.sleep(3) FILE = open("core/doc/choice", "w") FILE.write('yes') FILE.close() else: print(R + ' [!] ' + "\033[0m" + color.UNDERLINE + "\033[1m" + 'You have to agree!' + color.END) time.sleep(1) sys.exit(0) try: initcheck() except: print(" [!] IPcheck service not available. Skipping...") time.sleep(2.5) if opt["load"] and opt["victim"] and not opt["help"] and not opt["list"]: s = VainShell() if not opt["quiet"]: prnt.banner() prnt.bannerbelownew() if not opt["session"]: s.do_vicadd(args.victim) else: s.do_sessions("load {}".format(args.victim)) s.do_load(args.load) if opt["tor"]: s.do_tor("on") if varis.tor: s.do_attack("") else: s.do_attack("") elif opt["help"]: if not opt["quiet"]: prnt.banner() #prnt.bannerbelownew() parser.print_help() elif opt["list"]: s = VainShell() if not opt["quiet"]: prnt.banner() s.do_list(args.list) elif opt["victim"] and not opt["load"] or opt["load"] and not opt["victim"]: parser.error("'VIC' and 'M' are required for CLI attack.") else: if not opt["quiet"]: prnt.loadstyle() prnt.banner() prnt.bannerbelownew() VainShell().cmdloop() #print(R + "[Vaile] " + "\033[0m" + color.UNDERLINE + "\033[1m" + "Alvida, my friend!" + color.END) print(R + "[Vaile] " + "\033[0m" + color.END + "Alvida, my friend!")