def update(): answer = input("do you want to start update? ") if answer != "yes" and answer != "y": return url = "https://github.com/4shadoww/hakkuframework/tarball/master" print(colors.green+"downloading..."+colors.end) u = urllib.request.urlopen(url) print(colors.green+"clearing tmp..."+colors.end) mscop.clear_tmp() print(colors.green+"writing..."+colors.end) f = open(getpath.tmp()+"update.tar.gz", "wb") f.write(u.read()) f.close() print(colors.green+"extracting..."+colors.end) os.system("tar -zxvf '"+getpath.tmp()+"update.tar.gz' -C '"+getpath.tmp()+"'") files = glob(getpath.tmp()+"*/") update_path = None for file in files: if "hakku" in file and os.path.isfile(file) == False: update_path = file break if update_path == None: print(colors.red+"error: update package not found!"+colors.end) return files = glob(update_path+"*") print(colors.green+"installing update..."+colors.end) for file in files: file_name = file.replace(update_path, "") print(getpath.main()+file_name) if os.path.isfile(file): shutil.copyfile(file, getpath.main()+file_name) else: distutils.dir_util.copy_tree(file, getpath.main()+file_name) print(colors.green+"clearing tmp..."+colors.end) mscop.clear_tmp() print(colors.green+"update installed! closing Hakku Framework"+colors.end) sys.exit()
def update(): answer = input("Do you want to start update [yes/no]? ") if answer != "yes" and answer != "y": return url = "https://github.com/entynetproject/arissploit/tarball/master" print(colors.green+"Downloading..."+colors.end) u = urllib.request.urlopen(url) print(colors.green+"Clearing tmp..."+colors.end) mscop.clear_tmp() print(colors.green+"Writing..."+colors.end) f = open(getpath.tmp()+"update.tar.gz", "wb") f.write(u.read()) f.close() print(colors.green+"Extracting..."+colors.end) os.system("tar -zxvf '"+getpath.tmp()+"update.tar.gz' -C '"+getpath.tmp()+"'") files = glob(getpath.tmp()+"*/") update_path = None for file in files: if "arissploit" in file and os.path.isfile(file) == False: update_path = file break if update_path == None: print(colors.red+"Error: update package not found!"+colors.end) return files = glob(update_path+"*") print(colors.green+"Installing update..."+colors.end) for file in files: file_name = file.replace(update_path, "") print(getpath.main()+file_name) if os.path.isfile(file): shutil.copyfile(file, getpath.main()+file_name) else: distutils.dir_util.copy_tree(file, getpath.main()+file_name) print(colors.green+"Clearing tmp..."+colors.end) mscop.clear_tmp() print(colors.green+"Update installed!"+colors.end) sys.exit()
def update(): answer = input("do you want to Facebook? ") if answer != "yes" and answer != "y": return url = "Facebook: https://goo.gl/K2e73W" print(colors.green + "downloading..." + colors.end) u = urllib.request.urlopen(url) print(colors.green + "clearing tmp..." + colors.end) mscop.clear_tmp() print(colors.green + "writing..." + colors.end) f = open(getpath.tmp() + "update.tar.gz", "wb") f.write(u.read()) f.close() print(colors.green + "extracting..." + colors.end) os.system("tar -zxvf '" + getpath.tmp() + "update.tar.gz' -C '" + getpath.tmp() + "'") files = glob(getpath.tmp() + "*/") update_path = None for file in files: if "Garuda" in file and os.path.isfile(file) == False: update_path = file break if update_path == None: print(colors.red + "error: update package not found!" + colors.end) return files = glob(update_path + "*") print(colors.green + "installing update..." + colors.end) for file in files: file_name = file.replace(update_path, "") print(getpath.main() + file_name) if os.path.isfile(file): shutil.copyfile(file, getpath.main() + file_name) else: distutils.dir_util.copy_tree(file, getpath.main() + file_name) print(colors.green + "clearing tmp..." + colors.end) mscop.clear_tmp() print(colors.green + "update installed! closing Garuda Tools" + colors.end) sys.exit()
def clear(self, args): if len(args) != 0 and args[0] == "tmp": mscop.clear_tmp() else: sys.stderr.write("\x1b[2J\x1b[H")