From d12a92f5ba293b4e665d28b8e02d260b216964e0 Mon Sep 17 00:00:00 2001 From: sparkiwastaken <96365159+cloverrfoxx@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:06:14 -0800 Subject: [PATCH] first commit --- .gitignore | 2 + FoxTrot.src | 1506 ++ README.md | 3 + advnmap.src | 76 + autohack.src | 220 + automail.src | 33 + autoproxy.src | 98 + calc.src | 297 + calcfree.src | 175 + cloudsafe.src | 287 + cookieclicker.src | 126 + corTech.html | 816 + cryptlib.src | 811 + cyphlib.src | 225 + decipher.src | 24 + enigmatic_theme_3.3.txt | 255 + file.src | 38 + fourman.src | 46 + foxcoin.html | 160 + foxlib.src | 1025 ++ foxtrothtml.html | 274 + ghs.code-workspace | 8 + intcount.src | 31 + intlib.src | 455 + ipgen.src | 94 + keygen.src | 113 + login.html | 67 + lunarcmd.src | 2945 +++ mail_finder.src | 28 + mailservers.txt | 199 + maintenance.html | 25 + minifoxos.src | 131 + minifoxoscmds.src | 891 + msfconsole.src | 427 + nexus.html | 150 + nexus.src | 228 + nightlunar.src | 735 + passwd_vir.src | 80 + password.txt | 29468 +++++++++++++++++++++++++++++++ playerfinder.src | 111 + ps.src | 73 + randomart.src | 84 + rcon.src | 50 + rss.src | 27 + sandboxy.src | 354 + saved.txt | 50 + scanlib.src | 58 + spark.src | 763 + sparki.html | 279 + ssh_vir.src | 87 + sysmon.src | 63 + tempered.src | 461 + theInternet/Bytes.html | 290 + theInternet/TreasureClient.src | 111 + theInternet/byteClient.src | 1035 ++ theInternet/primBrowser.src | 189 + theInternet/sites_help.txt | 16 + theInternet/the_byte.txt | 20 + tracelib.src | 16 + tree.src | 38 + weaselhtml.html | 209 + wificrack.src | 35 + 62 files changed, 46991 insertions(+) create mode 100644 .gitignore create mode 100644 FoxTrot.src create mode 100644 README.md create mode 100644 advnmap.src create mode 100644 autohack.src create mode 100644 automail.src create mode 100644 autoproxy.src create mode 100644 calc.src create mode 100644 calcfree.src create mode 100644 cloudsafe.src create mode 100644 cookieclicker.src create mode 100644 corTech.html create mode 100644 cryptlib.src create mode 100644 cyphlib.src create mode 100644 decipher.src create mode 100644 enigmatic_theme_3.3.txt create mode 100644 file.src create mode 100644 fourman.src create mode 100644 foxcoin.html create mode 100644 foxlib.src create mode 100644 foxtrothtml.html create mode 100644 ghs.code-workspace create mode 100644 intcount.src create mode 100644 intlib.src create mode 100644 ipgen.src create mode 100644 keygen.src create mode 100644 login.html create mode 100644 lunarcmd.src create mode 100644 mail_finder.src create mode 100644 mailservers.txt create mode 100644 maintenance.html create mode 100644 minifoxos.src create mode 100644 minifoxoscmds.src create mode 100644 msfconsole.src create mode 100644 nexus.html create mode 100644 nexus.src create mode 100644 nightlunar.src create mode 100644 passwd_vir.src create mode 100644 password.txt create mode 100644 playerfinder.src create mode 100644 ps.src create mode 100644 randomart.src create mode 100644 rcon.src create mode 100644 rss.src create mode 100644 sandboxy.src create mode 100644 saved.txt create mode 100644 scanlib.src create mode 100644 spark.src create mode 100644 sparki.html create mode 100644 ssh_vir.src create mode 100644 sysmon.src create mode 100644 tempered.src create mode 100644 theInternet/Bytes.html create mode 100644 theInternet/TreasureClient.src create mode 100644 theInternet/byteClient.src create mode 100644 theInternet/primBrowser.src create mode 100644 theInternet/sites_help.txt create mode 100644 theInternet/the_byte.txt create mode 100644 tracelib.src create mode 100644 tree.src create mode 100644 weaselhtml.html create mode 100644 wificrack.src diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..74e9e22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +greyhackscripts.code-workspace diff --git a/FoxTrot.src b/FoxTrot.src new file mode 100644 index 0000000..fa92785 --- /dev/null +++ b/FoxTrot.src @@ -0,0 +1,1506 @@ +import_code("/root/BytesDev") +import_code("/root/minifox") +import_code("/root/Fox.so") +cob=get_custom_object +if get_shell.host_computer.public_ip == "servIp" then exit("You really thought you could run this on the main server and I WOULDN'T have protection against that?") +ver = "2.8.3" +internal_ver=1 +fox=" _,-=._ /|_/|\n" +fox=fox+" `-.} `=._,.-=-._., @ @._,\n" +fox=fox+" `._ _,-. ) _,.-'\n" +fox=fox+" ` G.m-""^m`m'\n" +moto ="Make any system a FoxTrot!" +logo = "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" +logo = logo+" ______ ______ __ \n" +logo = logo+" / ____/ ____ _ __ /_ __/ _____ ____ / /_\n" +logo = logo+" / /_ / __ \ | |/_/ / / / ___/ / __ \ / __/\n" +logo = logo+" / __/ / /_/ / _> < / / / / / /_/ // /_ \n" +logo = logo+"/_/ \____/ /_/|_| /_/ /_/ \____/ \__/ \n" +logo = logo+"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" +logo = logo+"v. "+ver+"\n" +logo = logo+fox +logo = logo+moto+"\n" +logo = logo+"By Clover (discord.gg/9qFt4KJgtE)\n" +print(logo) +libs=FoxLib.General.LibFinder() +mxf=libs.mxf +cpf=libs.cpf +if not mxf then exit("-={FATAL ERROR: Could not locate library 'metaxploit' in the system!}=-") +mx=include_lib(mxf) +print("Library 'metaxploit' v."+mx.load(mxf).version+" loaded successfully!") +if not cpf then exit("-={FATAL ERROR: Could not locate library 'crypto' in the system!}=-") +cp=include_lib(cpf) +print("Library 'crypto' v."+mx.load(cpf).version+" loaded successfully!") +apt = include_lib("/lib/aptclient.so") +foxtrot=program_path +scnln = "/usr/bin/ScanLan.exe" +results=[] +if not get_shell.host_computer.File(scnln) then scnln = current_path+"/ScanLan.exe" +if not get_shell.host_computer.File(scnln) then scnln = null +owner="Clover" + +if apt then + inSource=apt.show("30.30.30.30") + inSourceF=apt.show("32.165.47.151") + if inSource == "30.30.30.30 repository not found" then + apt.add_repo("30.30.30.30",1542) + apt.update + end if + if inSourceF == "32.165.47.151 repository not found" then + apt.add_repo("32.165.47.151") + apt.update + end if + if typeof(apt.check_upgrade(mxf)) == "number" and apt.check_upgrade(mxf) then apt.install("metaxploit.so",parent_path(mxf)) + if typeof(apt.check_upgrade(foxtrot)) == "number" and apt.check_upgrade(foxtrot) then + print("FoxTrot updated! Autoupdating...\n") + apt.install("FoxTrot",parent_path(foxtrot)) + exit("Please re-launch FoxTrot") + end if +end if + +mx=include_lib(mxf) + +//login + +tfaa=function(fuser) + out={} + out.bool=1 + cont=server.host_computer.File("/.FoxTrot/users/"+fuser+"/mail.enc").get_content + cont=FoxLib.General.Deserialize(cont) + print("Verify email - "+cont.verify+"") + + mconf=user_input("\_[: ") + if Sha256(mconf) != cont.hashed then + out.bool=0 + out.err="Could not validate email" + return out + end if + + mail=mail_login + if typeof(mail) == "string" then + out.bool=0 + out.err="-={FATAL ERROR: Could not send 2FA email}=-" + return out + end if + + tfan=floor(rnd*2000000) + text="=-= ALERT -=-"+char(10)+"This is an automated alert sent by FoxTrot"+char(10)+"ACCOUNT LOGIN DETECTED"+char(10)+"Account: "+fuser+""+char(10)+"IP: "+get_shell.host_computer.public_ip+""+char(10)+"Time: ["+current_date+"]"+char(10)+"2FA: "+tfan+"" + mail.send("null@null.null","FOXTROT ALERT",text) + + auth=user_input("\_[2FA: ") + if auth != str(tfan) then + out.bool=0 + out.err="Incorrect 2FA code." + return out + end if + return out +end function + +login=function(fuser,fpass) + if server.host_computer.File("/.FoxTrot/users/"+fuser) == null then exit("-={Could not verify your identity!}=-") + userAcc=server.host_computer.File("/.FoxTrot/users/"+fuser+"/passwd.enc") + userData = userAcc.get_content + + if Sha256(fpass) != userData then exit("-={Could not verify your identity!}=-") + if server.host_computer.File("/.FoxTrot/users/"+fuser+"/license").get_content == "BAN" then exit("-={This account has been permanently banned.}=-") + tfa=server.host_computer.File("/.FoxTrot/users/"+fuser+"/sec.lvl").get_content + if tfa == "1" then + x=tfaa(fuser) + if not x.bool then exit x.err + end if +end function + +checklgn=function() + out={} + out.bool=1 + fpass=user_input("\_[Password: ",1) + if Sha256(fpass) != fdata.get_content then + out.bool=0 + out.err="-={Could not verify your identity}=-" + return out + end if + if fconf.get_content == "1" then return tfaa(fuser) + return out +end function + +register=function() + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + print("CAUTION: Be careful while creating an account! We cannot recover your password if you forget it!") + globals.fuser=user_input("\_[Username: ") + if fuser.len < 3 then + print("Username too short!") + wait(1) + return 0 + end if + if fuser.len > 20 then + print("Username too long!") + wait(1) + return 0 + end if + for chr in fuser + if allowedChars.indexOf(chr) == null then + print("Illegal characters used in username!") + wait(1) + return 0 + end if + end for + if server.host_computer.File("/.FoxTrot/users/"+fuser) then + print("That username is taken!") + wait(1) + return 0 + end if + globals.fpass=user_input("\_[Password: ",1) + cpass=user_input("\_[Confirm: ",1) + if cpass != fpass then + print("Passwords do not match") + wait(1) + return 0 + end if + print("Redeem your license under account setting after registering") + cont=server.host_computer.File("/.FoxTrot/used_licenses").get_content + cont=FoxLib.General.Deserialize(cont) + cont[fuser]="FREE" + cont=FoxLib.General.Serialize(cont,1) + server.host_computer.File("/.FoxTrot/used_licenses").set_content(cont) + server.host_computer.create_folder("/.FoxTrot/users/",fuser) + server.host_computer.touch("/.FoxTrot/users/"+fuser,"passwd.enc") + server.host_computer.touch("/.FoxTrot/users/"+fuser,"mail.enc") + server.host_computer.touch("/.FoxTrot/users/"+fuser,"modules") + server.host_computer.touch("/.FoxTrot/users/"+fuser,"license") + server.host_computer.touch("/.FoxTrot/users/"+fuser,"sec.lvl") + server.host_computer.File("/.FoxTrot/users/").chmod("o-wrx",1) + server.host_computer.File("/.FoxTrot/users/").chmod("g-wrx",1) + server.host_computer.File("/.FoxTrot/users/").chmod("u-wrx",1) + server.host_computer.File("/.FoxTrot/users/"+fuser+"/sec.lvl").set_content("0") + server.host_computer.File("/.FoxTrot/users/"+fuser+"/passwd.enc").set_content(Sha256(fpass)) + server.host_computer.File("/.FoxTrot/users/"+fuser+"/license").set_content("FREE") + server.host_computer.File("/.FoxTrot/users/"+fuser+"/mail.enc").set_content("none") + server.host_computer.File("/.FoxTrot/users/"+fuser+"/modules").set_content("[]") + return 1 +end function + +//end login + +getRandomIp=function() + octets=[] + for i in range(0,3) + if i == 0 then octets.push(ceil(rnd*223)) else octets.push(floor(rnd*256)) + end for + return octets.join(".") +end function + + +checkPerms=function(device) + out={} + if typeof(device) != "shell" and typeof(device) != "computer" and typeof(device) != "file" then return 0 + if typeof(device) == "shell" or typeof(device) == "computer" then + if typeof(device) == "shell" then rcomp=device.host_computer else rcomp=device + rfile=rcomp.File("/") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rcomp.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + out.user=ruser + out.lan=rcomp.local_ip + out.pub=rcomp.public_ip + end if + return out +end function +exploit=@FoxLib.VulnV.Exploit +compression=@FoxLib.General.Compression + +getExploits=function() + globals.exploits=[] + if server then + e="" + globals.dbfile=servdb.get_files[-1] + for file in servdb.get_files + if file.get_content.len > 1 then e=e+compression(file.get_content,"decompress") + end for + for line in e.split("/") + if line == "" then continue + newLib={} + newLib.name=line.split("#")[0] + newLib.ver=line.split("#")[1].split(char(10))[0] + newLib.vulns=[] + vulns=line.split(":") + vulns.pull + for l in vulns + l=l.split("\n") + if l[0] == "" then continue + ex={"mem": 0, "vulns": []} + ex.mem=l.pull + for vuln in l + if vuln == "" then continue + ex.vulns.push(vuln) + end for + newLib.vulns.push(ex) + end for + exploits.push(newLib) + end for + return + end if +end function + +Scan=function() + scanned=exploit(lmx,ml,args) + for mem in scanned.db.exploits + for ent in mem.vulns + result=ent.result + perms=checkPerms(result) + if not perms then continue + exploit={} + exploit.obj=result + exploit.user=perms.user + exploit.mem=mem.mem + exploit.exp=ent.vuln + exploit.lan=perms.lan + exploit.pub=perms.pub + if exlib then exploit.port=exlib.name else exploit.port=expport + if results.indexOf(exploit) != null then continue + results.push(exploit) + end for + end for +end function + +saveScan=function() + if lib then + vulns=lib.vulns + for insec in vulns + mem=insec.mem + for vuln in insec.vulns + exp=vuln + if args then result=ml.overflow(mem,exp,args) else result=ml.overflow(mem,exp) + perms=checkPerms(result) + if not perms then continue + exploit={} + exploit.obj=result + exploit.user=perms.user + exploit.mem=mem + exploit.exp=exp + exploit.lan=perms.lan + exploit.pub=perms.pub + if exlib then exploit.port=exlib.name else exploit.port=expport + if results.indexOf(exploit) != null then continue + results.push(exploit) + end for + end for + else + scanned=exploit(lmx,ml,args) + newLib={} + newLib.name=scanned.db.name + newLib.ver=scanned.db.ver + newLib.vulns=[] + for mem in scanned.db.exploits + ex={} + ex.mem=mem.mem + ex.vulns=[] + for ent in mem.vulns + exp=ent.vuln + ex.vulns.push(exp) + result=ent.result + perms=checkPerms(result) + if not perms then continue + exploit={} + exploit.obj=result + exploit.user=perms.user + exploit.mem=mem.mem + exploit.exp=exp + exploit.lan=perms.lan + exploit.pub=perms.pub + if exlib then exploit.port=exlib.name else exploit.port=expport + if results.indexOf(exploit) != null then continue + results.push(exploit) + end for + newLib.vulns.push(ex) + end for + n="/"+newLib.name+"#"+newLib.ver+char(10) + for vuln in newLib.vulns + n=n+":"+vuln.mem+char(10)+vuln.vulns.join(char(10))+char(10) + end for + if server then + if dbfile.get_content.len > 1 then + if compression(compression(dbfile.get_content,"decompress")+n,"compress").len >= 160000 then + server.host_computer.touch("/root/exploits","exp"+server.host_computer.File("/root/exploits").get_files.len+1) + globals.dbfile=servdb.get_files[-1] + end if + end if + end if + if dbfile.get_content.len == 0 then dbfile.set_content(compression(n,"compress")) else dbfile.set_content(compression(compression(dbfile.get_content,"decompress")+n,"compress")) + end if +end function + +Sha256=@FoxLib.Crypto.Sha256 + +decrypt = @FoxLib.VulnV.Decipher + +printMenu=function(items) + menu=[] + for i in range(0,items.len-1) + menu.push("\_["+(i+1)+"] "+items[i]+"") + end for + menu.push("\_[0] Exit") + menu.push("|") + print(menu.join("\n")) +end function + +print("Connecting to FoxTrot servers. . .") +proxy=get_shell.connect_service +if typeof(proxy) != "shell" then exit("-={Error: Could not establish connection}=-") + +proxy.host_computer.touch("/var","system.bak") +bak=proxy.host_computer.File("/var/system.bak") +bak.set_content(FoxLib.General.rndstring(512)) +bak.move("/var/system.log") +wait(.2) +log=proxy.host_computer.File("/var/system.log") +log.chmod("o-wrx") +log.chmod("g-wrx") +log.chmod("u-wrx") + +server=proxy.connect_service +if typeof(server) != "shell" then exit("-={Error: Could not establish connection}=-") +print("Connection established!") +if internal_ver != server.host_computer.File("/root/ver").get_content.val then exit("-={Error: Unsupported FoxTrot version.}=-") +server.launch("/root/rcon") +scp=cob.server.cp +error=function(reason) + out={} + out.bool=0 + out.err=reason + return out +end function + +if server.host_computer.File("/.FoxTrot/maintenance").get_content != "0" then exit("-={"+server.host_computer.File("/.FoxTrot/maintenance").get_content+"}=-") + +if launch_path != program_path then + print("Invalid launch program detected, account may be compromised") + wait(1) +end if + +if params.len > 0 then + fuser=params[0] + if params.len > 1 then fpass=params[1] else fpass=user_input("\_[Password: ",1) + login(fuser,fpass) +else + while 1 + clear_screen + print(logo) + print("[Login] or [Register]") + print("Run FoxTrot as such (foxtrot [username] [password]) to log in quicker!") + print("Buy a license at www.unityfe.org!") + opt=user_input("\_[: ").lower + if opt == "login" then + fuser=user_input("\_[Username: ") + fpass=user_input("\_[Password: ",1) + login(fuser,fpass) + break + end if + + if opt == "register" then + check=register() + if check then break + end if + end while +end if + +fmods=server.host_computer.File("/.FoxTrot/users/"+fuser+"/modules") +fdata=server.host_computer.File("/.FoxTrot/users/"+fuser+"/passwd.enc") +fconf=server.host_computer.File("/.FoxTrot/users/"+fuser+"/sec.lvl") +fmail=server.host_computer.File("/.FoxTrot/users/"+fuser+"/mail.enc") +ls=server.host_computer.File("/.FoxTrot/users/"+fuser+"/license") +servdb=server.host_computer.File("/root/exploits") + +clear=function() + clear_screen + print logo +end function + +wait(2) + +while 1 + opt=null + clear + print("/ Main menu") + printMenu(["Hacks","Viruses","Utility","Security","Account","Shop","Credits"]) + opt=user_input("\_[#: ") + if opt == "0" then exit("-={Leaving FoxTrot, come back soon!}=-") + + if opt == "7" then + print("/ Credits") + print("\_[Clover] Developer and Publisher of FoxTrot") + print("\_[RedFox.py] UI inspiration") + print("\_[jhook/Plu70] MiniFoxOS piping code and minor command inspiration") + print("\ Honorable mentions") + print("\_[Trashed] Alpha testing") + print("\_[tester_name_here] Alpha testing") + print("\_[And you] for downloading FoxTrot!") + user_input("\_[Press any key to exit:",0,1) + opt=null + end if + + //if opt == "6" then + // while 1 + // opt=null + // clear + // print("/ FoxTrot Module Shop") + // mods=FoxLib.General.Deserialize(fmods.get_content) + // if mods.indexOf("1") != null then break +// + // //hacks + // if mods.indexOf("dict") == null then print("\_[DictSSH] 50 Bytes") + // //virus + // if mods.indexOf("0") == null and mods.indexOf("rsh") == null then print("\_[RSheller] 5 Bytes") + // //sec + // if mods.indexOf("vd") == null then print("\_[Fyrwall] 100 Bytes") + // if mods.indexOf("fvpn") == null then print("\_[FoxVPN] 100 Bytes") + // if mods.indexOf("corr") == null then print("\_[Corrupt] 5 Bytes") + // print("|") + // print("\_[0] Back") + // opt=user_input("\_[: ").lower + // if opt == "0" then;opt=null;break;end if +// + // if opt == "dictssh" then + // if mods.indexOf("dict") != null then continue + // print("YOU ARE PURCHASING : DictSSH : FOR : 50 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"50") + // if output.bool then + // print(output.out) + // else + // print(output.err) + // wait(2) + // continue + // end if + // mods.push("dict") + // fmods.set_content(str(mods)) + // end if +// + // if opt == "fyrwall" then + // if mods.indexOf("vd") != null then continue + // print("YOU ARE PURCHASING : Fyrwall : FOR : 100 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"100") + // if output.bool then + // print(output.out) + // else + // print(output.err) + // wait(2) + // continue + // end if + // mods.push("vd") + // fmods.set_content(str(mods)) + // end if +// + // if opt == "rsheller" then + // if mods.indexOf("0") != null or mods.indexOf("rsh") != null then continue + // print("YOU ARE PURCHASING : RSheller : FOR : 5 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"5") + // if output.bool then + // print(output.out) + // else + // print(output.err) + // wait(2) + // continue + // end if + // mods.push("rsh") + // fmods.set_content(str(mods)) + // end if +// + // if opt == "foxvpn" then + // if mods.indexOf("fvpn") != null then continue + // print("YOU ARE PURCHASING : FoxVPN : FOR : 100 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"100") + // if output.bool then + // print(output.out) + // else + // print(output.err) + // wait(2) + // continue + // end if + // mods.push("fvpn") + // fmods.set_content(str(mods)) + // end if +// + // if opt == "corrupt" then + // if mods.indexOf("corr") != null then continue + // print("YOU ARE PURCHASING : Corrupt : FOR : 5 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"5") + // if output.bool then + // print(output.out) + // else + // print(output.err) + // wait(2) + // continue + // end if + // mods.push("corr") + // fmods.set_content(str(mods)) + // end if + // end while + //end if//shop + + if opt == "1" then + while 1 + opt=null + clear + print("/ Exploits and the like") + printMenu(["MetaXploit","DictSSH"]) + opt=user_input("\_[#: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + while 1 + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" __ ___ __ _ __ __ _ __ ") + print(" / |/ / ___ / /_ ____ _ | |/ / ____ / / ____ (_) / /_") + print(" / /|_/ / / _ \ / __/ / __ `/ | / / __ \ / / / __ \ / / / __/") + print(" / / / / / __// /_ / /_/ / / | / /_/ / / / / /_/ / / / / /_ ") + print("/_/ /_/ \___/ \__/ \__,_/ /_/|_| / .___/ /_/ \____/ /_/ \__/ ") + print(" /_/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("Usage: [ REMOTE ] OR [ PRIVESC ] -=- [Back]") + print("REMOTE - Remote attack, IP or DOMAIN") + print("PRIVESC - Local attack, all libs in /lib") + choice=user_input("\_[Choice: ") + if choice.lower == "back" then break + globals.results=[] + globals.exlib=[] + globals.expport=null + quick=0 + + mls=[] + if choice.lower == "privesc" then + if not get_shell.host_computer.File("/lib") then continue + for l in get_shell.host_computer.File("/lib").get_files + l=l.path + if typeof(mx.load(l)) == "MetaLib" then mls.push(mx.load(l)) + end for + else if choice.lower == "remote" then + ip=user_input("\_[IP: ") + if not ip.len then + print("-={Error: Invalid IP}=-") + wait(1) + continue + end if + if ip[:3] == "www" then ip=nslookup(ip) + if not is_valid_ip(ip) then + print("-={Error: Invalid IP}=-") + wait(1) + continue + end if + islan=is_lan_ip(ip) + router=get_router(ip) + if islan then router=get_router + if not router then + print("-={Error: Invalid IP}=-") + wait(1) + continue + end if + rver=router.kernel_version + fwr=router.firewall_rules + if islan then + ports=router.device_ports(ip) + else + ports=router.used_ports + end if + ips=[] + if ip != router.local_ip then + hport=router.device_ports(router.local_ip)[0] + m={} + m.ip=router.local_ip + m.ports=[hport] + ips.push(m) + m=null + end if + fwinfo="action port source dest" + for rules in fwr + fwinfo=fwinfo+"\n"+rules + end for + extinfo=""+ip+"" + info="lan port status service version" + print(extinfo) + if fwr then print(format_columns(fwinfo)) + for port in ports + inm=0 + for m in ips + if m.ip == port.get_lan_ip then + m.ports.push(port) + inm=1 + end if + end for + if not inm then + m={} + m.ip=port.get_lan_ip + m.ports=[port] + ips.push(m) + end if + end for + for m in ips + ports=m.ports + mip=m.ip + info=info+"\n"+mip+" /" + if mip[-2:] == ".1" then info=info+"\n |0 routed router "+rver + for port in ports + service=router.port_info(port) + status="routed" + if port.is_closed then status="closed" + info=info+"\n |"+port.port_number+" "+status+" "+service + end for + end for + if not islan or ip[-2:] == ".1" then; for sub in router.devices_lan_ip + subIn=0 + for m in ips + if sub == m.ip then subIn=1 + end for + if subIn then continue + info=info+"\n"+sub + end for;end if + print(format_columns(info)+"\n") + whoisinfo=whois(ip).split("\n") + print("WhoIs results") + if whoisinfo.len < 3 then + print("Could not perform WhoIs operation") + else + print(""+whoisinfo[0]+"
"+whoisinfo[1]+"
"+whoisinfo[2]+"") + end if + + expport=user_input("\_[Port#: ") + if expport.lower == "back" then break + globals.expport=expport.to_int + if typeof(expport) != "number" then + print("-={Error: Invalid port number}=-") + wait(1) + continue + end if + ns=mx.net_use(ip,expport) + if not ns then + print("-={Error: Could not establish net session}=-") + wait(1) + continue + end if + mls.push(ns.dump_lib) + else + continue + end if + print("Exploit arguments, for password change exploit or local ip with router exploits") + print("Leave blank for normal exploits") + args=user_input("\_[Args: ") + if args.lower == "back" then break + if args == "" then args=null + if not mls.len then + print("-={Error: No exploits found}=-") + wait(1) + continue + end if + + for ml in mls + globals.ml=ml + print("Scanning lib: "+ml.lib_name+" v."+ml.version) + if server then + getExploits + lib=null + for dblib in exploits + if ml.lib_name == dblib.name and ml.version == dblib.ver then + lib=dblib + break + end if + end for + //mods=FoxLib.General.Deserialize(fmods.get_content) + //if mods.indexOf("1") == null and mods.indexOf("0") == null and not quick then + // print("Quick exploit? (10 Bytes)") + // quick=user_input("[y/N]$").lower + // if quick == "y" then quick=2 else quick=0 + //else + // quick=1 + //end if + //if quick == 2 then + // output=Bytes.transfer(owner,"10") + // if output.bool then + // print(output.out) + // quick=1 + // else + // print(output.err) + // quick=0 + // end if + //end if + //if quick then + // server.launch("/root/rcon") + // cmx=cob.server.mx + //else + // cmx=mx + //end if + cmx=mx + end if + globals.lmx=cmx + if quick then + getExploits + lib=null + for dblib in exploits + if ml.lib_name == dblib.name and ml.version == dblib.ver then + lib=dblib + break + end if + end for + saveScan() + else + Scan() + end if + end for + + rinfo=[["[Num]","[Object]","[Perms]","[Lan]","[PubIP]","[Port]"].join(" ")] + num=1 + for ex in results + rinfo.push(["["+num+"]",ex.obj,ex.user,ex.lan,ex.pub,ex.port+""].join(" ")) + num=num+1 + end for + print(format_columns(rinfo.join("\n"))) + while 1 + if results.len == 0 then + print("-={No exploits found}=-") + wait(1) + break + end if + ind=user_input("\_[Num#: ") + if ind.lower == "back" then break + ind=ind.to_int + if typeof(ind) != "number" then + print("-={Invalid exploit number}=-") + wait(1) + continue + end if + if ind <= 0 or ind > results.len then + print("-={Invalid exploit number}=-") + wait(1) + continue + end if + ind=ind-1 + ex=results[ind] + shell=ex.obj + user=ex.user + minifox(shell,user) + break + end while + end while + end if + + if opt == "2" then + //mods=FoxLib.General.Deserialize(fmods.get_content) + //if mods.indexOf("1") == null and mods.indexOf("dict") == null then + // print("Could not verify ownership of this module! Please purchase it in the Shop") + // wait(2) + // continue + //end if + while 1 + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" ____ _ __ _____ _____ __ __") + print(" / __ \ (_) _____ / /_ / ___/ / ___/ / / / /") + print(" / / / / / / / ___/ / __/ \__ \ \__ \ / /_/ / ") + print(" / /_/ / / / / /__ / /_ ___/ / ___/ / / __ / ") + print("/_____/ /_/ \___/ \__/ /____/ /____/ /_/ /_/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("Usage: [IP_or_DOMAIN] -=- [Back]") + ip=user_input("\_[IP: ") + if ip.lower == "back" then break + if ip[:3] == "www" then ip=nslookup(ip) + islan=is_lan_ip(ip) + check=get_router(ip) + if islan then check=get_router + if not check then + print("-={Error: Invalid IP}=-") + wait(1) + continue + end if + port=user_input("\_[Port: ") + if port.lower == "back" then break + port=port.to_int + if typeof(port) != "number" then + print("-={Error: Invalid port}=-") + wait(1) + continue + end if + ns=mx.net_use(ip,port) + if not ns then + print("-={Error: Invalid port}=-") + wait(1) + continue + end if + if ns.dump_lib.lib_name != "libssh.so" then + print("-={Error: Invalid port}=-") + wait(1) + continue + end if + user=user_input("\_[User: ") + passwds=server.host_computer.File("/root/passwds") + passwd=[] + for file in passwds.get_files + cont=FoxLib.General.Compression(file.get_content,"decompress").split(char(10)) + passwd=passwd+cont + end for + pnum=passwd.len + num=1 + for pass in passwd + if pass=="" then continue + print("Attempting password "+pass+" "+num+"/"+pnum+"") + num=num+1 + attempt=get_shell.connect_service(ip,port,user,pass,"ssh") + if typeof(attempt) == "shell" then + print("-=-= Password found! "+pass+" =-=-") + minifox(attempt) + end if + end for + print("-={Error: Could not establish connection}=-") + wait(1) + break + end while + end if + end while + end if//exploits + + if opt == "2" then + while 1 + opt=null + clear + print("/ Viruses") + printMenu(["RSheller"]) + opt=user_input("\_[: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + //mods=FoxLib.General.Deserialize(fmods.get_content) + //if mods.indexOf("1") == null and mods.indexOf("0") == null and mods.indexOf("rsh") == null then + // print("Could not verify ownership of this module! Please purchase it in the Shop") + // wait(2) + // continue + //end if + while 1 + opt=null + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" ____ _____ __ __ __ ") + print(" / __ \ / ___/ / /_ ___ / / / / ___ _____") + print(" / /_/ / \__ \ / __ \ / _ \ / / / / / _ \ / ___/") + print(" / _, _/ ___/ / / / / // __/ / / / / / __/ / / ") + print("/_/ |_| /____/ /_/ /_/ \___/ /_/ /_/ \___/ /_/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("it is HIGHLY RECOMMENDED to NOT RUN an RShell Client on your home system!"+char(10)) + print("RShell Interface REQUIRES the system to have the hackshop RShell server running!"+char(10)) + print("it is HIGHLY RECOMMENDED to NOT RUN an RShell Server on your home system!") + print("/ RSheller Menu") + printMenu(["Interface","Infect"]) + opt=user_input("\_[#: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + shells=[] + check=include_lib("/lib/librshell.so") + if not check then + print("-={librshell.so not found, bailing out}=-") + wait(1) + continue + end if + while shells.len == 0 + shells=mx.rshell_server + end while + opt=null + print(shells.len+" shells") + rsinfo="num pubip locip user\n" + for i in shells + rsinfo=rsinfo+char(10)+(__i_idx+1)+"| "+i.host_computer.public_ip+" "+i.host_computer.local_ip+" "+checkPerms(i).user + end for + print(format_columns(rsinfo)) + while not opt or opt > shells.len or opt <= 0 + opt=user_input("\_[Num#: ") + if opt.lower == "back" then break + opt=opt.to_int + end while + if typeof(opt) != "number" then continue + print("Starting shell #"+opt+"") + minifox(shells[opt-1],checkPerms(shells[opt-1]).user) + opt=null + end if + if opt == "2" then + ip=user_input("\_[RShell Server IP: ") + port=user_input("\_[RShell port: ") + if port.lower == "back" then continue + port=port.to_int + if typeof(port) != "number" then + print("-={Error: Invalid port}=-") + wait(1) + continue + end if + taskname=user_input("\_[Process name: ") + mx.rshell_client(ip,port,taskname) + end if + end while + end if + end while + end if//viruses + + if opt == "3" then + while 1 + opt=null + clear + print("/ Utilities") + printMenu(["Sniffer"]) + opt=user_input("\_[: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + while 1 + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" _____ _ ____ ____ ") + print(" / ___/ ____ (_) / __/ / __/ ___ _____") + print(" \__ \ / __ \ / / / /_ / /_ / _ \ / ___/") + print(" ___/ / / / / / / / / __/ / __/ / __/ / / ") + print("/____/ /_/ /_/ /_/ /_/ /_/ \___/ /_/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("Usage: [ Save Encode.src Y/N ] -=- [Back]") + opt=user_input("[Y/n]$").lower + if opt == "back" then break + if opt != "n" then save=1 else save=0 + print("Waiting for network activity...") + sniff=mx.sniffer(save) + print(sniff) + user_input("Press any key to continue") + end while + end if + end while + end if//utils while + + if opt == "4" then + while 1 + opt=null + clear + print("/ System Security") + printMenu(["Fyrwall","FoxVPN","Corrupt"]) + opt=user_input("\_[: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + //mods=FoxLib.General.Deserialize(fmods.get_content) + //if mods.indexOf("1") == null and mods.indexOf("vd") == null then + // print("Could not verify ownership of this module! Please purchase it in the Shop") + // wait(2) + // continue + //end if + while 1 + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" ______ __ __") + print(" / ____/ __ __ _____ _ __ ____ _ / / / /") + print(" / /_ / / / / / ___/| | /| / / / __ `/ / / / / ") + print(" / __/ / /_/ / / / | |/ |/ / / /_/ / / / / / ") + print("/_/ \__, / /_/ |__/|__/ \__,_/ /_/ /_/ ") + print(" /____/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("Usage: [ -s / -h ] -=- [Back]") + print("WARNING - Secure HOME removes permissions from EVERYTHING, forcing you to use sudo -s for everything. Be careful") + print("-s: secure SERVER") + print("-h: secure HOME") + print("Make sure you use the right one!") + if active_user != "root" then + print("-={Error: Root user required}=-") + wait(1) + break + end if + opt=user_input("\_[: ").lower + if opt == "back" then break + if opt != "-s" and opt != "-h" then + print("-={Error: Invalid selection}=-") + wait(1) + continue + end if + if opt == "-b" then home=1 + if opt == "-s" then home=0 + if user_mail_address then home=1 + print("Fyrwall Security") + print("Securing system...") + comp=get_shell.host_computer + if comp.File("/etc/passwd") then comp.File("/etc/passwd").delete + if comp.File("/etc/apt/sources.txt") and comp.File("/etc/apt/sources.txt").has_permission("r") and comp.File("/etc/apt/sources.txt").has_permission("w") then + sources=comp.File("/etc/apt/sources.txt") + r=sources.get_content.split("\n") + r[1]=" ""official_server"": false," + sources.set_content(r.join(char(10))) + end if + root=comp.File("/") + root.chmod("o-wrx",1) + root.chmod("g-wrx",1) + root.chmod("u-wrx",1) + root.set_owner("root",1) + root.set_group("root",1) + if home then + root.chmod("g+x",1) + if comp.File("/usr/bin") then comp.File("/usr/bin").chmod("g+rx",1) + else + if comp.File("/home") then comp.File("/home").delete + end if + if comp.File("/lib/kernel_module.so") then comp.File("/lib/kernel_module.so").delete + print("System secured") + wait(1) + break + end while + end if + + if opt == "2" then + //mods=FoxLib.General.Deserialize(fmods.get_content) + //if mods.indexOf("1") == null and mods.indexOf("fvpn") == null then + // print("Could not verify ownership of this module! Please purchase it in the Shop") + // wait(2) + // continue + //end if + while 1 + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" ______ _ __ ____ _ __") + print(" / ____/ ____ _ __| | / / / __ \ / | / /") + print(" / /_ / __ \ | |/_/| | / / / /_/ / / |/ / ") + print(" / __/ / /_/ / _> < | |/ / / ____/ / /| / ") + print("/_/ \____/ /_/|_| |___/ /_/ /_/ |_/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("Connecting to VPN. . .\n") + wait(0.1) + print("Ensuring secure connection. . .\n") + wait(0.1) + print("Clearing logs. . .\n") + wait(0.1) + print("Reticulating splines. . .\n") + wait(0.1) + print("Connected!") + print("Usage: [user@password] [IP] [port]") + creds=user_input("\_[: ") + if creds.lower == "back" then break + creds=creds.split(" ") + if creds.len != 3 then + print("-={Error: Invalid credentials}=-") + wait(1) + break + end if + ip=creds[1] + if not get_router(ip) then + print("-={Error: Invalid credentials}=-") + wait(1) + break + end if + port=creds[-1].to_int + if typeof(port) != "number" then + print("-={Error: Invalid credentials}=-") + wait(1) + break + end if + if creds[0].split("@").len != 2 then + print("-={Error: Invalid credentials}=-") + wait(1) + break + end if + user=creds[0].split("@")[0] + password=creds[0].split("@")[1] + print("Establishing secure tunnel through VPN. . .") + ssh=server.connect_service(ip,port,user,password,"ssh") + if typeof(ssh) != "shell" then + print("-={Error: Could not connect}=-") + wait(1) + break + end if + print("Connected!") + ssh.start_terminal + exit + end while + end if + + if opt == "3" then + //if fmods.get_content != "max" and fmods.get_content.split(",").indexOf("corr") == null then + // print("Could not verify ownership of this module! Please purchase it in the Shop section!") + // wait(2) + // continue + //end if + while 1 + clear_screen + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print(" ______ __ ") + print(" / ____/ ____ _____ _____ __ __ ____ / /_") + print(" / / / __ \ / ___/ / ___/ / / / / / __ \ / __/") + print("/ /___ / /_/ / / / / / / /_/ / / /_/ // /_ ") + print("\____/ \____/ /_/ /_/ \__,_/ / .___/ \__/ ") + print(" /_/ ") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("Usage: [Continue Y/N]") + if active_user != "root" then + print("-={Error: Root user required}=-") + wait(1) + break + end if + conf=user_input("[y/N]$").lower + if conf != "y" then break + comp=get_shell.host_computer + var=comp.File("/var") + + print("Fyrwall Security Logging Prevention") + print("Corrupting logs. . .") + comp.touch("/var","system.bak") + log=comp.File("/var/system.log") + p=null + if log then + p=log.permissions[1:] + log.delete + end if + + bak=comp.File("/var/system.bak") + if bak then + bak.set_content(FoxLib.General.rndstring(512)+char(10)+"Fyrwall Security Logging Prevention") + bak.move("/var","system.log") + end if + wait(.2) + log=comp.File("/var/system.log") + if log then + if log.size.to_int < 1000 then + print("Log corruption successful.") + log.chmod("u-wrx") + log.chmod("g-wrx") + log.chmod("o-wrx") + if p then + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + else + p=get_shell.host_computer.File("/var").permissions[1:] + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + end if + log.chmod("u+"+up) + log.chmod("g+"+gp) + log.chmod("o+"+op) + else + print("Log corruption failure.") + end if + end if + wait(1) + break + end while + end if + end while + end if //security + + if opt == "5" then + while 1 + opt=null + clear + print("/ Account Management") + print("\_[Username]: "+fuser+"") + seclevel=fconf.get_content + if seclevel == "1" then seclevel="2FA" else seclevel="none" + print("\_[Security level]: "+seclevel+"") + printMenu(["Security Settings", "Mail Settings", "License Settings", "Delete Account"]) + opt=user_input("\_[#: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + while 1 + opt=null + clear_screen + print("/ Security settings") + printMenu(["Set security level","Change password"]) + opt=user_input("\_[#: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + if fmail.get_content == "none" then + print("-={Error: Email required}=-") + wait(1) + continue + end if + x=checklgn + if not x.bool then + print(x.err) + wait(1) + continue + end if + while 1 + opt=null + clear_screen + print("/ Set security level") + printMenu(["2FA","NONE"]) + setlevel=user_input("\_[: ") + if setlevel == "0" then break + if setlevel != "1" and setlevel != "2" then break + if setlevel == "2" then setlevel="0" + fconf.set_content(setlevel) + wait(1) + break + end while + end if + + if opt == "2" then + opt=null + x=checklgn + if not x.bool then + print(x.err) + wait(1) + continue + end if + + newPass=user_input("\_[New password: ",1) + confirm=user_input("\_[Confirm: ",1) + if newPass != confirm then + print("-={Error: Passwords do not match}=-") + wait(1) + continue + end if + userData=Sha256(newPass) + fdata.set_content(userData) + print("Password successfully changed") + wait(1) + continue + end if + end while + end if + + if opt == "2" then + while 1 + opt=null + clear_screen + print("/ Mail settings") + if fmail.get_content != "none" then cmail=FoxLib.General.Deserialize(fmail.get_content).verify else cmail="none" + print("\_[Current Email]: "+cmail+"") + printMenu(["Change Email"]) + opt=user_input("\_[#: ") + if opt == "0" then;opt=null;break;end if + if opt == "1" then + x=checklgn + if not x.bool then + print(x.err) + wait(1) + continue + end if + fmaila=user_input("\_[New email: ") + if fmaila.split("@").len != 2 then + fmail.set_content("none") + fconf.set_content("0") + print("Set email to none") + wait(1) + continue + end if + print("Email password is not saved, it is only used to verify email ownership") + fmaill=user_input("\_[Password: ",1) + if typeof(mail_login(fmaila,fmaill)) == "string" then + print("-={Could not verify email ownership}=-") + wait(1) + continue + end if + nmail={} + nmail.verify=fmaila[0]+("*"*(fmaila.indexOf("@")-1))+fmaila[fmaila.indexOf("@"):] + nmail.hashed=Sha256(fmaila) + nmail=FoxLib.General.Serialize(nmail) + fmail.set_content(nmail) + print("Successfully saved email") + wait(1) + continue + end if + end while + end if + + //if opt == "3" then + // while 1 + // opt=null + // clear_screen + // print("/ License management") + // discount=0 + // mods=FoxLib.General.Deserialize(fmods.get_content) + // if mods.indexOf("0") != null then discount=discount+200 + // if mods.indexOf("dict") != null then discount=discount+50 + // if mods.indexOf("vd") != null then discount=discount+100 + // if mods.indexOf("rsh") != null then discount=discount+5 + // if mods.indexOf("fvpn") != null then discount=discount+100 + // if mods.indexOf("corr") != null then discount=discount+5 + // cLicense="Free access" + // if ls.get_content[0] == "V" then cLicense="Default access" + // if ls.get_content[:3] == "ALL" then cLicense="All access" + // if ls.get_content[:3] == "DEV" then cLicense="Developer" + // print("\_[Current license]: "+cLicense+"") + // printMenu(["Upgrade license","Redeem license"]) + // opt=user_input("\_[#: ") + // if opt == "0" then;opt=null;break;end if + // if opt == "1" then + // if cLicense=="All access" or cLicense=="Developer" then + // print("Cannot upgrade license further!") + // wait(1) + // continue + // end if + // if cLicense=="Free access" then printMenu(["Default access - 20 Bytes","All access - 100 Bytes"]) else printMenu(["All access - 80 Bytes"]) + // opt=user_input("\_[: ") + // if opt == "0" then;opt=null;break;end if + // if opt == "1" and cLicense=="Default access" then + // opt=null + // price=str(1000-discount) + // print("YOU ARE PURCHASING : ALL ACCESS UPGRADE : FOR "+price+" Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,price) + // if output.bool then + // print("Upgrade successful!") + // else + // print(""+output.err+"") + // wait(1) + // continue + // end if + // fmods.set_content("[""1""]") + // newLicense="ALL"+FoxLib.General.rndstring(1)+"-"+FoxLib.General.rndstring(8)+"-"+FoxLib.General.rndstring(8) + // ls.set_content(newLicense) + // cont=server.host_computer.File("/.FoxTrot/used_licenses").get_content + // cont=FoxLib.General.Deserialize(cont) + // cont.fuser=newLicense + // cont=FoxLib.General.Serialize(cont,1) + // server.host_computer.File("/.FoxTrot/used_licenses").set_content(cont) + // print("REMEMBER YOUR LICENSE KEY! IT MAY BE USED FOR ACCOUNT OWNERSHIP VERIFICATION") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // user_input("Press enter to continue") + // wait(1) + // continue + // end if + // if opt == "1" and cLicense=="Free access" then + // opt=null + // print("YOU ARE PURCHASING : DEFAULT ACCESS UPGRADE : FOR 200 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"200") + // if output.bool then + // print("Upgrade successful!") + // else + // print(""+output.err+"") + // wait(1) + // continue + // end if + // fmods.set_content("[""0""]") + // newLicense="V"+FoxLib.General.rndstring(3)+"-"+FoxLib.General.rndstring(8)+"-"+FoxLib.General.rndstring(8) + // ls.set_content(newLicense) + // cont=server.host_computer.File("/.FoxTrot/used_licenses").get_content + // cont=FoxLib.General.Deserialize(cont) + // cont.fuser=newLicense + // cont=FoxLib.General.Serialize(cont,1) + // server.host_computer.File("/.FoxTrot/used_licenses").set_content(cont) + // print("REMEMBER YOUR LICENSE KEY! IT MAY BE USED FOR ACCOUNT OWNERSHIP VERIFICATION") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // user_input("Press enter to continue") + // wait(1) + // continue + // end if + // if opt == "2" and cLicense=="Free access" then + // opt=null + // print("YOU ARE PURCHASING : ALL ACCESS UPGRADE : FOR 1000 Bytes : CONTINUE?") + // opt=user_input("[y/N]$").lower + // if opt != "y" then continue + // output=Bytes.transfer(owner,"1000") + // if output.bool then + // print("Upgrade successful!") + // else + // print(""+output.err+"") + // wait(1) + // continue + // end if + // fmods.set_content("[""1""]") + // newLicense="ALL"+FoxLib.General.rndstring(1)+"-"+FoxLib.General.rndstring(8)+"-"+FoxLib.General.rndstring(8) + // ls.set_content(newLicense) + // cont=server.host_computer.File("/.FoxTrot/used_licenses").get_content + // cont=FoxLib.General.Deserialize(cont) + // cont.fuser=newLicense + // cont=FoxLib.General.Serialize(cont,1) + // server.host_computer.File("/.FoxTrot/used_licenses").set_content(cont) + // print("REMEMBER YOUR LICENSE KEY! IT MAY BE USED FOR ACCOUNT OWNERSHIP VERIFICATION") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // print("License key: "+newLicense+"") + // user_input("Press enter to continue") + // wait(1) + // continue + // end if + // end if +// + // if opt == "2" then + // if cLicense=="All access" or cLicense=="Developer" then + // print("Cannot upgrade license further!") + // wait(1) + // continue + // end if + // print("If you didn't mean to enter this meny, type ""Back"" to return") + // newKey=user_input("\_[License: ") + // if newKey.lower == "back" then continue + // if cLicense == "Default access" and newKey[0] == "V" then + // print("-={Error: Cannot redeem license of same access type!}=-") + // wait(1) + // continue + // end if + // licenses = server.host_computer.File("/.FoxTrot/open_licenses").get_content + // licenses = FoxLib.General.Deserialize(licenses) + // if licenses.indexOf(newKey) == null then + // print("-={Error: Could not validate license}=-") + // wait(1) + // continue + // end if + // licenses.remove(newKey) + // licenses = FoxLib.General.Serialize(licenses,1) + // if newKey[0] == "V" then + // mods=["0"]+mods + // if mods.indexOf("rsh") != null then mods.remove("rsh") + // fmods.set_content(str(mods)) + // end if + // if newKey[:3] == "ALL" or newKey[:3] == "DEV" then fmods.set_content("[""1""]") +// + // cont=server.host_computer.File("/.FoxTrot/used_licenses").get_content + // cont=FoxLib.General.Deserialize(cont) + // cont[fuser]=newKey + // cont=FoxLib.General.Serialize(cont,1) + // ls.set_content(newKey) + // server.host_computer.File("/.FoxTrot/open_licenses").set_content(licenses) + // server.host_computer.File("/.FoxTrot/used_licenses").set_content(cont) +// + // print("License updated to "+newKey+"") + // print("Save your license key in a safe spot! It may be used for account ownership verification!") + // user_input("Press any key to continue",0,1) + // wait(1) + // continue + // end if + // end while + //end if + + if opt == "4" then + x=checklgn + if not x.bool then + print(x.err) + wait(1) + break + end if + print("ACCOUNT DELETION") + print("Caution: You will lose your license forever! This is not a refund! This action is not reversable!") + opt=user_input("[y/N]$").lower + if opt != "y" then continue + server.host_computer.File("/.FoxTrot/users/"+fuser).delete + cont=server.host_computer.File("/.FoxTrot/used_licenses").get_content + cont=FoxLib.General.Deserialize(cont) + if cont.indexOf(fuser) != null then cont.remove(fuser) + cont=FoxLib.General.Serialize(cont,1) + server.host_computer.File("/.FoxTrot/used_licenses").set_content(cont) + exit("Account deleted. Goodbye.") + end if + end while + end if +end while \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4863b2b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# greyhackscripts +collection of clovers's grey hack scripts +now open source due to clover leaving the game \ No newline at end of file diff --git a/advnmap.src b/advnmap.src new file mode 100644 index 0000000..f9e46d9 --- /dev/null +++ b/advnmap.src @@ -0,0 +1,76 @@ +if params.len != 1 then exit("Usage: "+program_path.split("/")[-1]+" [address]") +address=params[0] +if address[:3] == "www" then address=nslookup(address) +islan=is_lan_ip(address) +router=get_router(address) +if islan then router=get_router +if not router then exit("invalid ip") +wifi=router.essid_name +rver=router.kernel_version +fwr=router.firewall_rules +if islan then + ports=router.device_ports(address) +else + ports=router.used_ports +end if +ips=[] +if address != router.local_ip then + hport=null + if router.device_ports(router.local_ip).len then hport=router.device_ports(router.local_ip)[0] + m={} + m.ip=router.local_ip + if hport then m.ports=[hport] else m.ports=[] + ips.push(m) + m=null +end if +fwinfo="action port source dest" +for rules in fwr + fwinfo=fwinfo+"\n"+rules +end for +extinfo=""+address+"|rkernel: "+rver+"|wifi: "+wifi+"" +info="# lan port status service version" +print(extinfo) +if fwr then print(format_columns(fwinfo)) +num=0 +for port in ports + inm=0 + for m in ips + if m.ip == port.get_lan_ip then + m.ports.push(port) + inm=1 + end if + end for + if not inm then + m={} + m.ip=port.get_lan_ip + m.ports=[port] + ips.push(m) + end if +end for +for m in ips + ports=m.ports + ip=m.ip + info=info+"\n"+num+" "+ip+" /" + if ip == router.local_ip then info=info+"\n |0 routed router "+rver + for port in ports + service=router.port_info(port) + status="open" + if port.is_closed then status="lan" + info=info+"\n |"+port.port_number+" "+status+" "+service + end for + num=num+1 +end for +if not islan or address[-2:] == ".1" then; for sub in router.devices_lan_ip + subIn=0 + for m in ips + if sub == m.ip then subIn=1 + end for + if subIn then continue + info=info+"\n"+num+" "+sub + num=num+1 +end for;end if +print(format_columns(info)+"\n") +whoisinfo=whois(address).split("\n") +print("WhoIs results") +if whoisinfo.len < 3 then exit("could not perform WhoIs operation") +print(whoisinfo[0]+"\n"+whoisinfo[1]+"\n"+whoisinfo[2]) \ No newline at end of file diff --git a/autohack.src b/autohack.src new file mode 100644 index 0000000..e2e785c --- /dev/null +++ b/autohack.src @@ -0,0 +1,220 @@ +import_code("/root/Fox.so") +libs=FoxLib.General.LibFinder +mxf=libs.mxf +cpf=libs.cpf +if not mxf or not cpf then exit +mx=include_lib(mxf) +cp=include_lib(cpf) +if params.len != 1 then exit +ip=params[0] +router=get_router(ip) +if is_lan_ip(ip) then router=get_router +if not router then exit +rver=router.kernel_version +ports=[{"number": 0, "service": "router "+rver}] +for port in router.used_ports + m={} + m.number=port.port_number + m.service=router.port_info(port) + ports.push(m) +end for +if ports.len == 0 then exit +exploits=[] +decrypted=null + +buildProgram=function(shell,dest) + program="mxf=""/home/guest/metaxploit.so"";mx=include_lib(mxf);libs=get_shell.host_computer.File(""/lib"").get_files;exploits=[];pass=null;for lib in libs;ml=mx.load(lib.path);lib=null;for dblib in exploits;libname=dblib.name;libver=dblib.ver;if ml.lib_name == libname and ml.version == libver then;lib=dblib;break;end if;end for;if lib then;vulns=lib.exploits;for vuln in vulns;mem=vuln.split("","")[0];exp=vuln.split("","")[1];result=ml.overflow(mem,exp);if typeof(result) == ""shell"" then;rfile=result.host_computer.File(""/etc/passwd"");if rfile and rfile.has_permission(""r"") then;pass=rfile.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;else if typeof(result) == ""computer"" then;rfile=result.File(""/etc/passwd"");if rfile and rfile.has_permission(""r"") then;pass=rfile.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;else if typeof(result) == ""file"" then;if result.path == ""/etc"" then;rfile=null;for file in result.get_files;if file.name == ""passwd"" then rfile=file;end for;if rfile and rfile.has_permission(""r"") then;pass=rfile.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;else if result.path == ""/etc/passwd"" and result.has_permission(""r"") then;pass=result.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;end if;end for;end if;if lib then continue;scan=mx.scan(ml);newLib={};newLib.name=ml.lib_name;newLib.ver=ml.version;newLib.exploits=[];for mem in scan;mems=mx.scan_address(ml,mem).split(""Unsafe check: "");for ent in mems;if ent == mems[0] then continue;exp=ent[ent.indexOf("""")+3:ent.indexOf("""")];result=ml.overflow(mem,exp);newLib.exploits.push(mem+"",""+exp);if typeof(result) == ""shell"" then;rfile=result.host_computer.File(""/etc/passwd"");if rfile and rfile.has_permission(""r"") then;pass=rfile.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;else if typeof(result) == ""computer"" then;rfile=result.File(""/etc/passwd"");if rfile and rfile.has_permission(""r"") then;pass=rfile.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;else if typeof(result) == ""file"" then;if result.path == ""/etc"" then;rfile=null;for file in result.get_files;if file.name == ""passwd"" then rfile=file;end for;if rfile and rfile.has_permission(""r"") then;pass=rfile.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;else if result.path == ""/etc/passwd"" then;if result.has_permission(""r"") then;pass=result.get_content.split(""\n"")[0];get_shell.host_computer.touch(current_path,""pass"");get_shell.host_computer.File(current_path+""/pass"").set_content(pass);exit;end if;end if;end if;end for;end for;end for" + get_shell.scp(mxf,dest,shell) + get_shell.scp(cpf,dest,shell) + shell.host_computer.touch(dest,"automated.src") + shell.host_computer.File(dest+"/automated.src").set_content(program) + built=shell.build(dest+"/automated.src",dest) + shell.host_computer.File(dest+"/automated.src").delete +end function + + +decrypt = function(hash) + GetPassword = function(userPass) + password=cp.decipher(userPass) + return(password) + end function +origFile = hash + if origFile.len < 32 then return + lines=[origFile] + for line in lines + userPass=line.split(":") + if userPass.len == 2 then + user=userPass[0] + userPass=userPass[1] + password=GetPassword(userPass) + if not password then print("password for "+user+" not found") + if password then + password=user+":"+password + return password + end if + else + userPass=userPass[0] + password=GetPassword(userPass) + if not password then print ("could not decipher "+userPass) + if password then return password + end if + end for +end function + +attempt=function(ip,user,pass) +port=null +for i in ports + if i.service.split(" ")[0] == "ssh" then + port=i.number + break + end if +end for +if not port then + print("Could not obtain shell") + print("Password: "+pass) +else +try=get_shell.connect_service(ip,port,user,pass) +if typeof(try) == "shell" then + print("Shell obtained") + print("Pass: "+pass) + print("Start terminal?") + confirm=user_input("[Y/n]> ").lower + if confirm != "n" then try.start_terminal +end if +end if +end function + +while 1 + for port in ports + ns=mx.net_use(ip,port.number) + if not ns then continue + ml=ns.dump_lib + lib=null + newLib=null + for dblib in exploits + libname=dblib.name + libver=dblib.ver + if ml.lib_name == libname and ml.version == libver then + lib=dblib + break + end if + end for + if lib then + vulns=lib.exploits + for vuln in vulns + if vuln == "" then continue + mem=vuln.split(",")[0] + exp=vuln.split(",")[1] + result=ml.overflow(mem,exp) + if typeof(result) == "shell" then + rfile=result.host_computer.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then ruser="root" + if ruser == "root" then + print("Shell obtained") + print("Start terminal?") + confirm=user_input("[Y/n]> ").lower + if confirm != "n" then result.start_terminal + else + if result.host_computer.File("/home/guest") and not result.host_computer.File("/home/guest/automated") and result.host_computer.File("/home/guest").has_permission("w") then + buildProgram(result,"/home/guest") + result.launch("/home/guest/automated") + if result.host_computer.File("/home/guest/pass") then + pass=result.host_computer.File("/home/guest/pass").get_content + decrypted=decrypt(pass.split("\n")[0]) + attempt(ip,"root",decrypted) + end if + end if + end if + else if typeof(result) == "computer" then + rfile=result.File("/root") + if rfile and rfile.has_permission("w") then + pass=result.File("/etc/passwd").get_content.split("\n")[0] + decrypted=decrypt(pass) + attempt(ip,"root",decrypted) + end if + else if typeof(result) == "file" then + if result.path == "/etc" then + rfile=null + for file in result.get_files + if file.name == "passwd" then rfile=file + end for + if rfile and rfile.has_permission("r") then + pass=rfile.get_content.split("\n")[0] + decrypted=decrypt(pass) + attempt(ip,"root",decrypted) + end if + else if result.path == "/etc/passwd" then + if result.has_permission("r") then + pass=result.get_content.split("\n")[0] + decrypted=decrypt(pass) + attempt(ip,"root",decrypted) + end if + end if + end if + end for + end if + if lib then continue + scan=mx.scan(ml) + newLib={} + newLib.name=ml.lib_name + newLib.ver=ml.version + newLib.exploits=[] + for mem in scan + mems=mx.scan_address(ml,mem).split("Unsafe check: ") + for ent in mems + if ent == mems[0] then continue + exp=ent[ent.indexOf("")+3:ent.indexOf("")] + result=ml.overflow(mem,exp) + newLib.exploits.push(mem+","+exp) + if typeof(result) == "shell" then + rfile=result.host_computer.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then ruser="root" + if ruser == "root" then + print("Shell obtained") + print("Start terminal?") + confirm=user_input("[Y/n]> ").lower + if confirm != "n" then result.start_terminal + else + if result.host_computer.File("/home/guest") and not result.host_computer.File("/home/guest/automated") and result.host_computer.File("/home/guest").has_permission("w") then + buildProgram(result,"/home/guest") + result.launch("/home/guest/automated") + if result.host_computer.File("/home/guest/pass") then + pass=result.host_computer.File("/home/guest/pass").get_content + decrypted=decrypt(pass.split("\n")[0]) + attempt(ip,"root",decrypted) + end if + end if + end if + else if typeof(result) == "computer" then + rfile=result.File("/etc/passwd") + if rfile and rfile.has_permission("r") then + pass=rfile.get_content.split("\n")[0] + decrypted=decrypt(pass) + attempt(ip,"root",decrypted) + end if + else if typeof(result) == "file" then + if result.path == "/etc" then + rfile=null + for file in result.get_files + if file.name == "passwd" then rfile=file + end for + if rfile and rfile.has_permission("r") then + pass=rfile.get_content.split("\n")[0] + decrypted=decrypt(pass) + attempt(ip,"root",decrypted) + end if + else if result.path == "/etc/passwd" then + if result.has_permission("r") then + pass=result.get_content.split("\n")[0] + decrypted=decrypt(pass) + attempt(ip,"root",decrypted) + end if + end if + end if + end for + end for + exploits.push(newLib) + end for +end while \ No newline at end of file diff --git a/automail.src b/automail.src new file mode 100644 index 0000000..345ee09 --- /dev/null +++ b/automail.src @@ -0,0 +1,33 @@ +if params.len != 1 then exit("invalid command usage") +alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" +al=alpha.len +counters=[] +max=32 + +for i in range(1,max) + counters=[] + for _ in range(0,max-1) + counters.push(0) + end for + while 1 + cy=counters[:i] + ps=[] + for x in cy + ps.push(x*(al ^ __x_idx)) + end for + cy=ps.sum + pass="" + for q in range(0,(i-1)) + if floor(counters[q]/al) then + counters[q]=0 + if q != i-1 then counters[q+1]=counters[q+1]+1 else continue + end if + pass=pass+alpha[counters[q]] + end for + print("Attempting password "+pass+", "+(cy+1)+"/"+(al^i)+" of length "+i+"") + attempt=mail_login(params[0],pass) + if typeof(attempt) != "string" then exit("PASSWORD FOUND - "+pass+"") + counters[0]=counters[0]+1 + if floor((counters[:i].sum-1)/(al-1)) == i then break + end while +end for \ No newline at end of file diff --git a/autoproxy.src b/autoproxy.src new file mode 100644 index 0000000..d58cac3 --- /dev/null +++ b/autoproxy.src @@ -0,0 +1,98 @@ +encrypt=function(pass,secret,type) + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="Cy|=a+!@z^M7rmg*BUh(Ne-5tV8dTq?$u4vo1>kWxJpARLcKSb320%EQH6 3 then exit(program_path.split("/")[-1]+" (user@password) (address) (port)") +if params.len == 0 then + current=get_shell + chains=get_shell.host_computer.File(current_path+"/proxies") + if not chains then + get_shell.host_computer.touch(current_path,"proxies") + exit(program_path.split("/")[-1]+" (user@password) (address) (port)") + end if + if chains.get_content.len < 1 then exit(program_path.split("/")[-1]+" (user@password) (address) (port)") + chains=chains.get_content.split("\n") + for proxy in chains + if proxy == "" then continue + proxy=encrypt(proxy,"autoproxy","dec").split("/") + server=proxy[0] + port=proxy[1].to_int + user=proxy[2] + pass=proxy[3] + //server/port/user/pass + print("connecting server "+server) + attempt=current.connect_service(server,port,user,pass,"ssh") + if typeof(attempt) != "shell" then + print("Couldn't connect") + continue + end if + current=attempt + end for + print("starting terminal at "+server) + current.start_terminal +else + if params.len < 2 then exit(program_path.split("/")[-1]+" (user@password) (address) (port)") + server=params[1] + user=params[0].split("@")[0] + pass=params[0].split("@")[1] + port=22 + if params.len == 3 then + port=params[2].to_int + if typeof(port) != "number" then exit("invalid port") + end if + chains=get_shell.host_computer.File(current_path+"/proxies") + if not chains then + get_shell.host_computer.touch(current_path,"proxies") + chains=get_shell.host_computer.File(current_path+"/proxies") + end if + //server/port:user@pass + print("Checking connection. . .") + if typeof(get_shell.connect_service(server,port,user,pass,"ssh")) != "shell" then exit("Could not connect to server "+server) + newServ=encrypt(server+"/"+str(port)+"/"+user+"/"+pass,"autoproxy","enc") + cont=chains.get_content + chains.set_content(cont+newServ+char(10)) + print("added proxy") +end if \ No newline at end of file diff --git a/calc.src b/calc.src new file mode 100644 index 0000000..0173215 --- /dev/null +++ b/calc.src @@ -0,0 +1,297 @@ +Token=function(type,value) + return {"type": type, "value": value} +end function + +Lexer=function(text) + out={} + out.text=text + out.pos=0 + out.currChar=out.text[out.pos] + + out.error=function() + exit("Invalid character!") + end function + + out.advance=function(self) + self.pos=self.pos+1 + if self.pos > self.text.len-1 then + self.currChar=null + else + self.currChar=self.text[self.pos] + end if + end function + + out.skip_ws=function(self) + while self.currChar and self.currChar == " " + self.advance + end while + end function + + out.integer=function(self) + result="" + while self.currChar != null and (typeof(self.currChar.to_int) == "number" or self.currChar == ".") + result=result+self.currChar + self.advance + end while + return result.val + end function + + out.gnt=function(self) + while self.currChar + + if self.currChar == " " then + self.skip_ws + continue + end if + + if typeof(self.currChar.to_int) == "number" then + return Token("INT",self.integer) + end if + + if self.currChar == "+" then + self.advance + return Token("ADD","+") + end if + + if self.currChar == "-" then + self.advance + return Token("SUB","-") + end if + + if self.currChar == "*" then + self.advance + return Token("MUL","*") + end if + + if self.currChar == "/" then + self.advance + return Token("DIV","/") + end if + + if self.currChar == "^" then + self.advance + return Token("EXP","^") + end if + + if self.currChar == "%" then + self.advance + return Token("MOD","%") + end if + + if self.currChar == "(" then + self.advance + return Token("LPAREN","(") + end if + + if self.currChar == ")" then + self.advance + return Token("RPAREN",")") + end if + + self.error + end while + + return Token("EOF",null) + end function + + return out +end function + +AST=function() + return {} +end function + +BinOp=function(left,op,right) + out=AST + out.left=left + out.op=op + out.token=op + out.right=right + out.classID="BinOp" + return out +end function + +Num=function(token) + out=AST + out.token=token + out.value=token.value + out.classID="Num" + return out +end function + +UnaryOp=function(op,expr) + out=AST + out.op=op + out.token=op + out.expr=expr + out.classID="UnaryOp" + return out +end function + +Parser=function(lexer) + out={} + out.lexer=lexer + out.ct=out.lexer.gnt + + out.error=function() + exit("Invalid syntax!") + end function + + out.eat=function(self,ttype) + if self.ct.type == ttype then self.ct=self.lexer.gnt else self.error + end function + + out.factor=function(self) + token=self.ct + if token.type == "ADD" then + self.eat("ADD") + node=UnaryOp(token,self.factor) + return node + else if token.type == "SUB" then + self.eat("SUB") + node=UnaryOp(token,self.factor) + return node + else if token.type == "INT" then + self.eat("INT") + return Num(token) + else if token.type == "LPAREN" then + self.eat("LPAREN") + node=self.expr + self.eat("RPAREN") + return node + end if + end function + + out.exp=function(self) + node=self.factor + + while self.ct.type == "EXP" + token=self.ct + self.eat("EXP") + node=BinOp(node,token,self.factor) + end while + return node + end function + + out.term=function(self) + node=self.exp + + while ["MUL","DIV","MOD"].indexOf(self.ct.type) != null + token=self.ct + if token.type == "MUL" then + self.eat("MUL") + else if token.type == "DIV" then + self.eat("DIV") + else if token.type == "MOD" then + self.eat("MOD") + end if + + node=BinOp(node,token,self.exp) + end while + return node + end function + + out.expr=function(self) + node=self.term + + while ["ADD","SUB"].indexOf(self.ct.type) != null + token=self.ct + if token.type == "ADD" then + self.eat("ADD") + else if token.type == "SUB" then + self.eat("SUB") + end if + + node=BinOp(node,token,self.term) + end while + return node + end function + + out.parse=function(self) + return self.expr + end function + return out +end function + +NodeVisitor=function() + out={} + out.visit=function(self,node) + method="visit_"+typeof(node) + if not self.hasIndex(method) then self.generic_visit + result=null + if method == "visit_BinOp" then + result=self.visit_BinOp(node) + else if method == "visit_Num" then + result=self.visit_Num(node) + else if method == "visit_UnaryOp" then + result=self.visit_UnaryOp(node) + end if + return result + end function + + out.generic_visit=function() + exit("No visit method") + end function + return out +end function + +Interpreter=function(parser) + out=NodeVisitor + out.parser=parser + + out.visit_BinOp=function(self,node) + if node.op.type == "ADD" then + return self.visit(node.left) + self.visit(node.right) + else if node.op.type == "SUB" then + return self.visit(node.left) - self.visit(node.right) + else if node.op.type == "MUL" then + return self.visit(node.left) * self.visit(node.right) + else if node.op.type == "DIV" then + return self.visit(node.left) / self.visit(node.right) + else if node.op.type == "MOD" then + return self.visit(node.left) % self.visit(node.right) + else if node.op.type == "EXP" then + return self.visit(node.left) ^ self.visit(node.right) + end if + end function + + out.visit_Num=function(self,node) + return node.value + end function + + out.visit_UnaryOp=function(self,node) + op=node.op.type + if op == "ADD" then + return self.visit(node.expr) + else if op == "SUB" then + return -self.visit(node.expr) + end if + end function + + out.interp=function(self) + tree=self.parser.parse + return self.visit(tree) + end function + + return out +end function + +main=function() + print("Four Leaf Calculator") + print + while 1 + text=user_input("calc> ") + if not text then continue + run(text) + end while +end function + +run=function(script) + lexer=Lexer(script) + parser=Parser(lexer) + interp=Interpreter(parser) + result=interp.interp + print(result) +end function + +main \ No newline at end of file diff --git a/calcfree.src b/calcfree.src new file mode 100644 index 0000000..43bc4a9 --- /dev/null +++ b/calcfree.src @@ -0,0 +1,175 @@ +//Four Leaf Calculator, by Clover +//Give credit!! +Token=function(type,value) + return {"type": type, "value": value} +end function + +Lexer=function(text) + out={} + out.text=text + out.pos=0 + out.currChar=out.text[out.pos] + + out.error=function() + exit("Invalid character") + end function + + out.advance=function(self) + self.pos=self.pos+1 + if self.pos > self.text.len-1 then + self.currChar=null + else + self.currChar=self.text[self.pos] + end if + end function + + out.skip_ws=function(self) + while self.currChar and self.currChar == " " + self.advance + end while + end function + + out.integer=function(self) + result="" + while self.currChar and typeof(self.currChar.to_int) == "number" + result=result+self.currChar + self.advance + end while + return result.val + end function + + out.gnt=function(self) + while self.currChar + if self.currChar == " " then + self.skip_ws + continue + end if + + if typeof(self.currChar.to_int) == "number" then + return Token("INT",self.integer) + end if + + if self.currChar == "+" then + self.advance + return Token("ADD","+") + end if + + if self.currChar == "-" then + self.advance + return Token("SUB","-") + end if + + if self.currChar == "*" then + self.advance + return Token("MUL","*") + end if + + if self.currChar == "/" then + self.advance + return Token("DIV","/") + end if + + if self.currChar == "^" then + self.advance + return Token("EXP","^") + end if + + if self.currChar == "(" then + self.advance + return Token("LPAREN","(") + end if + + if self.currChar == ")" then + self.advance + return Token("RPAREN",")") + end if + + self.error + end while + + return Token("EOF",null) + end function + + return out +end function + +Interpreter=function(lexer) + out={} + out.lexer=lexer + out.ct=out.lexer.gnt + + out.error=function() + exit("Invalid syntax") + end function + + out.eat=function(self,ttype) + if self.ct.type == ttype then self.ct=self.lexer.gnt else self.error + end function + + out.factor=function(self) + token=self.ct + if token.type == "INT" then + self.eat("INT") + return token.value + else if token.type == "LPAREN" then + self.eat("LPAREN") + result=self.expr() + self.eat("RPAREN") + return result + end if + end function + + out.exp=function(self) + result=self.factor + while self.ct.type == "EXP" + token=self.ct + self.eat("EXP") + result=result ^ self.factor() + end while + return result + end function + + out.term=function(self) + result=self.exp + while ["MUL","DIV"].indexOf(self.ct.type) != null + token=self.ct + if token.type == "MUL" then + self.eat("MUL") + result=result*self.exp + else if token.type == "DIV" then + self.eat("DIV") + result=result/self.exp + end if + end while + return result + end function + + out.expr=function(self) + result=self.term + while ["ADD","SUB"].indexOf(self.ct.type) != null + token=self.ct + if token.type == "ADD" then + self.eat("ADD") + result=result+self.term + else if token.type == "SUB" then + self.eat("SUB") + result=result-self.term + end if + end while + return result + end function + + return out +end function + +print("Four Leaf Calculator") +print("By Clover") +print +while 1 + text=user_input("calc> ") + if not text then continue + lexer=Lexer(text) + interp=Interpreter(lexer) + result=interp.expr + print(result) +end while \ No newline at end of file diff --git a/cloudsafe.src b/cloudsafe.src new file mode 100644 index 0000000..0d74fca --- /dev/null +++ b/cloudsafe.src @@ -0,0 +1,287 @@ +//import_code("/root/Bytes") +apt=include_lib("/lib/aptclient.so") +ver="1.1.1" +GB=1000000000 +logo="-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" +logo=logo+" ______ __ __ _____ ____ \n" +logo=logo+" / ____/ / / ____ __ __ ____/ / / ___/ ____ _ / __/ ___ \n" +logo=logo+" / / / / / __ \ / / / / / __ / \__ \ / __ `/ / /_ / _ \\n" +logo=logo+"/ /___ / / / /_/ // /_/ / / /_/ / ___/ / / /_/ / / __/ / __/\n" +logo=logo+"\____/ /_/ \____/ \__,_/ \__,_/ /____/ \__,_/ /_/ \___/ \n" +logo=logo+"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" +logo=logo+"v. "+ver+"\n" +logo=logo+"Your one-stop file storage shop!" +print(logo) +//if apt then +// sources=get_shell.host_computer.File("/etc/apt/sources.txt") +// if sources and sources.has_permission("r") then +// inSource=false +// sources=sources.get_content.split("\n") +// for source in sources +// source=source.split(":") +// if source[0] == " ""93.43.53.184""" then inSource=true +// end for +// if not inSource then +// apt.add_repo("93.43.53.184",1542) +// apt.update +// end if +// out=apt.check_upgrade(program_path) +// if out then +// print("Update found!") +// apt.install("CloudSafe",parent_path(program_path)) +// get_shell.launch(program_path) +// exit +// end if +// end if +//end if + +print("Establishing connection to server. . .") +server=get_shell.connect_service +if typeof(server) != "shell" then exit("Could not connect.") +if server.host_computer.File("/server/.CloudSafe/maintenance.cfg").get_content != "false" then exit(server.host_computer.File("/server/.CloudSafe/maintenance.cfg").get_content) +print("Connected!") + +encrypt=function(password) + o=[] + for ch in password + k=ch.code*10 + a=k*4 + s=a+100*10 + t=s+1000*10*2000+10000000000 + o.push("ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©"+"ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©"+bitwise("^",t,7777)+"ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©"+"ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©") + end for + return o.join("ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©") +end function + +login=function(fuser,fpass) + output={} + output.bool=1 + output.stderr="Could not verify your identity. (Incorrect username or password.)" + output.stdout=0 + userAcc=server.host_computer.File("/server/.CloudSafe/users/"+fuser+"/passwd.enc") + if not userAcc then + output.bool=0 + return(output) + end if + userData=userAcc.get_content + if encrypt(fpass) == userData then + output.stdout=fuser+":"+fpass + return output + else + output.bool=0 + return(output) + end if +end function + +register=function() + output={} + output.bool=1 + output.stdout=0 + output.stderr=0 + illegalChars=[":",",",".","/","\","[","{","(","]","}",")","-","_","="," ","|","<",">","~","`","*","&","^","%","$","#","@","!"] + user=user_input("[username]~$") + for ilchar in illegalChars + for chr in user + if chr==ilchar then exit("Illegal characters used in username!") + end for + end for + if server.host_computer.File("/server/.CloudSafe/users/"+user) then + output.bool=0 + output.stderr="User exists!" + return output + end if + RPass=user_input("[password]~$") + CPass=user_input("[confirm]~$") + if CPass != RPass then + output.bool=0 + output.stderr="Passwords do not match!" + return output + end if + print("Creating an account (10 BTC)") + opt=user_input("Continue? [Y/N]~$").lower + if opt != "y" then + output.bool=0 + output.stderr="Purchase declined" + return output + end if + coins="10" + transf=BTC.transfer(owner,coins,0,0) + if transf.bool then + print(transf.stdout) + else + output.bool=0 + output.stderr="Purchase failure" + return output + end if + print("[%]Creating account: "+user) + server.host_computer.create_folder("/server/.CloudSafe/users",user) + server.host_computer.create_folder("/server/.CloudSafe/users/"+user,"files") + path="/server/.CloudSafe/users/"+user + server.host_computer.touch(path,"passwd.enc") + server.host_computer.touch(path,"storage") + server.host_computer.File(path).chmod("o-wrx",1) + server.host_computer.File(path).chmod("u-wrx",1) + server.host_computer.File(path).chmod("g-wrx",1) + server.host_computer.File(path+"/passwd.enc").set_content(encrypt(CPass)) + server.host_computer.File(path+"/storage").set_content(GB) + output.stdout=user+":"+CPass + return output +end function + +opt=null +while opt != "register" or opt != "login" + print("[Login] +[Register]") + opt=user_input("~$").lower + if opt == "login" then + user=user_input("[username]~$") + pass=user_input("[password]~$",true) + output=login(user,pass) + if output.bool then + print("Successful login!") + creds=output.stdout.split(":") + break + end if + print(output.stderr) + continue + end if + if opt == "register" then + output=register() + if output.bool then + print("[+]User created!") + creds=output.stdout.split(":") + break + end if + print(output.stderr) + continue + end if +end while + +ufiles=server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/files") + +help=function() + print("[Files] +[Upload] +[Download] +[Remove] +[Account] +[Help] +[Exit]") +end function +help() +while true + term=user_input("~$").lower + if term == "help" then help() + if term == "exit" then exit("Exiting!") + if term == "files" then + files=ufiles.get_files + output="Name / Size\n" + for file in files + name=file.name + size=file.size + output=output+name+" / "+size+"\n" + end for + print(format_columns(output)) + continue + end if + if term == "upload" then + maxspace=server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content.to_int + space=0 + for file in ufiles.get_files + space=space+file.size.to_int + end for + path=user_input("[FULL File path]~$") + if not get_shell.host_computer.File(path) then + print("File does not exist") + continue + end if + if not get_shell.host_computer.File(path).has_permission("r") then + print("No permissions to file") + continue + end if + if get_shell.host_computer.File(path).is_folder then + print("Cannot upload a folder!") + continue + end if + if server.host_computer.File(ufiles.path+"/"+path.split("/")[-1]) then + print("File already exists") + continue + end if + if space+get_shell.host_computer.File(path).size > maxspace and server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content != "inf" then + print("Exceeds maximum space!") + continue + end if + get_shell.scp(path,ufiles.path,server) + up=server.host_computer.File(ufiles.path+"/"+path.split("/")[-1]) + up.chmod("o-wrx") + up.chmod("u-wrx") + up.chmod("g-wrx") + print("Uploaded "+path+"!") + continue + end if + if term == "download" then + file=user_input("[File]~$") + if not server.host_computer.File(ufiles.path+"/"+file) then + print("File does not exist") + continue + end if + server.scp(ufiles.path+"/"+file,current_path,get_shell) + print("Downloaded "+file+"!") + continue + end if + if term == "remove" then + file=user_input("[File]~$") + if not server.host_computer.File(ufiles.path+"/"+file) then + print("File does not exist, lucky you!") + continue + end if + server.host_computer.File(ufiles.path+"/"+file).delete + print("Deleted "+file+"!") + end if + if term == "account" then + print("Hello "+creds[0]+"!") + print("Current maximum space: "+server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content) + space=0 + for file in ufiles.get_files + space=space+file.size.to_int + end for + print("Current used space: "+space+"/"+server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content) + print("[Upgrade] +[Delete] +[Return]") + while true + opt=user_input("~$").lower + if opt == "upgrade" and server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content != "inf" then + if server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content=="inf" then continue + print("Purchasing +1 GB Storage Space (10 BTC)") + opt=user_input("Continue? [Y/N]~$").lower + if opt == "y" then + coins="10" + output=BTC.transfer(owner,coins,0,0) + if output.bool then + print(output.stdout) + else + print("Purchase failure") + continue + end if + space=server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").get_content.split.to_int + space=space+GB + server.host_computer.File("/server/.CloudSafe/users/"+creds[0]+"/storage").set_content(space) + end if + end if + if opt == "delete" then + print("This will irreversably delete all of your data!") + opt=user_input("Continue? [Y/N]~$").lower + if opt == "y" then + print("[-]Removing user") + server.host_computer.File("/server/.CloudSafe/users/"+creds[0]).delete + exit("[%]User deleted") + end if + end if + if opt == "return" then break + end while + end if +end while + + + diff --git a/cookieclicker.src b/cookieclicker.src new file mode 100644 index 0000000..10f3391 --- /dev/null +++ b/cookieclicker.src @@ -0,0 +1,126 @@ +//cookie clicker +save=get_shell.host_computer.File(current_path+"/hc.save") +if not save then + get_shell.host_computer.touch(current_path,"hc.save") + save=get_shell.host_computer.File(current_path+"/hc.save") +end if +if save.get_content.len == 0 then save.set_content("0"+char(10)+"0"+char(10)+"0"+char(10)+"0"+char(10)+"0"+char(10)+"0"+char(10)+"0"+char(10)+"0"+char(10)+"Starting out - Start a new game") +cont=save.get_content.split("\n") + +notFine=function() + print("Something has gone terribly wrong! (Most likely you went over the game's max number limit of around 1,000,000,000)") + print("Create new save?") + opt=user_input("[Y/N]> ").lower + if opt == "y" then + save.delete + exit("Please restart game") + else + exit("Reverting to pre-launch save. Please restart game") + end if +end function + +btc=cont[0].val +upgrade=cont[1].val +kiddies=cont[2].val +jpgr=cont[3].val +ehck=cont[4].val +mine=cont[5].val +botnet=cont[6].val +rans=cont[7].val +achievements=cont[8:] + +while true +clear_screen +allFine=1 +if typeof(btc) != "number" then allFine=0 +if typeof(upgrade) != "number" then allFine=0 +if typeof(kiddies) != "number" then allFine=0 +if typeof(jpgr) != "number" then allFine=0 +if typeof(ehck) != "number" then allFine=0 +if typeof(mine) != "number" then allFine=0 +if typeof(botnet) != "number" then allFine=0 +if typeof(rans) != "number" then allFine=0 +if not allFine then notFine() +cps=1*(1+kiddies+(2*jpgr)+(3*ehck)+(4*mine)+(5*botnet)+(6*rans))-1 +cpc=1*(1+upgrade) +btc=btc+cps + +print(kiddies+" Script Kiddies") +print(jpgr+" Junior Programmers") +print(ehck+" Experienced hackers") +print(mine+" Bitcoin Mines") +print(botnet+" Botnets") +print(rans+" Ransoms") +print("\n"+btc+" Bitcoin") +print(cps+" Per second") +print(cpc+" Per hack") + +if btc >= 100 and not achievements.indexOf("100 Bitcoin! - Make 100 Bitcoin.") then + achievements.push("100 Bitcoin! - Make 100 Bitcoin.") + print("Achievement get! 100 Bitcoin!") +end if +if btc >= 1000 and not achievements.indexOf("1000 Bitcoin! - Make 1000 Bitcoin.") then + achievements.push("1000 Bitcoin! - Make 1000 Bitcoin.") + print("Achievement get! 1000 Bitcoin!") +end if +if btc >= 10000 and not achievements.indexOf("10000 Bitcoin! - Make 10000 Bitcoin.") then + achievements.push("10000 Bitcoin! - Make 10000 Bitcoin.") + print("Achievement get! 10000 Bitcoin!") +end if +if btc >= 10000000 and not achievements.indexOf("Bet ya didn't click those.") then + achievements.push("Bet ya didn't click those.") + print("Achievement get! Cheat Bitcoin.") +end if + +saved=[btc,upgrade,kiddies,jpgr,ehck,mine,botnet,rans] +saved=saved+achievements + +print("Actions:") +print("Remember to use the exit action to save your progress!") +print("[Hack] [Shop] [Achievements] [Exit]") +term=user_input("~$ ").lower + +if term == "hack" then btc=btc+cpc + +if term == "shop" then + while true + clear_screen + costs=[10*(1+(kiddies/5)),100*(1+(jpgr/5)),1000*(1+(ehck/5)),10000*(1+(mine/5)),100000*(1+(botnet/5)),1000000*(1+(rans/5)),100*(1+upgrade)] + print("[1] Script Kiddies: "+kiddies+" +1 Cost: "+costs[0]) + print("[2] Junior Programmers: "+jpgr+" +1 Cost: "+costs[1]) + print("[3] Experienced Hackers: "+ehck+" +1 Cost: "+costs[2]) + print("[4] Bitcoin Mines: "+mine+" +1 Cost: "+costs[3]) + print("[5] Botnets: "+botnet+" +1 Cost: "+costs[4]) + print("[6] Ransoms: "+rans+" +1 Cost: "+costs[5]) + print("[7] Upgrade Hacking: "+upgrade+" +1 Cost: "+costs[6]) + print("[8] Return") + opt=user_input("~$").to_int + if opt == 8 or typeof(opt) != "number" or opt > 8 or opt <= 0 then break + attempt=btc-costs[opt-1] + if typeof(attempt) != "number" then allFine=0 + if not allFine then notFine() + if attempt < 0 then + print("Insufficient Bitcoin") + wait(1) + continue + end if + btc=attempt + if opt == 1 then kiddies=kiddies+1 + if opt == 2 then jpgr=jpgr+1 + if opt == 3 then ehck=ehck+1 + if opt == 4 then mine=mine+1 + if opt == 5 then botnet=botnet+1 + if opt == 6 then rans=rans+1 + if opt == 7 then upgrade=upgrade+1 + end while +else if term == "achievements" then + clear_screen + for achievement in achievements + print(achievement) + end for + user_input("[Return]") +else if term == "exit" then + save.set_content(saved.join(char(10))) + exit("-=Exiting!=-") +end if +end while \ No newline at end of file diff --git a/corTech.html b/corTech.html new file mode 100644 index 0000000..8077ced --- /dev/null +++ b/corTech.html @@ -0,0 +1,816 @@ + + + + + + + +
+

corTechs

+

source tools and information

+
+ + + + +

+
+ + + + + + +
+
+ + + + + + +

-welcome to corTechs-

+
+
+
+ [5.1.04] 300 accounts added to banks.txt
+ [4.30.04] secure libs added (ssh/http/router)
+ [4.29.04] [hack attempt] added to player list
+ [4.22.04] 450 accounts added to banks.txt
+ [4.20.04] website relaunched
+ +
+
+
+ +
+






















+

4 unique visits



+ ***spoiler alert***
+ some content may ruin the adventure
+ use as refernce and make something better
+


+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-downloads-



Get Shell
(source)
LAN Map
(source)
+

*basic library attack - returns shell*
+ *works on all devices, remote and local*
+ -exploits all vulnerabilties of target port library
+ -'launch terminal' option when shell found
+ -optional password or lan ip parameter +

+
+

+ *scans lan network and prints map to console*
+ *maps all connections to open/closed ports
+ *full hierarchy with ip/port/device/type/status

+
+ -labels router/switch/firewall
+ -lists all ports and current status +
+
Corrupt Logs
(source)
Secure PC
(source)
+

+ *corrupt local system.log file*
+ -removes all log entries
+ -leaves optional message in system.log
+ -no disconnection log on exit
+ -use: sec [home/server/remote] or [h/s/r] +

+

+
+

+ *Secures local pc*
+ -home/server/remote settings
+ -ONLY run 'home' on home pc
+ -removes all password files
+ -removes guest folder
+ -resets all permissions
+ -(remote: full perms to all users) +

+
File Management List
(fml)
File Handler
(template)

+

+ *file and folder management*
+ *keypad or path navigation*
+ *full permissions control*

+
edit files and folders:
+ -add files and folders
+ -view/add/clear txt/src
+ -move/copy/delete
+ -build .src
+ -launch scripts
+ -empty folders
+ -h for help +
+
+

+ *creates fake computer object from remote file object* +

+










+
Get Remote User
(template)
Connect Wifi
(source)
+

+ *finds user of remote object*
+ *accepts shell/computer/file objects*
+ *returns current user as string ("root/username/guest")*

+
+ requires implementation into existing tool
+ may not work with player edited permissions +
+
+

+ *auto connect to selected wifi*
+

-automatically runs airplay/aircrack
+ -displays password
+ -automatically connects +
+

+
getRich
(source)
+

+ - auto bank finder/decipherer
+ - creates database of vulnerabilities
+ - generates 100-300 deciphered accounts/hr +

+


+
+





















+
+
+ +
+ + + + + + +

-wall of shame-

[notice: ip of hack attempts will be made public]

+
[85.1.223.93]
+ +


















+
+
+ +
+ + + + + +
+
+

Tutorials

+ Beginner:
+
+
+
+
+
+ Intermediate:
+
+
+
+
+ Advanced:
+
+
+
+
+ Scripting:
+
+
+
+ +

Tutorials:

+
[Currently Available]
+ Getting Started:
+ Setting up your accounts.
+ First Mission:
+ Completing the first mission and obtaining your hackshop IP
+ Hackshop Tools:
+ Use and requirements of hackshop tools/exploits.

+ [more to come. no section is considered complete]
+ if you have any questions or suggestions, feel free to contact me
+ menu items will lose their strikeout as content becomes available
+
+
[Getting Started] +

Opening accounts:

+

• Open Browser.exe and search for 'mail'
+ • Select a website and follow the prompts to create a new email account

+

(account credentials are saved in Menu -> Preferences -> Accounts)

+

(some credentials are also saved locally. see security tutorials)

+

• Click the home icon to return to search and search for 'bank'
+ • Select a website and follow the prompts to create a new bank account
+ • Return home and search for 'shop'

+

(think like a hacker and avoid places you might search for new players)

+

• Select a website and navigate to the "shop"
+ • Rent a Basic Server and download nmap +

(you will return later for libraries and computer upgrades)

+

Connecting to a proxy server:

+

• Open Mail.exe
+ • The first email will be the log in credentials for your new server
+ • Open a new Terminal.exe and enter 'ssh root@[password] [ip]'

+

(this is your proxy server. any action risking exposure should be completed here)
+ (it is advisable that home and servers be secured before exploring player content)

+

• The second email is your first job. Continue to the next section for more information.
+

+
[Completing the First Mission] +

Gathering information:

+

• The first step when starting any attack should be to 'nmap' your target

+

(if you have not already installed nmap, you can download it from any regular shop)

+

• Enter 'nmap [ip]' in the terminal for port and library details
+ • You can see that an SSH port is open to outside connection +

(connect to any open ssh port with 'ssh [user]@[password] [ip]')
+ (until you have tools or access to a hackshop, this is the only way to access this server.

+

• Another way to gather information about a target IP is 'whois [ip]'
+

Obtaining login credentials:

+

• Social Engineering has many uses, including ways to obtain user credentials
+ • Open Mail.exe and click the pencil to access email templates

+

Finding and deciphering the data:

+

• Once a password is obtained, use 'ssh' to connect to the user
+ • Locate the users email file and use 'decipher /file/path' to crack the email password
+

(decipher is included as an attachment with the mission email)

+

• Once the password has been deciphered, reply to the email with only the password
+ • You will hear back shortly with the IP of a private hackshop

+

(hackshop IPs are private. sharing or using someone elses IP puts you at risk.)

+

• Continue to the next section for information on hackshops

+
+
[Hackshop Tools]
+

-Hack Shop Tools-

+

(some tools and default programs can be compiled locally (and for free) by clicking 'view code' in Manual.exe)

+

+ •AdminMonitor.exe: Monitors for admin activity on hacked connections

+

Keep this running on your home PC any time you are hacking npc networks
+ If an active trace begins, you need to remove your shell/deletion logs and exit the machine

+

+ •crypto.so: Required for cracking, hacking wifi and obtaining an smtp user list

+

This should be kept in /lib on any computer you use to decipher passwords

+

+ •metaxploit.so: Required for most hacking. Used to attack libraries, create rshell/server and run sniffers.

+

This should be kept in /lib for all default exploit tools.
+ (see advanced tools for more details)

+

+ •decipher: Password deciphering tool. Utilizes crypto.so library.

+

+ •scanlib: Library scanning tool. Utilizes metaxploit.so libray

+

Scans local library and returns a list of exploitable memory values and their requirements

+

+ •scanrouter: Firewall detection tool. Returns firewall information for a router.

+

+ •sniffer & rshell: NPC/Player hacking tools.

+

(see hackshop jobs and hacking players for more details)

+ + +
+
[Hackshop Jobs] + +
+
[Understanding Libraries] + +
+
[Understanding Networks] + +
+
[Securing Your Home and Servers]
+ +
+
-Protect your information-

+
+ The obvious but not always easy way to ensure your security is to not let anyone obtain your IP address.
+ Some of the common ways a hacker will attempt to locate your information are the following:

+
+ •Finding your ip in logs from websites, servers, shops, etc
+ •Tricking you into running a malicious file or visiting a server
+ •Using social engineering to obtain useful information
  + •Keep all of this in mind when interacting with players, player content, and searching the web +
+
+

+
+
-Fix your permissions-

+
+ When you load into a new system, all user permissions will be set to defaul configuration. Typically, this type of configuration can lead to vulnerabilities, allowing hackers to read, create and execute files with low level permissions. + In order to prevent this, you must constantly ensure that your system settings provide only the permissions necessary to remain functional.
+

+ •To change system permissions, use the chmod command + +

+ usage: chmod [opt:-R] [u,g,o+wrx] [path file/folder]
+ -R: applies permissions recursively
+ u,g,o: user = root; g = group(users); o = other(guest)
+ only one user type can be used at a time
+ rwx: r = read; w = write; x = execute
+ set multiple at once: u+rwx o-w g+rx
+

+ + •The entire file system can be changed with
+ •Individual folders and files can be changed with
+ •never remove group execute permissions from essential start up files on your home pc
+ ie: Terminal.exe and sudo + A server should have permissions removed for all users, on all files and folders + + -Update your port forwarding- + + Port forwarding allows you to open (or close) access to running services. + By default, your home computer will usually have at least one port forward + To an NPC service running in your network. Since you will never need to access + your home from an external source, and you should not host services from your + Home ip, the best practice is to simply remove all port access + + To access port forwarding options, type in terminal: Browser.exe [gateway ip]:8080 + If you do not know your gateway ip, use if config in terminal or launch ScanLan.exe + (Typically, the router IP will be: 192.168.1.1... but not always. + Eg: Browser.exe 192.168.1.1 + + -get secure libraries- + + Libraries, or .so files, are internal files that are automatically generated + when a server is first generated into the world or when a service is started + Using the service start files (ie: http-server). + +
+
+ +
+ +
+
[Sniffers and Reverse Shells] + + +
+
[Hacking Websites] + +
+
[How to Find Players] + +
+
[Hacking Players] + +
+ +
+
+
+ + + + + + + + + + diff --git a/cryptlib.src b/cryptlib.src new file mode 100644 index 0000000..4372cf8 --- /dev/null +++ b/cryptlib.src @@ -0,0 +1,811 @@ +//CryptLib +CryptLib={} +CryptLib.MaxCode=65536 + +CryptLib.ToBinary=function(string=null,bits=0) + if string == null then return + if typeof(bits) != "number" then bits=0 + if typeof(string) == "string" then + grouped=[] + for i in string + f="" + i=i.code + while i >= 0 + rem=i%2 + i=i-rem + f=rem+f + i=i/2 + if i == 0 then break + end while + if f.len > bits then bits=f.len + while f.len < bits + f="0"+f + end while + grouped.push(f) + end for + return grouped.join(" ") + else if typeof(string) == "number" then + f="" + n=0 + i=string + if i < 0 then n=1 + if n then i=abs(i) + while i > 0 + rem=i%2 + i=i-rem + f=rem+f + i=i/2 + end while + + while f.len < bits + f="0"+f + end while + if n then + nn="" + for i in f + if i == "0" then nn=nn+"1" + if i == "1" then nn=nn+"0" + end for + f=CryptLib.ToBinary(CryptLib.FromBinary(nn,nn.len)+1,nn.len) + end if + return f + else + return null + end if +end function + +CryptLib.FromBinary=function(binary=null,bits=null) + if binary.split(" ").len != 1 then + bits=binary.split(" ")[0].len + binary=binary.split(" ").join("") + end if + if not bits then return + if not binary or typeof(binary) != "string" then return + grouped=[] + s=[] + while binary.len != 0 + f=binary[:bits] + binary=binary[bits:] + if binary == null then binary="" + grouped.push(f) + end while + + for f in grouped + t=0 + for i in range(0,str(f).len-1) + c=f.len-1 + c=c-i + i=f[i].to_int + t=t+(i*(2^c)) + end for + s.push(t) + end for + if s.len == 1 then s=s[0] + return s +end function + +CryptLib.Vigenere=function(string=null, key=null, type=null) + if key == null then key = active_user + if not type or typeof(type) != "string" or (type != "enc" and type != "dec") then return null + if not string or typeof(string) != "string" then return null + keySize=key.len + answer="" + counter=0 + for i in string + currKey=key[counter] + final = (i.code+currKey.code) % CryptLib.MaxCode + answer=answer+char(final) + counter=(counter+1) % keySize + end for + return answer +end function + +CryptLib.ROT=function(pos=null,string=null) + if typeof(pos) != "number" then return "NaN" + if pos <= 0 then return "Rot must be greater than 0" + if not string or typeof(string) != "string" then return + cases=[] + cases.push("abcdefghijklmnopqrstuvwxyz") + cases.push("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + newString=[] + for i in string + case=null + for c in cases + if c.indexOf(i) != null then case=c + end for + if not case then + newString.push(i) + continue + end if + ind=case.indexOf(i) + newPos=(ind+pos)%case.len + newString.push(case[newPos]) + end for + return newString.join("") +end function + +CryptLib.Base64=function(string=null,type=null) + if not string or typeof(string) != "string" then return + + if not type or typeof(type) != "string" or (type != "enc" and type != "dec") then return + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + alphaLen=alpha.len-1 + based=null + + if type == "enc" then + grouped=[] + while string.len != 0 + s=string[:3] + string=string[s.len:] + if string == null then string="" + grouped.push(CryptLib.ToBinary(s,8).split(" ").join("")) + end while + + based="" + for g in grouped + block=[] + while g.len != 0 + s=g[:6] + g=g[s.len:] + if g == null then g="" + while s.len < 6 + s=s+"0" + end while + block.push(s) + end while + for i in block + based=based+alpha[CryptLib.FromBinary(i,i.len)%alphaLen] + end for + check=block.len + while check != 4 + based=based+"=" + check=check+1 + end while + end for + else + grouped=[] + while string.len != 0 + block=[] + s=string[:4] + string=string[s.len:] + if string == null then string="" + for i in s + if i == "=" then continue + block.push(CryptLib.ToBinary(alpha.indexOf(i),6)) + end for + grouped.push(block.join("")) + end while + + based="" + for g in grouped + block=[] + while g.len != 0 + s=g[:8] + g=g[s.len:] + if g == null then g="" + while s.len < 8 + s="0"+s + end while + block.push(s) + end while + for i in block + based=based+char(CryptLib.FromBinary(i,i.len)) + end for + end for + end if + return based +end function + +CryptLib.Sha256=function(string=null) + if not string or typeof(string) != "string" then return + + Blocks = [[0]] + i=0 + e=0 + while i < string.len + e=4 + while e > 0 and string.hasIndex(i) + e=e-1 + Blocks[-1][-1] = Blocks[-1][-1] + code(string[i])*256^e + i=i+1 + end while + if e == 0 then + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] else Blocks[-1] = Blocks[-1] + [0] + end if + end while + + if e > 0 then + Blocks[-1][-1] = Blocks[-1][-1] + (2147483648/256^(4-e)) + else + Blocks[-1][-1] = 2147483648 + end if + + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] + while Blocks[-1].len != 15 + Blocks[-1] = Blocks[-1] + [0] + end while + + Blocks[-1] = Blocks[-1] + [string.len*8] + + add = function(a, b) + return (a + b) % 4294967296 + end function + + XOR = function(a, b) + return bitwise("^", floor(a/65536), floor(b/65536))*65536+bitwise("^", a%65536, b%65536) + end function + + AND = function(a, b) + return bitwise("&", floor(a/65536), floor(b/65536))*65536+bitwise("&", a%65536, b%65536) + end function + + OR = function(a, b) + return bitwise("|", floor(a/65536), floor(b/65536))*65536+bitwise("|", a%65536, b%65536) + end function + + NOT = function(n) + return 4294967295-n + end function + + Ch = function(x, y, z) + return OR(AND(x, y), AND(NOT(x), z)) + end function + + Maj = function(x, y, z) + return OR(OR(AND(x, y), AND(x, z)), AND(y, z)) + end function + + shr = function(n, shifts) + return floor(n/2^shifts) + end function + + rotr = function(n, rots) + rots = 2^rots + return (n % rots) * (4294967296/rots) + floor(n/rots) + end function + + sigma0 = function(n) + return XOR(XOR(rotr(n, 7), rotr(n, 18)), shr(n, 3)) + end function + + sigma1 = function(n) + return XOR(XOR(rotr(n, 17), rotr(n, 19)), shr(n, 10)) + end function + + SIGMA0 = function(n) + return XOR(XOR(rotr(n, 2), rotr(n, 13)), rotr(n, 22)) + end function + + SIGMA1 = function(n) + return XOR(XOR(rotr(n, 6), rotr(n, 11)), rotr(n, 25)) + end function + + K = [] + K = K + [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221] + K = K + [3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580] + K = K + [3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986] + K = K + [2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895] + K = K + [666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037] + K = K + [2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344] + K = K + [430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779] + K = K + [1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298] + + H = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225] + + for Block in Blocks + W = Block[0:] + + for i in range(16, 63) + W = W + [add(add(add(sigma1(W[i-2]), W[i-7]), sigma0(W[i-15])), W[i-16])] + end for + + a = H[0] + b = H[1] + c = H[2] + d = H[3] + e = H[4] + f = H[5] + g = H[6] + h = H[7] + + for i in range(0, 63) + T1 = add(add(add(add(SIGMA1(e), Ch(e, f, g)), h), K[i]), W[i]) + T2 = add(SIGMA0(a), Maj(a, b, c)) + h = g + g = f + f = e + e = add(d, T1) + d = c + c = b + b = a + a = add(T1, T2) + end for + H[0] = add(a, H[0]) + H[1] = add(b, H[1]) + H[2] = add(c, H[2]) + H[3] = add(d, H[3]) + H[4] = add(e, H[4]) + H[5] = add(f, H[5]) + H[6] = add(g, H[6]) + H[7] = add(h, H[7]) + end for + + hexTable = "0123456789abcdef" + output = "" + for i in H.indexes + for j in range(7) + output = output + hexTable[floor(H[i]/16^j) % 16] + end for + end for + return output +end function + +CryptLib.genRandomString=function(length=null) + if not length or typeof(length) != "number" then return + newString="" + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890" + while newString.len < length + string=alpha[floor(rnd*alpha.len)] + newString=newString+string + end while + return newString +end function + +CryptLib.Serialize=function(array=null,fancy=0) + if not array then return + //if typeof(array) != "list" and typeof(array) != "map" then return + type=typeof(array) + if type == "number" or type == "string" then return + type=null + if typeof(array) == "map" or array.indexes.hasIndex("classID") then type="map" + if typeof(array) == "list" then type="list" + if type == null then return null + + if type == "list" then + string="[" + list=array + else + string="{" + list=array.indexes + end if + if fancy then + string=string+char(10) + if CryptLib.hasIndex("SERN") then CryptLib.SERN=CryptLib.SERN+1 else CryptLib.SERN=1 + N=CryptLib.SERN + end if + + for i in list.indexes + if type == "map" then v=@array[list[i]] else v=@array[i] + vt=typeof(@v) + if vt == "function" then + v="Err_Function_CannotSerialize" + vt="string" + end if + if fancy then + if vt == "map" or vt == "list" then v=CryptLib.Serialize(v,1) + else + if vt == "map" or vt == "list" then v=CryptLib.Serialize(v) + end if + + if type == "list" then + if vt == "string" then v=""""+v+"""" + if i == list.indexes[-1] then string=string+v else string=string+v+", " + else + if typeof(list[i]) == "string" then l=""""+list[i]+"""" else l=list[i] + if vt == "string" then v=""""+v+"""" + if fancy then + if i == list.indexes[-1] then string=string+(" "*N)+l+": "+v else string=string+(" "*N)+l+": "+v+"," + string=string+char(10) + else + if i == list.indexes[-1] then string=string+l+": "+v else string=string+l+": "+v+", " + end if + + end if + end for + + if fancy then + if type == "list" then string=string+(" "*(N-1))+"]" else string=string+(" "*(N-1))+"}" + else + if type == "list" then string=string+"]" else string=string+"}" + end if + + if fancy and N == 1 then CryptLib.remove("SERN") + return string +end function + +CryptLib.Deserialize=function(string=null) + if not string or typeof(string) != "string" then return + type=null + if string[0] == "[" then type="list" + if string[0] == "{" then type="map" + if type == null then return null + + if type == "list" then + newArray=[] + else + newArray={} + end if + string=string.split(char(10)).join("") + string=string[1:-1] + if not string then return newArray + a=[] + b=[] + c=0 + for i in range(0,string.len-1) + v=string[i] + if v == "{" or v == "[" then c=c+1 + if v == "}" or v == "]" then c=c-1 + if v == "," and c == 0 then + a.push(b.join("")) + b=[] + continue + end if + b.push(v) + if i == string.len-1 then + a.push(b.join("")) + b=[] + continue + end if + end for + string=a + + for i in string + i=i.trim + if type == "list" then + if i[0] == """" and i[-1] == """" then + i=i[1:-1] + else + if i == "null" then + i=null + else if i == "true" then + i=1 + else if i == "false" then + i=0 + else if i[0] == "{" or i[0] == "[" then + i=CryptLib.Deserialize(i) + else + nv="" + dc=0 + for l in i + if l == "." then + if dc == 1 then break + nv=nv+"." + end if + if "0123456789E-".indexOf(l) != null then nv=nv+l + end for + if nv != "" then i=i.val + end if + end if + + newArray.push(i) + else + k=i[0:i.indexOf(":")] + if k[0] == """" then k=k[1:-1] + v=i[i.indexOf(":")+1:] + if v[0] == " " then v=v[1:] + if v[0] == """" then + v=v[1:-1] + else + if v == "null" then + v=null + else if v == "true" then + v=1 + else if v == "false" then + v=0 + else if v[0] == "{" or v[0] == "[" then + v=CryptLib.Deserialize(v) + else + nv="" + dc=0 + for l in v + if l == "." then + if dc == 1 then break + nv=nv+"." + end if + if "0123456789E-".indexOf(l) != null then nv=nv+l + end for + if nv != "" then v=v.val + end if + end if + newArray[k]=v + end if + end for + + return newArray +end function + +CryptLib.Compression=function(string=null,type=null) + basedictcompress={} + basedictdecompress={} + + for i in range(0,65535) + if i >= 55296 and i <= 57343 then continue + ic = char(i) + iic = char(i)+char(0) + basedictcompress[ic]=iic + basedictdecompress[iic]=ic + end for + + dictAddA=function(str,dict,a,b) + if a >= 65536 then + a = 0 + b=b+1 + if b >= 65536 then + dict={} + b=1 + end if + end if + dict[str] = char(a)+char(b) + a=a+1 + return [dict,a,b] + end function + + compress=function(input) + if typeof(input) != "string" then return + len = input.len + if len <= 1 then return "u"+input + + dict={} + a=0 + b=1 + + result=["c"] + resultLen=result.len + + word="" + + for i in range(0,len-1) + c=input[i] + wc=word+c + if not (basedictcompress.hasIndex(wc) or dict.hasIndex(wc)) then + write=null + if basedictcompress.hasIndex(word) then + write=basedictcompress[word] + else if dict.hasIndex(word) then + write=dict[word] + end if + if not write then return "algo err. no word" + result.push(write) + resultLen=result.len + if len <= resultLen then return "u"+input + dict=dictAddA(wc, dict, a, b) + a=dict[1] + b=dict[2] + dict=dict[0] + word=c + else + word=wc + end if + end for + if basedictcompress.hasIndex(word) then result.push(basedictcompress[word]) else result.push(dict[word]) + resultLen = result.len + if len <= resultLen then return "u"+input + return result.join("") + end function + + dictAddB=function(str,dict,a,b) + if a >= 65536 then + a=0 + b=b+1 + if b >= 65536 then + dict={} + b=1 + end if + end if + dict[char(a)+char(b)]=str + a=a+1 + return [dict,a,b] + end function + + decompress=function(input) + if typeof(input) != "string" then return "invalid type: "+typeof(input) + + if input.len < 1 then return "invalid compression" + + control=input[0] + if control == "u" then + return input[1:] + else if control != "c" then + return "invalid compression" + end if + input=input[1:] + len=input.len + + if len < 2 then return "invalid compression" + + dict={} + a=0 + b=1 + + result = [] + last=input[0:2] + + if basedictdecompress.hasIndex(last) then + result.push(basedictdecompress[last]) + else if dict.hasIndex(last) then + result.push(dict[last]) + end if + + for i in range(2, len-1, 2) + code=input[i:i+2] + lastStr=null + if basedictdecompress.hasIndex(last) then + lastStr=basedictdecompress[last] + else if dict.hasIndex(last) then + lastStr=dict[last] + end if + if lastStr == null then return "could not find last" + + if basedictdecompress.hasIndex(code) then + toAdd=basedictdecompress[code] + else if dict.hasIndex(code) then + toAdd=dict[code] + else + toAdd=0 + end if + + if toAdd then + result.push(toAdd) + dict=dictAddB(lastStr+toAdd[0],dict,a,b) + a=dict[1] + b=dict[2] + dict=dict[0] + else + tmp = lastStr+lastStr[0] + result.push(tmp) + dict=dictAddB(tmp,dict,a,b) + a=dict[1] + b=dict[2] + dict=dict[0] + end if + + last=code + end for + + return result.join("") + end function + + if type == "compress" then + return compress(string) + else if type == "decompress" then + return decompress(string) + else + return + end if +end function + +CryptLib.Encrypt=function(type,initial=null,key=null) + if type != "enc" and type != "dec" and type != "gen" then return + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + al=alpha.len + if type == "gen" then + isPrime=function(num) + primes=[] + if num <= 0 then return 0 + if num <= 2 then return 1 + if (num%2) == 0 then return 0 + + i=num/2 + if str(i)[-2:] != ".5" then return 0 + return 1 + end function + + GCD=function(num1,num2) + if num2 == 0 then return num1 + return GCD(num2,num1%num2) + end function + + LCM=function(num1,num2) + num1=abs(num1)*(abs(num2)/GCD(num1,num2)) + return abs(num2)*(abs(num1)/GCD(num1,num2)) + end function + check="1.0" + + while check.len > 1 + out={} + + p=0 + q=0 + + while not isPrime(p) + p=ceil(rnd*100000000000000) + end while + + while not isPrime(q) or q == p + q=ceil(rnd*100000000000000) + end while + + c=LCM(p-1,q-1) + + e=0 + + while not e or (1 > e > c and GCD(e,c) != 1) + e=ceil(rnd*100000000) + end while + + out.pub=e + out.priv=(e^(-1))%c + + + check=str(out.priv*out.pub) + end while + return out + end if + + if type == "enc" then + if not initial or key == null then return + nn=[] + for i in initial + nn.push(CryptLib.ToBinary(i.code*key,36)) + end for + + cipher="" + for g in nn + block=[] + while g.len != 0 + s=g[:6] + g=g[s.len:] + if g == null then g="" + while s.len < 6 + s=s+"0" + end while + block.push(s) + end while + + for i in block + cipher=cipher+alpha[CryptLib.FromBinary(i,6)%al] + end for + end for + return cipher + else if type == "dec" then + if not initial or key == null then return + nn=[] + while initial.len != 0 + block=[] + s=initial[:6] + initial=initial[s.len:] + if initial == null then initial="" + for i in s + block.push(CryptLib.ToBinary(alpha.indexOf(i),6)) + end for + nn.push(block.join("")) + end while + + cipher="" + for g in nn + cipher=cipher+char(CryptLib.FromBinary(g,36)*key) + end for + return cipher + end if +end function + +CryptLib.Manual=function() + s=[] + s.push("Clover's CryptLib Manual") + s.push("Reminder ""Type"" refers to a string ""enc"" (encrypt) or ""dec"" (decrypt)") + s.push("\nCryptLib.Encrypt(type,string,key)") + s.push("Encrypts a string using Clover's custom encryption (Type=""gen"": gen keys, ""enc"": encrypt, ""dec"": decrypt)") + s.push("\nCryptLib.Manual") + s.push("Prints a manual listing every feature") + s.push("\nCryptLib.ToBinary(string,bits)") + s.push("Converts a string to binary, semi-variable length") + s.push("\nCryptLib.FromBinary(string,bits)") + s.push("Converts a string from binary, MUST be the same bits length you used with CryptLib.ToBinary(), unless separated by spaces.") + s.push("\nCryptLib.Vigenere(string,key,type)") + s.push("Encrypt or decrypt a string using the Vigenere cipher") + s.push("\nCryptLib.ROT(string,rotation)") + s.push("Encrypt or decrypt a string using an alphabet ROTation cipher") + s.push("\nCryptLib.Base64(string,type)") + s.push("Converts a string to and from Base64") + s.push("\nCryptLib.Sha256(string)") + s.push("Hashes a string using Sha256") + s.push("\nCryptLib.genRandomString(length)") + s.push("Generates a random string (A-Z, a-z, 0-9)") + s.push("\nCryptLib.Serialize(array)") + s.push("Converts an array into a string (map/list)") + s.push("\nCryptLib.Deserialize(string)") + s.push("Converts a string back into an array (map/list)") + s.push("\nCryptLib.Compression(string,type)") + s.push("Compresses and decompresses a string using LZW compression, 'type' must be either 'compress' or 'decompress'") + return s.join("\n") +end function \ No newline at end of file diff --git a/cyphlib.src b/cyphlib.src new file mode 100644 index 0000000..776f88d --- /dev/null +++ b/cyphlib.src @@ -0,0 +1,225 @@ +Cyphlib = {"README":"Build and run code with `print(Cyphlib.Help)` to get manual"} +Cyphlib.Unicode_max = 65536 + +Cyphlib.Hide = function(message, key = null) + if (key == null) then key = active_user + locals.key_size = key.len + locals.anwser = "" + locals.counter = 0 + for i in message + locals.key_current = key[locals.counter] + locals.final = (i.code + locals.key_current.code) % Cyphlib.Unicode_max + locals.anwser = locals.anwser + char(locals.final) + locals.counter = locals.counter + 1 + locals.counter = locals.counter % locals.key_size + end for + return locals.anwser +end function + +Cyphlib.Open = function(message, key = null) + if (key == null) then key = active_user + locals.key_size = key.len + locals.anwser = "" + locals.counter = 0 + for i in message + locals.key_current = key[locals.counter] + locals.final = (i.code - locals.key_current.code) + if locals.final < 0 then locals.final = Cyphlib.Unicode_max - locals.final + locals.anwser = locals.anwser + char(locals.final) + locals.counter = locals.counter + 1 + locals.counter = locals.counter % locals.key_size + end for + return locals.anwser +end function + +// param1 = path, param2 = params ([key-rhc]) +Cyphlib.HideFile = function(param1, param2 = null) + locals.rec = false + locals.key = active_user + + if typeof(param1) != "file" then + print("This function only for file encryption") + return null + end if + + if param2 != null then + if param2 != null and param2.indexOf("-") == null then + locals.key = param2 + else + if param2[:param2.indexOf("-")] and param2[:param2.indexOf("-")] != "" then + locals.key = param2[:param2.indexOf("-")] + end if + if param2[param2.indexOf("-"):].indexOf("r") or param2[param2.indexOf("-"):].indexOf("R") then + locals.rec = true + end if + end if + end if + + if locals.rec and not param1.is_folder then + print("Can't use -R for nonfolder file") + return null + end if + + // non -R alg + if not locals.rec then + if not param1.is_binary then + if param1.has_permission("r") and param1.has_permission("w") then + locals.encrfin = Cyphlib.Hide(param1.get_content, locals.key) + param1.set_content(locals.encrfin) + end if + end if + return true + end if + + // -R alg + locals.txtfls = [] + locals.fldrs = param1.get_folders + for i in locals.fldrs + if i.has_permission("r") then + locals.fldrs = Cyphlib.Merge(locals.fldrs, i.get_folders) + end if + end for + locals.untxtfls = locals.fldrs + locals.postfldrs = locals.fldrs + locals.fldrs.push(param1) + + for i in locals.postfldrs + for j in i.get_files + if j.is_binary then locals.untxtfls.push(j) else locals.txtfls.push(j) + end for + end for + + for i in locals.txtfls + if i.has_permission("w") then + locals.encrfin = Cyphlib.Hide(i.get_content, locals.key) + i.set_content(locals.encrfin) + end if + end if + end for + + return true +end function + + +Cyphlib.OpenFile = function(param1, param2 = null) + locals.rec = false + + locals.key = active_user + + if typeof(param1) != "file" then + print("This function only for file encryption") + return null + end if + + if param2 then + if param2 != null and param2.indexOf("-") == null then + locals.key = param2 + else + if param2[:param2.indexOf("-")] and param2[:param2.indexOf("-")] != "" then + locals.key = param2[:param2.indexOf("-")] + end if + if param2[param2.indexOf("-"):].indexOf("r") or param2[param2.indexOf("-"):].indexOf("R") then locals.rec = true + end if + end if + + if locals.rec and not param1.is_folder then + print("Can't use -R for nonfolder file") + return null + end if + + // non -R alg + if not locals.rec then + if not param1.is_binary then + if param1.has_permission("r") and param1.has_permission("w") then + locals.encrfin = Cyphlib.Open(param1.get_content, locals.key) + param1.set_content(locals.encrfin) + end if + end if + return true + end if + + // -R alg + locals.txtfls = [] + locals.fldrs = param1.get_folders + for i in locals.fldrs + if i.has_permission("r") then + locals.fldrs = Cyphlib.Merge(locals.fldrs, i.get_folders) + end if + end for + locals.untxtfls = locals.fldrs + locals.postfldrs = locals.fldrs + locals.fldrs.push(param1) + + for i in locals.postfldrs + for j in i.get_files + if j.is_binary then locals.untxtfls.push(j) else locals.txtfls.push(j) + end for + end for + + for i in locals.txtfls + if i.has_permission("w") then + locals.encrfin = Cyphlib.Open(i.get_content, locals.key) + i.set_content(locals.encrfin) + end if + end if + end for + + return true +end function + + +Cyphlib.Merge = function(list1, list2) + locals.fin_list = list1 + for i in list2 + locals.fin_list.push(i) + end for + return locals.fin_list +end function + + +Cyphlib.Functions = ["Help", "Merge", "HideFile", "OpenFile", "Open", "Hide"] + + +Cyphlib.Help = function(findKey = "") + locals.funcs = {} + locals.anws = "Cyphlib manual (Cyphlib.[function])" + char(10) + char(10) + locals.funcs["Main"] = locals.anws + locals.anws = "string Hide(message:string, [opt:key:string])" + char(10) + locals.anws = locals.anws + "Hides a string using the Vigenere cipher." + char(10) + locals.anws = locals.anws + "If key isn't specified function uses active_user as key." + char(10) + char(10) + locals.funcs["Hide"] = locals.anws + locals.anws = "string Open(message:string, [opt:key:string])" + char(10) + locals.anws = locals.anws + "Reverse of Hide(message:string, [opt:key:string])" + char(10) + locals.anws = locals.anws + "Decrypts Vigenere cipher." + char(10) + locals.anws = locals.anws + "Also if key is unspecified uses active_user as key." + char(10) + char(10) + locals.funcs["Open"] = locals.anws + locals.anws = "list Merge(list1: list, list2: list)" + char(10) + locals.anws = locals.anws + "Returns new list, where first part consists of elements are elements of list1," + char(10) + locals.anws = locals.anws + "last part of element of list2" + char(10) + char(10) + locals.funcs["Merge"] = locals.anws + locals.anws = "string Help([opt:findKey: string])" + char(10) + locals.anws = locals.anws + "Returns string which contains Cyphlib's manual for using." + char(10) + locals.anws = locals.anws + "If you send argument in function, it will output only similarly named functions" + char(10) + locals.anws = locals.anws + "(use findKey only with name of function: Help, Open, etc)." + char(10) + char(10) + locals.funcs["Help"] = locals.anws + locals.anws = "bool/null HideFile(_file: file, [opt:params: string])" + char(10) + locals.anws = locals.anws + "Returns bool or null (as exception with input error message)." + char(10) + locals.anws = locals.anws + "Function encrypts every txt file in area of application." + char(10) + locals.anws = locals.anws + "It also can take an argument of the form `[encryption key]-[opt:r]` or" + char(10) + locals.anws = locals.anws + "just `[encryption key]`/`[-r]`. If `r` is passed then it will run recursively." + char(10) + locals.anws = locals.anws + "Replaces contents with function string Hide(message:string, [opt:key:string])" + char(10) + char(10) + locals.funcs["HideFile"] = locals.anws + locals.anws = "bool/null OpenFile(_file: file, [opt:params: string]" + char(10) + locals.anws = locals.anws + "Reverse function of bool/null HideFile(_file: file, [opt:params: string])." + char(10) + locals.anws = locals.anws + "Function decrypts every txt file in area of aplication." + char(10) + locals.anws = locals.anws + "It also can take an argument of the form `[encryption key]-[opt:r]` or" + char(10) + locals.anws = locals.anws + "just `[encryption key]`/`[-r]`. If `r` is passed then it will run recursively." + char(10) + locals.anws = locals.anws + "Replaces contents with function string Open(message:string, [opt:key:string])" + char(10) + char(10) + locals.funcs["OpenFile"] = locals.anws + locals.finalanw = locals.funcs["Main"] + + for i in Cyphlib.Functions + if i.lower.indexOf(findKey.lower) != null then locals.finalanw = locals.finalanw + locals.funcs[i] + end for + return locals.finalanw +end function \ No newline at end of file diff --git a/decipher.src b/decipher.src new file mode 100644 index 0000000..1ce12bb --- /dev/null +++ b/decipher.src @@ -0,0 +1,24 @@ +cp=include_lib("/lib/crypto.so") +GetPassword = function(userPass) + password=cp.decipher(userPass) + return(password) +end function +if params.len != 1 then exit +origFile = params[0] +if origFile.len < 32 then exit +lines=[origFile] +for line in lines + userPass=line.split(":") + if userPass.len == 2 then + user=userPass[0] + userPass=userPass[1] + password=GetPassword(userPass) + if not password then print("password for "+user+" not found") + if password then print(user+":"+password) + else + userPass=userPass[0] + password=GetPassword(userPass) + if not password then print ("could not decipher "+userPass) + if password then print(password) + end if +end for \ No newline at end of file diff --git a/enigmatic_theme_3.3.txt b/enigmatic_theme_3.3.txt new file mode 100644 index 0000000..e0a81b1 --- /dev/null +++ b/enigmatic_theme_3.3.txt @@ -0,0 +1,255 @@ + + + + <r>0</r> + <g>8</g> + <b>21</b> + <a>158</a> + + + 224 + 224 + 224 + 255 + + + 0 + 0 + 0 + 0 + + + 224 + 224 + 224 + 255 + + + 0 + 8 + 21 + 171 + + + 113 + 65 + 196 + 255 + + + 113 + 65 + 196 + 255 + + + 224 + 224 + 224 + 255 + + + 72 + 78 + 87 + 137 + + + 113 + 65 + 196 + 255 + + + 15 + 15 + 15 + 0 + + + 113 + 65 + 196 + 255 + + + 130 + 84 + 209 + 255 + + + 224 + 224 + 224 + 255 + + + 0 + 8 + 21 + 0 + + + 255 + 255 + 255 + 0 + + + 107 + 68 + 173 + 255 + + + 138 + 90 + 221 + 203 + + + 224 + 224 + 224 + 255 + + + 174 + 174 + 174 + 132 + + + 224 + 224 + 224 + 255 + + + 0 + 8 + 21 + 220 + + + 224 + 224 + 224 + 255 + + + 62 + 69 + 81 + 164 + + + 255 + 255 + 255 + 119 + + + 174 + 174 + 174 + 131 + + + 224 + 224 + 224 + 255 + + + 224 + 224 + 224 + 255 + + + 130 + 84 + 209 + 255 + + + 130 + 84 + 209 + 138 + + + 113 + 65 + 196 + 137 + + + 0 + 8 + 21 + 171 + + + 70 + 75 + 82 + 210 + + + 224 + 224 + 224 + 255 + + + 224 + 224 + 224 + 255 + + + 0 + 0 + 0 + 73 + + + 32 + 32 + 32 + 255 + + + 48 + 48 + 48 + 255 + + + 224 + 224 + 224 + 255 + + + 130 + 84 + 209 + 255 + + + 224 + 224 + 224 + 255 + + + 82 + 82 + 82 + 255 + + \ No newline at end of file diff --git a/file.src b/file.src new file mode 100644 index 0000000..6886d63 --- /dev/null +++ b/file.src @@ -0,0 +1,38 @@ +//file for use with the tracelib ctf +content="IPAddr" +start=host_set_time_start + +if floor(start-time) > host_set_time_end then exit("This files time-delay deletion switch has been triggered") + +genRandomString=function(cont) + newString="" + alpha="abcdefghijklmnopqrstuvwxyz0123456789" + for i in str(abs(cont)) + string=alpha[i.to_int] + newString=newString+string + end for + return newString +end function + +string=genRandomString(hash(content)) + +analysis=md5(string) + +if params.len == 0 then exit("Encrypted file, cannot access content") + +if params[0] == "Analyze" then + if not get_shell.host_computer.File(program_path+".alz") then + get_shell.host_computer.touch(current_path,program_path.split("/")[-1]+".alz") + get_shell.host_computer.File(program_path+".alz").set_content(analysis) + else + print("File already analyzed.") + end if + exit +end if + +if params[0] == "Debug" or params[0] == string then + print("Password confirmed, accessing content") + exit(content) +end if + +if params[0] != string then exit("Invalid password") \ No newline at end of file diff --git a/fourman.src b/fourman.src new file mode 100644 index 0000000..6b649ee --- /dev/null +++ b/fourman.src @@ -0,0 +1,46 @@ +//FourMan "Window Manager" +import_code("/root/dapi.so") +CHAR_EMPTY=" " +CHAR_POINTER="X" +pointer=[floor(60/2),floor(13/2)] +tinput_focus=0 +apps={} +windows={} +apps.exit={"name": "ExitMan", "index": 0, "icon": [["E","X","I","T"]], "file": current_path+"/fourmandata/apps/exit.fs"} + +changeframe=function() + frame=[] + for y in range(0,13) + n=[] + for x in range(0,60) + if x == pointer[0] and y == pointer[1] then n.push(CHAR_POINTER) else n.push(CHAR_EMPTY) + end for + frame.push(n) + end for + frame.reverse + return frame +end function + +interpret_input=function(input) + if ["DownArrow","UpArrow","LeftArrow","RightArrow"].indexOf(input) != null and not tinput_focus then + y=pointer[1] + x=pointer[0] + if input == "DownArrow" then y=y-1 + if input == "UpArrow" then y=y+1 + if y > 13 then y=13 + if y < 0 then y=0 + if input == "LeftArrow" then x=x-1 + if input == "RightArrow" then x=x+1 + if x > 60 then x=60 + if x < 0 then x=0 + return [x,y] + end if +end function + + +print("FourMan Window Manager") +while true + frame=changeframe + dim.printf(frame,0) + pointer=interpret_input(user_input(char(10),0,1)) +end while \ No newline at end of file diff --git a/foxcoin.html b/foxcoin.html new file mode 100644 index 0000000..b906fe4 --- /dev/null +++ b/foxcoin.html @@ -0,0 +1,160 @@ + +FOX Coin + + + +

FOX Coin

+
+
+

Welcome! We are an ethical hacking company that provides a safe blockchain service for those who want to keep their money away from bad hackers.

+

Do you want to mine and make transactions with FOX coins?

+

It is very easy: click in the button to download FOX Coin app! It is free!

+
+ +
+

BAD hacker IP's

+

34.179.220.28

+

52.196.13.181

+

190.62.128.211

+

194.174.44.177

+
+
+

1. What do I need to buy FOX coins?

+

The first step is to create a wallet using the official game wallet app.

+

After creating your wallet, in the same wallet app, get your wallet PIN code and take note.

+

Download the FOX Coin app and with your wallet ID and PIN, create a FOX Coin subwallet.

+

Use the official game Stocks.exe app to buy/sell FOX Coins!

+

2. How can I mine FOX Coins?

+

After creating your FOX Coin subwallet as described in FAQ item 1, you can use the FOX Coin app to mine the coins.

+

Currently the coin cap is 100,000. Mining difficulty will increase until the cap is reached, when the mining is automatically disabled.

+

3. What can I buy with FOX coins?

+

You can buy a variety of scripts such as hacking tools, server scrapping, and also lists of fresh IP adresses from bad hackers ready to be hacked!

+ + + + + + + + + + + + + + + + + + + + + +
ProductDescriptionPrice
GetDataQuickly gets all the important data available50 FOX
RmTraceQuickly removes all the traces in a server50 FOX
RTMonitorShows all the programs running in real time150 FOX
+

Interested? Please contact us at Foxtrot@statefp.com.

+

4. Is it safe to use FOX Coin app?

+

Yes. The app does not ask for your wallet password. It was developed with the intent to provide safe access to the FOX Coins to all the palyers.

+

Never share your wallet password in game players apps. Use only official game app to manage your wallet.

+
+
+

Ready to start? Download it now!

+ + \ No newline at end of file diff --git a/foxlib.src b/foxlib.src new file mode 100644 index 0000000..07703c2 --- /dev/null +++ b/foxlib.src @@ -0,0 +1,1025 @@ +FoxLib={} + +// GENERAL FUNCTIONS +FoxLib.General={} +General=FoxLib.General + +FoxLib.General.LibFinder=function(folder="/") + out={} + out.apt=null + out.cpf=null + out.mxf=null + out.bcf=null + root=get_shell.host_computer.File(folder) + if not root then return + newFiles=root.get_folders+root.get_files + while newFiles.len + currFile=newFiles.pull + if currFile.is_folder then newFiles=currFile.get_folders+currFile.get_files+newFiles + test=include_lib(currFile.path) + if typeof(test) == "MetaxploitLib" then out.mxf=currFile.path + if typeof(test) == "cryptoLib" then out.cpf=currFile.path + if typeof(test) == "aptclientLib" then out.apt=currFile.path + if typeof(test) == "blockchainLib" then out.bcf=currFile.path + end while + return out +end function + +FoxLib.General.Serialize=function(array=null,fancy=0) + if not str(array).len then return 0 + if array == null or (str(array)[0] != "{" and str(array)[0] != "[") then return 0 + type=null + if str(array)[0] == "{" then type="map" + if str(array)[0] == "[" then type="list" + //if type == "map" then + // tmp={} + // for i in array.indexes + // tmp[@i] = array[@i] + // end for + // array=tmp + //else if type == "list" then + // array=array[0:] + //end if + if not type then return 0 + + if type == "list" then + result="[" + l=array + else + result="{" + l=array.indexes + end if + if fancy then + result=result+char(10) + if FoxLib.General.hasIndex("SERN") then FoxLib.General.SERN=FoxLib.General.SERN+1 else FoxLib.General.SERN=1 + N=FoxLib.General.SERN + end if + + for i in l.indexes + if type == "map" then v=@array[l[i]] else v=@array[i] + vt=typeof(@v) + if vt == "function" then + v="Err_Function" + vt="string" + end if + if str(v)[0] == "{" or str(v)[0] == "[" then v=FoxLib.General.Serialize(v,fancy) + + if type == "list" then + if vt == "string" then v=""""+v+"""" + if fancy then + if __i_idx == l.indexes.len-1 then result=result+(" "*N)+v else result=result+(" "*N)+v+", " + result=result+char(10) + else + if __i_idx == l.indexes.len-1 then result=result+v else result=result+v+", " + end if + else + if l[i] isa string then lx=""""+l[i]+"""" else lx=l[i] + if vt == "string" then v=""""+v+"""" + if fancy then + if __i_idx == l.indexes.len-1 then result=result+(" "*N)+lx+": "+v else result=result+(" "*N)+lx+": "+v+"," + result=result+char(10) + else + if __i_idx == l.indexes.len-1 then result=result+lx+": "+v else result=result+lx+": "+v+", " + end if + end if + end for + + if fancy then + if type == "map" then result=result+(" "*(N-1))+"}" else result=result+(" "*(N-1))+"]" + else + if type == "map" then result=result+"}" else result=result+"]" + end if + + if fancy and N == 1 then FoxLib.General.remove("SERN") + if fancy and N != 1 then FoxLib.General.SERN = N-1 + return result +end function + +FoxLib.General.Deserialize=function(array=null) + if not array or not array isa string then return 0 + type=null + if array[0] == "[" then type="list" + if array[0] == "{" then type="map" + if not type then return 0 + + if type == "list" then + newArray=[] + else + newArray={} + end if + + array=array.split(char(10)).join("") + array=array[1:-1] + if not array then return newArray + a=[] + b=[] + c=0 + for v in array + i=__v_idx + if v == "{" or v == "[" then c=c+1 + if v == "}" or v == "]" then c=c-1 + if v == "," and c == 0 then + a.push(b.join("")) + b=[] + continue + end if + b.push(v) + if i == array.len-1 then + a.push(b.join("")) + b=[] + continue + end if + end for + array=a + + for i in array + i=i.trim + if type == "list" then + if not i then continue + if i[0] == """" and i[-1] == """" then + i=i[1:-1] + else + if i == "null" then + i=null + else if i == "true" then + i=1 + else if i == "false" then + i=0 + else if i[0] == "{" or i[0] == "[" then + i=FoxLib.General.Deserialize(i) + else + nv="" + dc=0 + for l in i + if l == "." then + if dc == 1 then break + nv=nv+"." + end if + if "0123456789E-".indexOf(l) != null then nv=nv+l + end for + if nv != "" then i=nv.val + end if + end if + + newArray.push(i) + else + k=i[0:i.indexOf(":")] + if not k then continue + if k[0] == """" then k=k[1:-1] + v=i[i.indexOf(":")+1:] + if not v then continue + v=v.trim + if not v then continue + if v[0] == """" then + v=v[1:-1] + else + if v == "null" then + v=null + else if v == "true" then + v=1 + else if v == "false" then + v=0 + else if v[0] == "{" or v[0] == "[" then + v=FoxLib.General.Deserialize(v) + else + nv="" + dc=0 + for l in v + if l == "." then + if dc == 1 then break + nv=nv+"." + end if + if "0123456789E-".indexOf(l) != null then nv=nv+l + end for + if nv != "" then v=nv.val + end if + end if + + newArray[k]=v + end if + end for + + return newArray +end function + +FoxLib.General.rndstring=function(length=null) + if not length or not length isa number then return 0 + newString="" + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890" + while newString.len < length + newString=newString+alpha[floor(rnd*alpha.len)] + end while + return newString +end function + +FoxLib.General.RandArt=function(data=null) + if not data or not data isa string then return + if bitwise("&",data.len,1) then data=data+"0" + max=function(p1,p2) + if p1 > p2 then return p1 else return p2 + end function + + min=function(p1,p2) + if p1 < p2 then return p1 else return p2 + end function + + move=function(position,mv,wid,high) + posx=floor(position%wid) + posy=floor(position/wid) + + newposx=posx + if mv == NW or mv == SW then newposx=newposx-1 + if mv == NE or mv == SE then newposx=newposx+1 + + newposy=posy + if mv == NW or mv == NE then newposy=newposy-1 + if mv == SW or mv == SE then newposy=newposy+1 + + newposx=max(0,min(wid-1,newposx)) + newposy=max(0,min(high-1,newposy)) + + return newposx+newposy*wid + end function + + hex2dec=function(hex) + ints=[] + + for i in range(0,hex.len-1,2) + ints.push((FoxLib.General.ParseInt(hex[i:i+2],16))) + end for + return ints + end function + + NW=0 + NE=1 + SW=2 + SE=3 + + alt=" .o+=*B0X@%&#/^" + width=17 + height=9 + board=[] + while board.len != width*height + board.push(0) + end while + bytes=hex2dec(data) + pos=width*4+8; + start=pos + for i in range(0,bytes.len-1) + d=bytes[i] + for j in range(0,6,2) + v = bitwise("&", bitwise(">>", d, j), 3) + newpos=move(pos,v,width,height) + board[newpos]=board[newpos]+1 + pos=newpos + end for + end for + + art="" + for p in range(0,width*height-1) + m=board[p] + if m >= alt.len then m=alt.len-1 + + chr=alt[m] + if p == start then chr="S" + if p == pos then chr="E" + + art=art+chr + + if(p % width == width -1) then art=art+char(10) + end for + return art.split(char(10))[:-1].join(char(10)) +end function + +FoxLib.General.ParseInt=function(s,orad=0,irad=0) + if typeof(s) != "string" then return 0 + if s[:2] == "0x" and not irad then irad=16 + if irad == 16 and not orad then orad=10 + if s[:2] == "0x" then s=s[2:] + if not irad then irad=10 + if not orad then orad=16 + alpha="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + if irad > alpha.len or irad < 2 then return 0 + if orad > alpha.len or orad < 2 then return 0 + + out=[] + if irad == 10 then + o=s.val + while o + out.push(alpha[o % orad]) + o=floor(o/orad) + end while + if orad == 16 then out.push("0x") + out.reverse + return out.join("") + end if + for c in s + out.push( (alpha.indexOf(c) * irad ^ ( (s.len-1) - out.len)) ) + end for + out=out.sum + if orad == 10 then return out + o=out + out=[] + while o + out.push(alpha[floor(o%orad)]) + o=floor(o/orad) + end while + if orad == 16 then out.push("0x") + out.reverse + return out.join("") +end function + +FoxLib.General.Compression=function(st=null,type=null) + basedictcompress={} + basedictdecompress={} + + for i in range(0,55295) + ic=char(i) + iic=char(i)+char(0) + basedictcompress[ic]=iic + basedictdecompress[iic]=ic + end for + + dictAddA=function(str,dict,a,b) + if a >= 55296 then + a = 0 + b=b+1 + if b >= 55296 then + dict={} + b=1 + end if + end if + dict[str]=char(a)+char(b) + a=a+1 + return [dict,a,b] + end function + + compress=function(input) + if not input isa string then return 0 + length=input.len + if length <= 1 then return "u"+input + + dict={} + a=0 + b=1 + + result=["c"] + resultLen=result.len + + word="" + + for i in range(0,length-1) + c=input[i] + wc=word+c + if not (basedictcompress.hasIndex(wc) or dict.hasIndex(wc)) then + write=null + if basedictcompress.hasIndex(word) then + write=basedictcompress[word] + else if dict.hasIndex(word) then + write=dict[word] + end if + if not write then return 0 + result.push(write) + resultLen=result.len + if length <= resultLen then return "u"+input + dict=dictAddA(wc,dict,a,b) + a=dict[1] + b=dict[2] + dict=dict[0] + word=c + else + word=wc + end if + end for + if basedictcompress.hasIndex(word) then result.push(basedictcompress[word]) else result.push(dict[word]) + resultLen=result.len + if length <= resultLen then return "u"+input + return result.join("") + end function + + dictAddB=function(str,dict,a,b) + if a >= 55296 then + a=0 + b=b+1 + if b >= 55296 then + dict={} + b=1 + end if + end if + dict[char(a)+char(b)]=str + a=a+1 + return [dict,a,b] + end function + + decompress=function(input) + if not input isa string then return 0 + + if input.len < 1 then return 0 + + control=input[0] + if control == "u" then + return input[1:] + else if control != "c" then + return 0 + end if + input=input[1:] + length=input.len + + if length < 2 then return 0 + + dict={} + a=0 + b=1 + + result=[] + last=input[0:2] + + if basedictdecompress.hasIndex(last) then + result.push(basedictdecompress[last]) + else if dict.hasIndex(last) then + result.push(dict[last]) + end if + + for i in range(2,length-1,2) + code=input[i:i+2] + lastStr=null + if basedictdecompress.hasIndex(last) then + lastStr=basedictdecompress[last] + else if dict.hasIndex(last) then + lastStr=dict[last] + end if + if lastStr == null then return 0 + + if basedictdecompress.hasIndex(code) then + toAdd=basedictdecompress[code] + else if dict.hasIndex(code) then + toAdd=dict[code] + else + toAdd=0 + end if + + if toAdd then + result.push(toAdd) + dict=dictAddB(lastStr+toAdd[0],dict,a,b) + a=dict[1] + b=dict[2] + dict=dict[0] + else + tmp=lastStr+lastStr[0] + result.push(tmp) + dict=dictAddB(tmp,dict,a,b) + a=dict[1] + b=dict[2] + dict=dict[0] + end if + + last=code + end for + + return result.join("") + end function + + if type == "compress" then + return compress(st) + else if type == "decompress" then + return decompress(st) + else + return 0 + end if +end function + +// CRYPTOGRAPHY FUNCTIONS +FoxLib.Crypto={} + +FoxLib.Crypto.Vigenere=function(s=null,key=null,type=null) + if not key or not key isa string then return 0 + if not s or not s isa string then return 0 + if not type or not type isa string or (type != "enc" and type != "dec") then return 0 + keySize=key.len + result="" + counter=0 + if type == "enc" then + for i in s + currKey=key[counter] + final = (i.code+currKey.code) % 55295 + result=result+char(final) + counter=(counter+1) % keySize + end for + else if type == "dec" then + for i in s + currKey=key[counter] + final=(i.code-currKey.code) + if final < 0 then final = 0 - final + result=result+char(final) + counter=(counter+1) % keySize + end for + end if + return result +end function + +FoxLib.Crypto.ROT=function(pos=null,s=null) + if not pos or not pos isa number then return 0 + pos=abs(pos) + if not s or not s isa string then return 0 + cases=[] + cases.push("abcdefghijklmnopqrstuvwxyz") + cases.push("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + ns=[] + for i in s + case=null + for c in cases + if c.indexOf(i) != null then case=c + end for + if not case then + ns.push(i) + continue + end if + ind=case.indexOf(i) + newPos=(ind+pos)%case.len + ns.push(case[newPos]) + end for + return ns.join("") +end function + +FoxLib.Crypto.Base64=function(s=null,type=null) + if not s or not s isa string then return 0 + if not type or not type isa string or (type != "enc" and type != "dec") then return 0 + + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + alphaLen=alpha.len-1 + based=null + + if type == "enc" then + grouped=[] + while s + ns=s[:3] + s=s[ns.len:] + bins=[] + for i in ns + b=FoxLib.General.ParseInt(str(i.code),2) + while b.len < 8 + b="0"+b + end while + bins=bins+b.values + end for + grouped.push(bins) + end while + + based="" + for g in grouped + block=[] + while g + s=g[:6] + g=g[s.len:] + while s.len < 6 + s.push("0") + end while + block.push(s) + end while + for i in block + based=based+alpha[FoxLib.General.ParseInt(i.join(""),10,2)%alphaLen] + end for + check=block.len + while check != 4 + based=based+"=" + check=check+1 + end while + end for + else + grouped=[] + while s + block=[] + ns=s[:4] + s=s[ns.len:] + for i in ns + if i == "=" then break + a=FoxLib.General.ParseInt(str(alpha.indexOf(i)),2) + while a.len < 6 + a="0"+a + end while + block=block+a.values + end for + grouped.push(block) + end while + + based="" + for g in grouped + block=[] + while g + s=g[:8] + g=g[s.len:] + check=s.len + if check < 8 then s.reverse + while s.len < 8 + s.push("0") + end while + if check < 8 then s.reverse + block.push(s) + end while + for i in block + based=based+char(FoxLib.General.ParseInt(i.join(""),10,2)) + end for + end for + end if + return based +end function + +FoxLib.Crypto.Sha256=function(st=null) + if not st or not st isa string then return + + Blocks = [[0]] + i=0 + e=0 + while i < st.len + e=4 + while e > 0 and st.hasIndex(i) + e=e-1 + Blocks[-1][-1] = Blocks[-1][-1] + code(st[i])*256^e + i=i+1 + end while + if e == 0 then + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] else Blocks[-1] = Blocks[-1] + [0] + end if + end while + + if e > 0 then + Blocks[-1][-1] = Blocks[-1][-1] + (2147483648/256^(4-e)) + else + Blocks[-1][-1] = 2147483648 + end if + + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] + while Blocks[-1].len != 15 + Blocks[-1] = Blocks[-1] + [0] + end while + + Blocks[-1] = Blocks[-1] + [st.len*8] + + add = function(a, b) + return (a + b) % 4294967296 + end function + + XOR = function(a, b) + return bitwise("^", floor(a/65536), floor(b/65536))*65536+bitwise("^", a%65536, b%65536) + end function + + AND = function(a, b) + return bitwise("&", floor(a/65536), floor(b/65536))*65536+bitwise("&", a%65536, b%65536) + end function + + OR = function(a, b) + return bitwise("|", floor(a/65536), floor(b/65536))*65536+bitwise("|", a%65536, b%65536) + end function + + NOT = function(n) + return 4294967295-n + end function + + Ch = function(x, y, z) + return OR(AND(x, y), AND(NOT(x), z)) + end function + + Maj = function(x, y, z) + return OR(OR(AND(x, y), AND(x, z)), AND(y, z)) + end function + + shr = function(n, shifts) + return floor(n/2^shifts) + end function + + rotr = function(n, rots) + rots = 2^rots + return (n % rots) * (4294967296/rots) + floor(n/rots) + end function + + sigma0 = function(n) + return XOR(XOR(rotr(n, 7), rotr(n, 18)), shr(n, 3)) + end function + + sigma1 = function(n) + return XOR(XOR(rotr(n, 17), rotr(n, 19)), shr(n, 10)) + end function + + SIGMA0 = function(n) + return XOR(XOR(rotr(n, 2), rotr(n, 13)), rotr(n, 22)) + end function + + SIGMA1 = function(n) + return XOR(XOR(rotr(n, 6), rotr(n, 11)), rotr(n, 25)) + end function + + K = [] + K = K + [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221] + K = K + [3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580] + K = K + [3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986] + K = K + [2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895] + K = K + [666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037] + K = K + [2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344] + K = K + [430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779] + K = K + [1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298] + + H = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225] + + for Block in Blocks + W = Block[0:] + + for i in range(16, 63) + W = W + [add(add(add(sigma1(W[i-2]), W[i-7]), sigma0(W[i-15])), W[i-16])] + end for + + a = H[0] + b = H[1] + c = H[2] + d = H[3] + e = H[4] + f = H[5] + g = H[6] + h = H[7] + + for i in range(0, 63) + T1 = add(add(add(add(SIGMA1(e), Ch(e, f, g)), h), K[i]), W[i]) + T2 = add(SIGMA0(a), Maj(a, b, c)) + h = g + g = f + f = e + e = add(d, T1) + d = c + c = b + b = a + a = add(T1, T2) + end for + H[0] = add(a, H[0]) + H[1] = add(b, H[1]) + H[2] = add(c, H[2]) + H[3] = add(d, H[3]) + H[4] = add(e, H[4]) + H[5] = add(f, H[5]) + H[6] = add(g, H[6]) + H[7] = add(h, H[7]) + end for + + hexTable = "0123456789abcdef" + output = "" + for i in H.indexes + for j in range(7) + output = output + hexTable[floor(H[i]/16^j) % 16] + end for + end for + return output +end function + +// BIGINT FUNCTIONS +FoxLib.Int={} + +FoxLib.Int.base=function() + out={} + out.int=[] + out.dec=[] + out.neg=0 + out.classID="BigInt" + out.string=function() + st="" + if self.neg then st="-" + for i in self.int + st=st+str(i) + end for + if self.dec.len > 0 then + st=st+"." + for i in self.dec + st=st+str(i) + end for + end if + return st + end function + out.trim=function() + num=self.int[0:] + dec=self.dec[0:] + i=0 + while num[i] == 0 and num[i:].len != 1 + i=i+1 + end while + num=num[i:] + if dec.len > 0 then + i=0 + dec.reverse + while dec[i] == 0 and dec.len < i + i=i+1 + end while + if dec[i] == 0 then dec=[] else dec=dec[i:] + dec.reverse + end if + self.int=num[0:] + self.dec=dec[0:] + end function + out.to_int=function() + return val(self.string) + end function + return out +end function + +FoxLib.Int.copy=function(num=0) + if typeof(num) != "BigInt" then return 0 + out=FoxLib.Int.base + out.neg=num.neg + out.int=num.int[0:] + out.dec=num.dec[0:] + return out +end function + +FoxLib.Int.zero=function(length=1) + newint=FoxLib.Int.base + while newint.int.len < length + newint.int.push(0) + end while + return newint +end function + +FoxLib.Int.one=function(length=1) + newint=FoxLib.Int.base + while newint.int.len < length + if newint.int.len+1 == length then newint.int.push(1) else newint.int.push(0) + end while + return newint +end function + +FoxLib.Int.rnd=function(length=1) + newint=FoxLib.Int.base + while newint.int.len < length + n=floor(rnd*10) + if n > 9 or n < 0 then continue + newint.int.push(n) + end while + return newint +end function + +FoxLib.Int.fromint=function(num=0) + newint=FoxLib.Int.base + if not num isa string and not num isa number then return 0 + if not num isa string then num=str(num) + if not val(num) isa number then return 0 + if num[0] == "-" then + newint.neg=1 + num=num[1:] + end if + + for i in num + if "0123456789".indexOf(i) == null then break + newint.int.push(val(i)) + end for + + if num.hasIndex(__i_idx) and num[__i_idx] == "." then + num=num[__i_idx+1] + for i in num + if "0123456789".indexOf(i) == null then break + newint.dec.push(val(i)) + end for + end if + + return newint +end function + + +FoxLib.Int.math={} + +FoxLib.Int.math.add=function(num1=1,num2=1) + if typeof(num1) != "BigInt" then + num1=FoxLib.Int.fromint(num1) + if not num1 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=FoxLib.Int.fromint(num2) + if not num2 then return 0 + end if + + negAdd=0 + if num1.neg and num2.neg then negAdd=1 + if not negAdd then + if num1.neg then + num1.neg=0 + return FoxLib.Int.math.sub(num2,num1) + else if num2.neg then + num2.neg=0 + return FoxLib.Int.math.sub(num1,num2) + end if + end if + + A=num1.int[0:]+num1.dec[0:] + Aintlen=num1.int.len + Adeclen=num1.dec.len + + B=num2.int[0:]+num2.dec[0:] + Bintlen=num2.int.len + Bdeclen=num2.dec.len + + while Adeclen < Bdeclen + A.push(0) + Adeclen=Adeclen+1 + end while + + while Bdeclen < Adeclen + B.push(0) + Bdeclen=Bdeclen+1 + end while + + A.reverse + B.reverse + + while Aintlen < Bintlen + A.push(0) + Aintlen=Aintlen+1 + end while + + while Bintlen < Aintlen + B.push(0) + Bintlen=Bintlen+1 + end while + + outnum=[] + + i=0 + while 1 + n=[] + if not A.indexes.hasIndex(i) and not B.indexes.hasIndex(i) then break + + calc=A[i]+B[i] + + if calc > 9 then + c=i+1 + added=0 + while A.indexes.hasIndex(c) + if A[c] < 9 then + A[c]=A[c]+1 + added=1 + break + end if + if A[c] == 9 then A[c]=0 + c=c+1 + end while + if not A.hasIndex(c) and not added then A.push(1) + calc=calc-10 + end if + + for c in str(calc) + n.push(c) + end for + + n.reverse + + for c in n + outnum.push(val(c)) + end for + + i=i+1 + end while + + out=FoxLib.Int.base + out.int=outnum[Adeclen:] + out.dec=outnum[:Adeclen] + out.neg=negAdd + out.int.reverse + out.dec.reverse + //if FoxLib.Int.math.equalto(FoxLib.Int.math.abs(out),0) then out.neg=0 + return out +end function + + +// HACKING FUNCTIONS +FoxLib.VulnV={} + +FoxLib.VulnV.Decipher=function(cp=null,hash=null) + if not (cp or hash) then return + if hash.len < 32 then return + hash=hash.split(":")[-1] + if hash.len < 32 then return + hash=hash[:32] + pass=cp.decipher(hash) + return pass +end function + +FoxLib.VulnV.Exploit=function(mx=null,ml=null,args=null) + if not (mx or ml) then return + scan=mx.scan(ml) + out={} + out.db={} + out.db.name=ml.lib_name + out.db.ver=ml.version + out.db.exploits=[] + for mem in scan + ex={} + ex.mem=mem + ex.vulns=[] + mems=mx.scan_address(ml,mem).split("Unsafe check: ") + for ent in mems + if ent == mems[0] then continue + exp=ent[ent.indexOf("")+3:ent.indexOf("")] + if not args then result=ml.overflow(mem,exp) else result=ml.overflow(mem,exp,args) + v={} + v.vuln=exp + v.result=result + ex.vulns.push(v) + end for + out.db.exploits.push(ex) + end for + return out +end function + diff --git a/foxtrothtml.html b/foxtrothtml.html new file mode 100644 index 0000000..b22da47 --- /dev/null +++ b/foxtrothtml.html @@ -0,0 +1,274 @@ + +FoxTrot -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + + + + + +
+

FoxTrot

+

By Clover

+
+ + + + +

+
+ + + +
+
+ + + + + + +

-Welcome to the official FoxTrot website-

+
+

+

news

+
+
+ [8.30.04] FoxTrot Re-release!
+ [8.1.04] FoxTrot's back baby!
+



+ +
+
+
+
+
+ +
+ + + + + + + + + + + + + + + +

-downloads-



FoxTrot
(script)
FoxTrotKeyGen
(script)
+

*Official FoxTrot Program*

+
+

*Purchase FoxTrot Licenses*

+
+





















+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +

-features-



Free
Free
+

-included features-
+ *MetaXploit*
+ Automated hacking tool

+

Default
200 Bytes
Advanced
1000 Bytes
+

-included features-
+ *MetaXploit*
+ Automated hacking tool
+ *Sniffer*
+ Sniff network traffic

+
+

-included features-
+ *All from default PLUS*
+ *BruteSSH*
+ Run through a list of passwords to attempt an SSH connection
+ *Fyrwall*
+ Solstice Security brand Antivirus
+ *FoxVPN*
+ VPN Service used by sneaky foxes to hide their tracks!

+
+





















+
+
+ +
+ + + + + +

-contact-



+
discord.gg/9qFt4KJgtE
+


















+
+
+ + + + + + + + + + diff --git a/ghs.code-workspace b/ghs.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/ghs.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/intcount.src b/intcount.src new file mode 100644 index 0000000..2b74408 --- /dev/null +++ b/intcount.src @@ -0,0 +1,31 @@ +import_code("/root/Fox.so") +counters=1 +alpha="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +al=alpha.len +if params.len == 1 then base=params[0].to_int else base=10 +if typeof(base) != "number" then base=10 +if base < 2 or base > 62 then base=10 +c=[] +while 1 + for _ in range(c.len,counters-1) + c.push(0) + end for + while 1 + bin=[] + for q in range(0,counters-1) + if c[q] == base then + c[q]=0 + if q != counters-1 then c[q+1]=c[q+1]+1 else continue + end if + bin.push(alpha[c[q]]) + end for + bin.reverse + bin=bin.join("") + if base != 10 then print FoxLib.General.ParseInt(bin,10,base) + c[0]=c[0]+1 + print bin+char(10) + wait(0.1) + if floor((c[:counters].sum-1)/(base-1)) == counters then break + end while + counters=counters+1 +end while \ No newline at end of file diff --git a/intlib.src b/intlib.src new file mode 100644 index 0000000..d856f29 --- /dev/null +++ b/intlib.src @@ -0,0 +1,455 @@ +//clover intlib +int={} + +int.baseint=function() + out={} + out.int=[] + out.neg=0 + out.classID="BigInt" + out.string=function(self) + st="" + if self.neg then st="-" + for i in self.int + st=st+str(i) + end for + return st + end function + out.trim=function(self) + num=int.copy(self) + i=0 + while num.int[i] == 0 and num.int[i:].len != 1 + i=i+1 + end while + num.int=num.int[i:] + return num + end function + return out +end function + +int.copy=function(num=0) + if typeof(num) != "BigInt" then return 0 + out=int.baseint + out.neg=num.neg + for i in num.int + out.int.push(i) + end for + return out +end function + +int.zero=function(length=1) + newint=int.baseint + while newint.int.len < length + newint.int.push(0) + end while + return newint +end function + +int.one=function(length=1) + newint=int.baseint + while newint.int.len < length + if newint.int.len+1 == length then newint.int.push(1) else newint.int.push(0) + end while + return newint +end function + +int.rnd=function(length=1,neg=0) + newint=int.baseint + newint.neg=neg + while newint.int.len < length + newint.int.push(floor(rnd*10)) + end while + return newint +end function + +int.fromint=function(num=0) + newint=int.baseint + if typeof(num) != "string" then num=str(num) + if typeof (val(num)) != "number" then return 0 + if num[0] == "-" then + newint.neg=1 + num=num[1:] + end if + + for i in num + if "0123456789".indexOf(i) == null then break + newint.int.push(val(i)) + end for + return newint +end function + +int.toint=function(num=0) + if typeof(num) != "BigInt" then return 0 + return val(num.string) +end function + + +//ok done with integer stuff, now on to more mathy things + +math={} + +math.add=function(num1=0,num2=0) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + + actuallySubtraction=0 + negAdd=0 + if num1.neg and num2.neg then negAdd=1 + if not negAdd then + if num1.neg then actuallySubtraction=1 + + if num2.neg then actuallySubtraction=1 + end if + + if actuallySubtraction then + if num1.neg then + num1=int.copy(num1) + num1.neg=0 + return math.sub(num2,num1) + else if num2.neg then + num2=int.copy(num2) + num2.neg=0 + return math.sub(num1,num2) + end if + end if + + num1.int.reverse + num2.int.reverse + outnum=int.baseint + outnum.neg=negAdd + + i=0 + + while 1 + n=[] + if not num1.int.indexes.hasIndex(i) and not num2.int.indexes.hasIndex(i) then break + + if not num1.int.indexes.hasIndex(i) then + outnum.int.push(num2.int[i]) + i=i+1 + continue + end if + + if not num2.int.indexes.hasIndex(i) then + outnum.int.push(num1.int[i]) + i=i+1 + continue + end if + + calc=num1.int[i]+num2.int[i] + + if calc >= 10 then + c=i+1 + added=0 + while num1.int.indexes.hasIndex(c) + if num1.int[c] < 9 then + num1.int[c] = num1.int[c]+1 + added=1 + break + end if + if num1.int[c] == 9 then num1.int[c] = 0 + c=c+1 + end while + if not num1.int.hasIndex(c) and not added then num1.int.push(1) + calc=calc-10 + //outnum.int.push(calc) + end if + + for c in str(calc) + n.push(c) + end for + + n.reverse + + for c in n + outnum.int.push(val(c)) + end for + + i=i+1 + end while + + outnum.int.reverse + num1.int.reverse + num2.int.reverse + if int.toint(outnum) == 0 then outnum.neg=0 + return outnum +end function + +math.sub=function(num1=0,num2=0) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + + actuallyAddition=0 + negAdd=0 + if num1.neg and num2.neg then actuallyAddition=1 + if actuallyAddition then + num1.neg=0 + num2.neg=0 + return math.add(num1,num2) + end if + if not actuallyAddition then + if num1.neg then + num1.neg=0 + negAdd=negAdd+1%2 + end if + if num2.neg then + num2.neg=0 + negAdd=negAdd+1%2 + end if + end if + + num1.int.reverse + num2.int.reverse + outnum=int.baseint + outnum.neg=negAdd + + i=0 + + if num2.int.len > num1.int.len then + num3=int.copy(num1) + num1=int.copy(num2) + num2=int.copy(num3) + end if + + while 1 + n=[] + if not num1.int.indexes.hasIndex(i) and not num2.int.indexes.hasIndex(i) then break + + if not num1.int.indexes.hasIndex(i) then + outnum.int.push(num2.int[i]) + i=i+1 + continue + end if + + if not num2.int.indexes.hasIndex(i) then + outnum.int.push(num1.int[i]) + i=i+1 + continue + end if + + calc=num1.int[i]-num2.int[i] + + if calc < 0 then + if num1.int.indexes.hasIndex(i+1) then + outnum.int.push(10+calc) + num1.int[i+1]=num1.int[i+1]-1 + end if + if not num1.int.indexes.hasIndex(i+1) then + outnum.int.push(0-calc) + outnum.neg=(outnum.neg+1)%2 + end if + else + for c in str(calc) + n.push(c) + end for + + n.reverse + + for c in n + outnum.int.push(val(c)) + end for + end if + + i=i+1 + end while + outnum.int.reverse + num1.int.reverse + num2.int.reverse + if int.toint(outnum) == 0 then outnum.neg=0 + return outnum +end function + +math.mul=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + + isNegative=0 + if (num1.neg and not num2.neg) or (num2.neg and not num1.neg) then isNegative=1 + + c=1 + outnum=int.copy(num1) + + while c != int.toint(num2) + c=c+1 + outnum=math.add(outnum,num1) + end while + outnum.neg=isNegative + return outnum +end function + +math.div=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + + isNegative=0 + if (num1.neg and not num2.neg) or (num2.neg and not num1.neg) then isNegative=1 + + c=0 + outnum=int.copy(num1) + outnum.neg=isNegative + + while int.toint(outnum) >= int.toint(num2) + outnum=math.sub(outnum,num2) + c=c+1 + end while + outnum=int.fromint(c) + outnum.neg=isNegative + return outnum +end function + +math.mod=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + + isNegative=0 + if num1.neg or num2.neg then isNegative=1 + + outnum=int.copy(num1) + + while int.toint(outnum) >= int.toint(num2) + outnum=math.sub(outnum,num2) + end while + return outnum +end function + +math.exp=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + + if num2.neg then + num2.neg=0 + return math.exp(math.div(1,num1),num2) + end if + + c=1 + outnum=int.copy(num1) + + while c != int.toint(num2) + c=c+1 + outnum=math.mul(outnum,num1) + end while + return outnum +end function + +math.equalto=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + num1=num1.trim + num2=num2.trim + + if num1.int.len != num2.int.len then return 0 + c=0 + + num1.int.reverse + num2.int.reverse + while c < num1.int.len + if num1.int[c] != num2.int[c] then return 0 + c=c+1 + end while + num1.int.reverse + num2.int.reverse + return 1 +end function + +math.greater=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + num1=num1.trim + num2=num2.trim + + if num1.int.len > num2.int.len then return 1 + if num1.int.len < num2.int.len then return 0 + c=0 + + while c < num1.int.len + if num1.int[c] > num2.int[c] then return 1 + c=c+1 + end while + return 0 +end function + +math.less=function(num1,num2) + return math.greater(num2,num1) +end function + +math.greatere=function(num1,num2) + if typeof(num1) != "BigInt" then + num1=int.fromint(num1) + if num1 == 0 then return 0 + end if + if typeof(num2) != "BigInt" then + num2=int.fromint(num2) + if num2 == 0 then return 0 + end if + num1=num1.trim + num2=num2.trim + + if num1.int.len < num2.int.len then return 0 + c=0 + num1.int.reverse + num2.int.reverse + + while num2.int.len != num1.int.len + num2.int.push(0) + end while + + safe=num2.trim.int.len-num1.trim.int.len + while c < num1.int.len + if num1.int[c] < num2.int[c] and c != safe then return 0 + c=c+1 + end while + num1.int.reverse + num2.int.reverse + return 1 +end function + +math.lesse=function(num1,num2) + return math.greatere(num2,num1) +end function \ No newline at end of file diff --git a/ipgen.src b/ipgen.src new file mode 100644 index 0000000..64279d4 --- /dev/null +++ b/ipgen.src @@ -0,0 +1,94 @@ +if params.len > 2 or params.len < 1 then exit("[lib] (ver)\nssh, repo, chat, http, ftp, rshell, router") +ver=null +ips=get_shell.host_computer.File(current_path+"/ips") +if not ips then + get_shell.host_computer.touch(current_path,"ips") + ips=get_shell.host_computer.File(current_path+"/ips") +end if +lib=params[0] +if lib == "repo" then lib = "repository" +if params.len == 2 then ver=params[1] + +getRandomIp=function() + //1-223.0-255.0-255.0-255 + octets=[] + for i in range(0,3) + if i == 0 then octets.push(ceil(rnd*223)) else octets.push(floor(rnd*256)) + end for + return octets.join(".") +end function +st=time +while 1 + while 1 + ip=getRandomIp + if not get_router(ip) or is_lan_ip(ip) then continue + break + end while + router=get_router(ip) + if lib == "router" then + v=router.kernel_version + print("Checking "+ip+" "+v+"...") + if not ver then + print(ip+" "+lib+" "+v+" > "+current_path+"/ips") + print("Time since last found "+(time - st)) + st=time + cont=ips.get_content.split("\n") + while cont.indexOf("") != null + cont.remove(cont.indexOf("")) + end while + cont.push(ip+" "+lib+"#"+v) + ips.set_content(cont.join(char(10))) + continue + end if + if v == ver then + print(ip+" "+lib+" "+v+" > "+current_path+"/ips") + print("Time since last found "+(time - st)) + st=time + cont=ips.get_content.split("\n") + while cont.indexOf("") != null + cont.remove(cont.indexOf("")) + end while + cont.push(ip+" "+lib+"#"+v) + ips.set_content(cont.join(char(10))) + continue + end if + continue + end if + ports=router.used_ports + rports=[] + for port in ports + serv=[port.port_number] + serv=serv+router.port_info(port).split(" ") + rports.push(serv) + end for + + for port in rports + print("Checking "+ip+" "+port.join(" ")+"...") + if not ver then + if port[1] == lib then + print(ip+" "+port[1]+" "+port[-1]+" > "+current_path+"/ips") + print("Time since last found "+(time - st)) + st=time + cont=ips.get_content.split("\n") + while cont.indexOf("") != null + cont.remove(cont.indexOf("")) + end while + cont.push(ip+" "+port[1]+"#"+port[-1]) + ips.set_content(cont.join(char(10))) + continue + end if + end if + if port[1] == lib and port[-1] == ver then + print(ip+" "+port[1]+" "+port[-1]+" > "+current_path+"/ips") + print("Time since last found "+(time - st)) + st=time + cont=ips.get_content.split("\n") + while cont.indexOf("") != null + cont.remove(cont.indexOf("")) + end while + cont.push(ip+" "+port[1]+"#"+port[-1]) + ips.set_content(cont.join(char(10))) + continue + end if + end for +end while \ No newline at end of file diff --git a/keygen.src b/keygen.src new file mode 100644 index 0000000..d8e52a1 --- /dev/null +++ b/keygen.src @@ -0,0 +1,113 @@ +import_code("/bin/Bytes") +apt=include_lib("/lib/aptclient.so") +if apt then + inSource=apt.show + if inSource == "153.105.188.80 repository not found" then + apt.add_repo + apt.update + end if + if typeof(apt.check_upgrade(program_path)) == "number" and apt.check_upgrade(program_path) then + apt.install("FoxTrotKeyGen",parent_path(program_path)) + exit("Updated") + end if +end if + +genRandomString=function(length) + newString="" + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890" + while newString.len != length + string=alpha[floor(rnd()*alpha.len)] + newString=newString+string + end while + return newString +end function + +printMenu=function(items) + menu=[] + for i in range(0,items.len-1) + menu.push("\_["+(i+1)+"] "+items[i]+"") + end for + menu.push("\_[0] Exit") + menu.push("|") + print(menu.join("\n")) +end function + +print("Connecting to FoxTrot servers. . .") +proxy=get_shell.connect_service +if typeof(proxy) != "shell" then exit("Could not establish connection") + +proxy.host_computer.touch("/var","system.bak") +bak=proxy.host_computer.File("/var/system.bak") +bak.set_content(genRandomString(512)) +bak.move("/var/system.log") +wait(.2) +log=proxy.host_computer.File("/var/system.log") +log.chmod("o-wrx") +log.chmod("g-wrx") +log.chmod("u-wrx") + +ls=proxy.connect_service +if typeof(ls) == "shell" then print("Connection established!") else exit("Could not establish connection") + +if ls.host_computer.File("/server/.FoxTrot/maintenance").get_content != "0" then exit("-={"+ls.host_computer.File("/server/.FoxTrot/maintenance").get_content+"}=-") + +print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") +print(" ______ ______ __ __ __ ______ __ ") +print(" / ____/ ____ _ __ /_ __/ _____ ____ / /_ / //_/ ___ __ __ / ____/ ___ ____ ___ _____ ____ _ / /_ ____ _____") +print(" / /_ / __ \ | |/_/ / / / ___/ / __ \ / __/ / ,< / _ \ / / / / / / __ / _ \ / __ \ / _ \ / ___/ / __ `/ / __/ / __ \ / ___/") +print(" / __/ / /_/ / _> < / / / / / /_/ // /_ / /| | / __/ / /_/ / / /_/ / / __/ / / / // __/ / / / /_/ / / /_ / /_/ / / / ") +print("/_/ \____/ /_/|_| /_/ /_/ \____/ \__/ /_/ |_| \___/ \__, / \____/ \___/ /_/ /_/ \___/ /_/ \__,_/ \__/ \____/ /_/ ") +print(" /____/ ") +print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") +print("/") +printMenu(["Advanced [100 Bytes]","Default [20 Bytes]"]) +while 1 +opt=user_input("\_[#: ") +if opt == "0" then exit("Exiting!") +if opt == "1" then + print("YOU ARE PURCHASING : Advanced License : FOR : 100 Bytes : CONTINUE?") + conf=user_input("[y/N]$").lower + if conf != "y" then continue + output=Bytes.transfer("Clover","100") + if output.bool then + print(output.out) + else + exit(output.err) + end if + start=[genRandomString(8),genRandomString(8)] + key="ALL"+genRandomString(1)+"-"+start.join("-") + file=ls.host_computer.File("/server/.FoxTrot/open_licenses") + licenses=file.get_content.split("\n") + licenses.push(key) + file.set_content(licenses.join(char(10))) + apt.install("foxtrot") + print("FoxTrot installed") + print("REMEMBER YOUR LICENSE KEY! IT MAY BE USED FOR ACCOUNT OWNERSHIP VERIFICATION") + print("\nYour key is: "+key+"") + print("Repeat: Your key is: "+key+"") + exit("Repeat: Your key is: "+key+"") +end if +if opt == "2" then + print("YOU ARE PURCHASING : Default License : FOR : 20 Bytes : CONTINUE?") + conf=user_input("[y/N]$").lower + if conf != "y" then continue + output=Bytes.transfer("Clover","20") + if output.bool then + print(output.out) + else + exit(output.err) + end if + start=[genRandomString(8),genRandomString(8)] + key="V"+genRandomString(4)+"-"+start.join("-") + file=ls.host_computer.File("/server/.FoxTrot/open_licenses") + licenses=file.get_content.split("\n") + licenses.push(key) + file.set_content(licenses.join(char(10))) + apt.install("foxtrot") + print("FoxTrot installed") + print("REMEMBER YOUR LICENSE KEY! IT MAY BE USED FOR ACCOUNT OWNERSHIP VERIFICATION") + print("\nYour key is: "+key+"") + print("Repeat: Your key is: "+key+"") + exit("Repeat: Your key is: "+key+"") +end if +end while \ No newline at end of file diff --git a/login.html b/login.html new file mode 100644 index 0000000..7ea4a69 --- /dev/null +++ b/login.html @@ -0,0 +1,67 @@ + +lockout + +

server login

+
+

+ +

Attempts Left: null

+
+
+ +
+
+

failed to log in, try again!

+
+ \ No newline at end of file diff --git a/lunarcmd.src b/lunarcmd.src new file mode 100644 index 0000000..6bd739e --- /dev/null +++ b/lunarcmd.src @@ -0,0 +1,2945 @@ +cmds={} +helplist={} + +//defaults +helplist.defaults="-=Defaults=-" + +helplist.help={"params": "[command]", "usage": "List all commands, or list command usage!"} +helplist.fs={"params": "[FoxScriptCode]", "usage": "Invoke the FoxScript code terminal"} +helplist.exit={"params": "N/A", "usage": "Go back a shell, or exit Lunar"} +helplist.clear={"params": "N/A", "usage": "Clears the screen"} +helplist["while"]={"params": "[quantity][command][args]", "usage": "Repeat a command"} +helplist.setup={"params": "[-m/-rs/-ps]", "usage": "Setup Lunar"} +helplist.anon={"params": "N/A", "usage": "Enable or disable hidden mode"} +helplist.sshs={"params": "[-c]", "usage": "Displays SSH virus logs, or clears them"} +helplist.passwds={"params": "[-c]", "usage": "Displays passwd virus logs, or clears them"} +helplist.mailbomb={"params": "[recipient][subject][body][quantity]", "usage": "Spams an email's inbox"} +helplist.clrmail={"params": "N/A", "usage": "Clears emails"} +helplist.readmail={"params": "N/A", "usage": "Read emails"} + +//text controls +helplist.text="-=Text=-" + +helplist.vim={"params": "[file][text]", "usage": "Text editor"} +helplist.cat={"params": "[path]", "usage": "Get the contents of a file"} +helplist.pwd={"params": "N/A", "usage": "Outputs current directory"} +helplist.whoami={"params": "N/A", "usage": "Outputs current user"} +helplist.whereami={"params": "N/A", "usage": "Outputs current public IP address"} +helplist.echo={"params": "[string]", "usage": "Echos input as joined output"} +helplist.grep={"params": "[searchTerm][string]", "usage": "Finds the line containing the search term"} +helplist.crack={"params": "[hash]", "usage": "Crack a password hash"} +helplist.encrypt={"params": "[string][key][enc/dec]", "usage": "Encrypt or decrypt messages"} +helplist.compress={"params": "[enc/dec][string]", "usage": "Compress or decompress messages"} +helplist.md5={"params": "[string]", "usage": "Hashes a string using MD5"} +helplist.S256={"params": "[string]", "usage": "Hashes a string using Sha256"} +helplist.rot={"params": "[pos][string]", "usage": "Encrypts a string using ROT"} +helplist.vigenere={"params": "[string][key][enc/dec]", "usage": "Encrypts a string using the Vigenere cipher"} +helplist.base={"params": "[number][orad][irad]", "usage": "Changes the base of numbers"} + +//file controls +helplist.files="-=Files=-" + +helplist.ls={"params": "[path]", "usage": "Lists files"} +helplist.tree={"params": "N/A", "usage": "Lists the entire file system along with file vulnerabilities"} +helplist.cd={"params": "[path]", "usage": "Changes working directory"} +helplist.mv={"params": "[file][newPath]", "usage": "Moves files"} +helplist.cp={"params": "[file][newPath]", "usage": "Copies files"} +helplist.mkdir={"params": "[path]", "usage": "Creates a folder"} +helplist.touch={"params": "[path]", "usage": "Create a text file"} +helplist.build={"params": "[src][path]", "usage": "Builds a source file"} +helplist.shrink={"params": "[src][size]", "usage": "Shrinks source files"} +helplist.rm={"params": "[file]", "usage": "Deletes files"} +helplist.chmod={"params": "[file][perms][-r]", "usage": "Changes the permission levels of a file"} +helplist.chown={"params": "[file][owner][-r]", "usage": "Changes the owner of a file"} +helplist.chgrp={"params": "[file][group][-r]", "usage": "Changes the group of a file"} + +//device controls +helplist.devices="-=Devices=-" + +helplist.passwd={"params": "[user][password]", "usage": "Change users password"} +helplist.bash={"params": "[file][params]", "usage": "Runs a CLI program"} +helplist.ps={"params": "N/A", "usage": "Lists processes"} +helplist.bios={"params": "N/A", "usage": "Perform a full system analysis"} +helplist.kill={"params": "[PID/all]", "usage": "Terminates a running process"} +helplist.sudo={"params": "[user][password]", "usage": "Switch account"} +helplist.useradd={"params": "[user][password]", "usage": "Adds a new user"} +helplist.userdel={"params": "[user]", "usage": "Deletes a user"} +helplist.groups={"params": "[user]", "usage": "List users groups"} +helplist.groupadd={"params": "[user][group]", "usage": "Adds user to group"} +helplist.groupdel={"params": "[user][group]", "usage": "Removes user from group"} +helplist.sessions={"params": "N/A", "usage": "Open a different session!"} +helplist.set={"params": "[variable][content]", "usage": "Change a variable in case it is set incorrectly"} + +//network controls +helplist.network="-=Network=-" + +helplist.ssh={"params": "[user][password][ip][port]", "usage": "Connect to a server"} +helplist.nmap={"params": "N/A", "usage": "Maps out the selected RHost"} +helplist.shell={"params": "[-y/-s]", "usage": "Starts a terminal on the connected system"} +helplist.shells={"params": "N/A", "usage": "Open a different shell!"} +helplist.apt={"params": "[update/upgrade/search/show/add/del/install][args]", "usage": "apt-get service"} +helplist.rootkit={"params": "[-s]", "usage": "Uploads root attack kit"} +helplist.put={"params": "[file][path]", "usage": "Uploads a file"} +helplist.get={"params": "[file][path]", "usage": "Downloads a file"} +helplist.rhost={"params": "[ip]", "usage": "Selects an IP for attacks"} +helplist.random={"params": "N/A", "usage": "Generates a random IP and sets it at the RHost"} +helplist.ping={"params": "[ip]", "usage": "Test connection to IP"} +helplist.target={"params": "[port][args]", "usage": "Performs an attack on the selected RHost"} +helplist.escalate={"params": "[args]", "usage": "Escalate access using local libraries"} +helplist.results={"params": "[-c]", "usage": "Shows results from target/escalate, or clears them"} +helplist.exploits={"params": "[-c]", "usage": "Shows every vulnerability saved, or clears them"} +helplist.use={"params": "[exp]", "usage": "Use an exploit from the results list"} +helplist.rss={"params": "N/A", "usage": "Remote reverse shell server connector"} +helplist.rsi={"params": "N/A", "usage": "Reverse shell interface"} +helplist.sniffer={"params": "[-y]", "usage": "Sniffs connections"} +helplist.inet={"params": "[bssid][essid]", "usage": "Hacks wifi connections"} +helplist.dictssh={"params": "[ip][port][user]", "usage": "Bruteforces an SSH connection"} +helplist.brutessh={"params": "[ip][port][user]", "usage": "Bruteforces an SSH connecting using Base 62 counting"} +helplist.dictsudo={"params": "[user]", "usage": "Bruteforces user password"} +helplist.brutesudo={"params": "[user]", "usage": "Bruteforces user password using Base 62 counting"} + +//server control +helplist.revoke={"params": "N/A", "usage": "Revokes fingerprint access token"} + +//destructive controls +helplist.destructive="-=Destructive=-" + +helplist.brick={"params": "N/A", "usage": "Deletes all files in /"} +helplist.dos={"params": "N/A", "usage": "Local Denial Of Service attack"} +helplist.rdos={"params": "[quantity]", "usage": "Memory Denial Of Service attack"} +helplist.fdos={"params": "[quantity][name]", "usage": "Storage Denial Of Service attack"} +helplist.cdos={"params": "[quantity]", "usage": "CPU Denial Of Service attack"} + +//virus controls +helplist.virus="-=Viruses=-" + +helplist.infect={"params": "N/A", "usage": "Infects /bin/ssh, /bin/passwd, and /bin/ps"} +helplist.rshell={"params": "[ip][process][port]", "usage": "Creates a reverse shell connection"} +helplist.ransom={"params": "N/A", "usage": "Encrypt a system and demand payment for decryption"} +helplist.inject={"params": "[file]", "usage": "Inject reverse shell code into a source code file"} +helplist.aptjack={"params": "N/A", "usage": "Jack the apt stream and infect every file!"} + +//security controls +helplist.security="-=Security=-" + +helplist.fyrwall={"params": "N/A", "usage": "SOLSTICE Fyrwall Security Analysis System"} +helplist.secure={"params": "[-s/-h]", "usage": "Secures your server or home computer"} +helplist.corrupt={"params": "N/A", "usage": "Corrupts /var/system.log, covers disconnect tracks"} + +//clipboard control +helplist.clipboard="-=Clipboard=-" +helplist.copy={"params": "[name][string]", "usage": "Copies text to the clipboard"} +helplist.ccopy={"params": "N/A", "usage": "Clears the clipboard"} + +cmds.help=function(sin) + out={} + out.bool=2 + if sin.len then + if helplist.hasIndex(sin[0]) then + print(""+sin[0]+"") + print(""+helplist[sin[0]].params+"") + print(""+helplist[sin[0]].usage+"") + end if + return out + end if + output=[] + l=["Command","Usage"] + output.push(l.join(" ")) + for i in helplist.indexes + if typeof(helplist[i]) == "string" then + output.push("\n"+helplist[i]+"\n") + else + l=[""+i+"",""+helplist[i].params+""] + output.push(l.join(" ")) + end if + end for + print(format_columns(output.join("\n"))) + return out +end function + +cmds.exit=function(sin) + out={} + out.bool=2 + if not origShell then + if globals.sessions[session].shells.len == 0 then + globals.sessions.remove(session) + globals.session=0 + print("[Lunar] Session reverted to 0") + xshell=globals.sessions[session].shell + globals.session=0 + globals.origShell=xshell.orig + globals.shell=xshell.shell + globals.xuser=xshell.user + globals.xpath=xshell.path + else + xshell=globals.sessions[session].shells.pop + globals.sessions[session].shell=xshell + globals.origShell=xshell.orig + globals.shell=xshell.shell + globals.xuser=xshell.user + globals.xpath=xshell.path + end if + else + exit("[Lunar] Closing Lunar, come back soon!") + end if + return out +end function + +cmds.clear=function(sin) + out={} + out.bool=2 + clear_screen + return out +end function + +cmds.crack=function(sin) + out={} + out.bool=1 + if sin.len != 1 then return error("Invalid parameters") + if server.shell then out.out=decipher(server.cp,sin[0]) else out.out=decipher(cp,sin[0]) + if not out.out then out.bool=3 + return out +end function + +cmds.setup=function(sin) + out={} + out.bool=2 + if not server.shell then + out.bool=3 + return out + end if + if sin.len > 1 then return error("Invalid parameters") + if anon and sin.len == 0 then return error("Hidden mode activated") + if sin.len == 0 then + print("Mail: "+conf.mail.user+" "+conf.mail.pass+"") + print("Server: "+conf.rss.ip+" "+conf.rss.user+"@"+conf.rss.pass+" "+conf.rss.port+" / "+conf.rss.rport+"") + print("Process: "+conf.proc+"") + return out + end if + if sin[0] == "-m" then + newmail=user_input("[Email]$ ",anon) + newepass=user_input("[Pass]$ ",anon) + test=mail_login(newmail,newepass) + if typeof(test) == "string" then return error(test) + conf.mail.user=newmail + conf.mail.pass=newepass + xconf.set_content(encrypt(str(conf),"Lunar","enc")) + print("[Lunar] Email updated successfully") + else if sin[0] == "-rs" then + newserver=user_input("[Server]$ ",anon) + newuser=user_input("[User]$ ",anon) + newpass=user_input("[Pass]$ ",anon) + newport=user_input("[Port]$ ").to_int + if typeof(newport) != "number" then return error("Invalid port") + newrport=user_input("[RPort]$ ").to_int + if typeof(newrport) != "number" then return error("Invalid port") + conf.rss.ip=newserver + conf.rss.user=newuser + conf.rss.pass=newpass + conf.rss.port=newport + conf.rss.rport=newrport + xconf.set_content(encrypt(str(conf),"Lunar","enc")) + print("[Lunar] RShell Server updated successfully") + else if sin[0] == "-ps" then + newproc=user_input("[Name]$ ") + conf.proc=newproc + xconf.set_content(encrypt(str(conf),"Lunar","enc")) + print("[Lunar] RShell Process name updated successfully") + end if + return out +end function + +cmds.sshs=function(sin) + out={} + out.bool=2 + logs="/root/sshs" + if not server.shell then + out.bool=3 + return out + end if + sshs=server.shell.host_computer.File(logs) + if not sshs then return error("Could not obtain logs") + if sin.len == 1 and sin[0] == "-c" then + sshs.set_content("<0%O<0w") + print("[Lunar] Cleared connection logs") + return out + end if + cont=sshs.get_content + if cont.len <= 7 then return error("No logs found") + cont=deserialize(encrypt(cont,"Lunar","dec")) + plog=[["SOURCE","DEST","PORT","USER","PASS"].join(" ")] + + for log in cont + plog.push([""+log.source,log.dest,log.port,log.user,log.pass+""].join(" ")) + end for + print(format_columns(plog.join("\n"))) + return out +end function + +cmds.passwds=function(sin) + out={} + out.bool=2 + logs="/root/passwd" + if not server.shell then + out.bool=3 + return out + end if + sudos=server.shell.host_computer.File(logs) + if not sudos then return error("Could not obtain logs") + if sin.len == 1 and sin[0] == "-c" then + sudos.set_content("<0%O<0w") + print("[Lunar] Cleared passwd logs") + return out + end if + cont=sudos.get_content + if cont.len <= 7 then return error("No logs found") + cont=deserialize(encrypt(cont,"Lunar","dec")) + plog=[["SOURCE","USER","PASS"].join(" ")] + + for log in cont + plog.push([""+log.source,log.user,log.pass+""].join(" ")) + end for + print(format_columns(plog.join("\n"))) + return out +end function + +cmds.clrmail=function(sin) + out={} + out.bool=2 + if not server.shell then + umaila=user_input("[Email]$ ",anon) + umaill=user_input("[Pass]$ ",anon) + else + umaila=conf.mail.user + umaill=conf.mail.pass + end if + mail=mail_login(umaila,umaill) + if typeof(mail) == "string" then return error(mail) + mails=mail.fetch + for email in mails + id=email.split("MailID: ")[1].split("\n")[0] + print("[Lunar] Deleting "+id+"") + mail.delete(id) + end for + return out +end function + +cmds.readmail=function(sin) + out={} + out.bool=1 + if not server.shell then + umaila=user_input("[Email]$ ",anon) + umaill=user_input("[Pass]$ ",anon) + else + umaila=conf.mail.user + umaill=conf.mail.pass + end if + mail=mail_login(umaila,umaill) + if typeof(mail) == "string" then return error(mail) + mails=mail.fetch + if mails.len == 0 then return out + ids=[] + num=0 + for email in mails + id=email.split("MailID: ")[1].split("\n")[0] + email=email.split("\n")[3:] + from=email[0].split("From: ")[1] + subject=email[1].split("Subject: ")[1] + email=email[2:-1].join("\n") + print("["+num+"]
[From] "+from+"
[Subj] "+subject+"
"+email+"") + num=num+1 + ids.push(id) + end for + opt=user_input("[#]$ ").to_int + if opt > ids.len or opt < 0 then return out + out.out=mail.read(ids[opt]).split(char(10))[2:].join(char(10)) + return out +end function + +cmds.ls=function(sin) + out={} + out.bool=2 + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 1 then + if shelltype == "file" then file=getFile(getPath(sin[0])) else file=comp.File(getPath(sin[0])) + else + if shelltype == "file" then file=shell else file=comp.File(xpath) + end if + if not file then return error("Path does not exist") + if not file.is_folder then return error("Not a folder") + + output=[] + l=[""+file.name, file.owner, file.group, file.size, file.permissions+""] + output.push(l.join(" ")) + l=["[Name]","[Owner]","[Group]","[Size]","[Permissions]\n"] + output.push(l.join(" ")) + for f in file.get_folders+file.get_files + l=[] + l.push(""+f.name) + l.push(f.owner) + l.push(f.group) + l.push(f.size) + l.push(f.permissions+"") + output.push(l.join(" ")) + end for + print(format_columns(output.join("\n"))) + return out +end function + +cmds.cd=function(sin) + out={} + out.bool=2 + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 0 then + if shelltype == "file" then + shell=getFile(home) + if not shell then shell=getFile("/") + globals.xpath=shell.path + globals.shell=shell + else + globals.xpath=home + end if + return out + end if + path=getPath(sin[0]) + if shelltype == "file" then file=getFile(path) else file=comp.File(path) + if not file then return error("Path does not exist") + if not file.is_folder then return error("Not a folder") + + if shelltype == "file" then globals.shell=file + globals.xpath=path + globals.sessions[session].shell.path=xpath + return out +end function + +cmds.cat=function(sin) + out={} + out.bool=1 + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + if shelltype == "file" then file=getFile(path) else file=comp.File(path) + if not file then return error("File does not exist") + if not file.has_permission("r") then return error("No permissions to file") + if file.is_folder then return error("Not a file") + if file.is_binary then return error("Binary file, cannot read") + out.out=file.get_content + return out +end function + +cmds.grep=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + sin[1]=sin[1].split("\n") + num=0 + for l in sin[1] + if l.indexOf(sin[0]) != null then + if pipe.len then + out.bool=1 + out.out=l + return out + end if + print("["+sin[1].indexOf(l)+"] "+l+"") + num=num+1 + end if + end for + if not num then return error("Could not find "+sin[0]) + return out +end function + +cmds.echo=function(sin) + out={} + out.bool=1 + if sin.len == 0 then return error ("Invalid parameters") + out.out=sin.join(" ") + return out +end function + +cmds.mkdir=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot create directories with a file shell") + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + name=path.split("/")[-1] + if comp.File(path) then return error("File exists") + path=parent_path(path) + if not comp.File(path) then return error("Path does not exist") + if not comp.File(path).is_folder then return error("Not a folder.") + if not comp.File(path).has_permission("w") then return error("No permissions to path") + comp.create_folder(path,name) + print("[Lunar] Folder created successfully") + return out +end function + +cmds.mv=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + origFile=getPath(sin[0]) + destFolder=getPath(sin[1]) + if shelltype == "file" then file=getFile(origFile) else file=comp.File(origFile) + if not file then return error("File does not exist") + if shelltype == "file" then folder=getFile(destFolder) else folder=comp.File(destFolder) + name="" + if not folder then + pathParent=parent_path(destFolder) + if pathParent == destFolder then + name=destFolder + file.move(parent_path(file.path),name) + return out + else + if shelltype == "file" then folder=getFile(pathParent) else folder=comp.File(pathParent) + name=destFolder[destFolder.len-(destFolder.len-pathParent.len):] + if name[0] == "/" then name=name[1:] + if not folder then return error("Path does not exist") + end if + end if + if folder then + if parent_path(file.path) != parent_path(folder.path) or file.name != folder.name then + finalDest=folder.path + if name.len == 0 then name=file.name + if not folder.is_folder then + finalDest=parent_path(file.path) + name=folder.name + end if + file.move(finalDest,name) + end if + end if + print("[Lunar] File moved successfully") + return out +end function + +cmds.cp=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + origFile=getPath(sin[0]) + destFolder=getPath(sin[1]) + if shelltype == "file" then file=getFile(origFile) else file=comp.File(origFile) + if not file then return error("File does not exist") + if shelltype == "file" then folder=getFile(destFolder) else folder=comp.File(destFolder) + name="" + if not folder then + pathParent=parent_path(destFolder) + if pathParent == destFolder then + name=destFolder + destFolder=file.parent.path + file.copy(destFolder,name) + return out + else + if shelltype == "file" then folder=getFile(pathParent) else folder=comp.File(pathParent) + name=destFolder[destFolder.len-(destFolder.len-pathParent.len):] + if name[0] == "/" then name=name[1:] + if not folder then return error("Path does not exist") + end if + end if + if folder then + if parent_path(file.path) != parent_path(folder.path) or file.name != folder.name then + finalDest=folder.path + if name.len == 0 then name=file.name + if not folder.is_folder then + finalDest=parent_path(file.path) + name=folder.name + end if + file.copy(finalDest,name) + end if + end if + print("[Lunar] File copied successfully") + return out +end function + +cmds.touch=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot create files with a file shell") + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + name=path.split("/")[-1] + if comp.File(path) then return error("File exists") + path=parent_path(path) + if not comp.File(path) then return error("Path does not exist") + if not comp.File(path).is_folder then return error("Not a folder") + if not comp.File(path).has_permission("w") then return error("No permissions to path") + comp.touch(path,name) + print("[Lunar] File created successfully") + return out +end function + +cmds.build=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len > 2 or sin.len == 0 then return error("Invalid parameters") + source=getPath(sin[0]) + dest=xpath + if sin.hasIndex(1) then dest=getPath(sin[1]) + + source=comp.File(source) + dest=comp.File(dest) + if not source then return error("Invalid source code file") + if not dest then return error("Invalid destination") + output=shell.build(source.path,dest.path) + if output.len == 0 then + print("[Lunar] Build successful") + else + out.bool=0 + out.err=output + end if + return out +end function + +cmds.shrink=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len != 2 then return error("Invalid parameters") + maxSize=sin[1].to_int + if typeof(maxSize) != "number" then return error("Invalid size") + path=getPath(sin[0]) + origSource=comp.File(path) + if not origSource then return error("Invalid source code file") + dest=parent_path(path) + if not comp.File(dest) then return error("Invalid destination") + alpha="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + al=alpha.len + currLen=1 + counters={} + start=time + print("[Lunar] Attempting to build "+sin[0]+" to "+maxSize+" or lower") + print("-= -=- =-") + while 1 + combo=al^currLen + for i in range(0,combo) + name="" + for q in range(0,(currLen-1)) + counters["c"+q]={} + c=counters["c"+q] + if q == 0 then + init=i + c.c=init + else + init=counters["c"+(q-1)].c + c.c=floor(init/al) + end if + c.i=c.c%al + name=name+alpha[c.i] + end for + comp.touch(dest,name+".rawr") + comp.File(dest+"/"+name+".rawr").set_content(origSource.get_content) + shell.build(dest+"/"+name+".rawr",dest) + comp.File(dest+"/"+name+".rawr").delete + wait(0.1) + if not comp.File(dest+"/"+name) then continue + if comp.File(dest+"/"+name).size.to_int <= maxSize then + diff=maxSize-comp.File(dest+"/"+name).size.to_int + elapsed=(time-start) + print("[Lunar] Finished in ["+elapsed+"] seconds.") + print("[Lunar] "+name+" "+comp.File(dest+"/"+name).size+" - "+diff+"") + comp.File(dest+"/"+name).rename(origSource.name.split(".")[0]) + print("[Lunar] Renaming "+name+" to "+origSource.name.split(".")[0]+"") + return out + end if + comp.File(dest+"/"+name).delete + counters={} + end for + currLen=currLen+1 + end while + return out +end function + +cmds.rm=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + if shelltype == "file" then file=getFile(path) else file=comp.File(path) + if not file then return error("File does not exist") + if not file.has_permission("w") then return error("No permissions to file") + if shelltype == "file" then f=getFile(parent_path(path)) else f=comp.File(parent_path(path)) + if not f.has_permission("w") then return error("No permissions to path") + if file.path == xpath then globals.xpath == parent_path(xpath) + file.delete + print("[Lunar] File deleted successfully") + return out +end function + +cmds.chmod=function(sin) + out={} + out.bool=2 + if sin.len < 2 or sin.len > 3 then return error("Invalid parameters") + perms=sin[1] + path=getPath(sin[0]) + if sin.len != 3 then rec=0 else rec=1 + if shelltype == "file" then file=getFile(path) else file=comp.File(path) + if not file then return error("File does not exist") + if not file.has_permission("w") and file.owner != xuser then return error("No permissions to file") + if perms.indexOf("+") != null then + perms=[perms[:perms.indexOf("+")],perms[perms.indexOf("+"):]] + else if perms.indexOf("-") != null then + perms=[perms[:perms.indexOf("-")],perms[perms.indexOf("-"):]] + else + return error("Invalid parameters") + end if + if not perms[0] then perms[0]="oug" + for perm in perms[0] + file.chmod(perm+perms[1],rec) + end for + print("[Lunar] chmod successful") + return out +end function + +cmds.chown=function(sin) + out={} + out.bool=2 + if sin.len < 2 or sin.len > 3 then return error("Invalid parameters") + owner=sin[1] + path=getPath(sin[0]) + if sin.len != 3 then rec=0 else rec=1 + if shelltype == "file" then file=getFile(path) else file=comp.File(path) + if not file then return error("File does not exist") + if not file.has_permission("w") and file.owner != xuser then return error("No permissions to file") + file.set_owner(owner,rec) + print("[Lunar] Owner changed successfully") + return out +end function + +cmds.chgrp=function(sin) + out={} + out.bool=2 + if sin.len < 2 or sin.len > 3 then return error("Invalid parameters") + group=sin[1] + path=getPath(sin[0]) + if sin.len != 3 then rec=0 else rec=1 + if shelltype == "file" then file=getFile(path) else file=comp.File(path) + if not file then return error("File does not exist") + if not file.has_permission("w") and file.owner != xuser then return error("No permissions to path") + file.set_group(group,rec) + print("[Lunar] Group changed successfully") + return out +end function + +cmds.sudo=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot change user on a remote connection") + if sin.len != 2 then return error("Invalid parameters") + sudosh=get_shell(sin[0],sin[1]) + if not sudosh then return error("Invalid username or password") + globals.sessions[session].shells.push(sessions[sessions].shell) + globals.shell=sudosh + globals.origShell=0 + globals.xuser=sin[0] + if sin[0] == "root" then globals.xpath="/root" else globals.xpath="/home/"+sin[0] + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out +end function + +cmds.passwd=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot change password with file shell") + if sin.len != 2 then return error("Invalid parameters") + output=comp.change_password(sin[0],sin[1]) + if output==true then print("[Lunar] Password for "+sin[0]+" changed to "+sin[1]+"") + if typeof(output) == "string" then return error(output) + return out +end function + +cmds.useradd=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot add users with file shell") + if sin.len != 2 then return error("Invalid parameters") + output=comp.create_user(sin[0],sin[1]) + if output==true then print("[Lunar] User "+sin[0]+" created") + if typeof(output) == "string" then return error(output) + return out +end function + +cmds.userdel=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot delete users with file shell") + if sin.len != 1 then return error("Invalid parameters") + output=comp.delete_user(sin[0],1) + if output==true then print("[Lunar] User "+sin[0]+" deleted") + if typeof(output) == "string" then return error(output) + return out +end function + +cmds.groups=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot view user groups with file shell") + if sin.len != 1 then return error("invalid parameters") + output=comp.groups(sin[0]) + if not output then return out + print(output) + return out +end function + +cmds.groupadd=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot add groups with file shell") + if sin.len != 2 then return error("Invalid parameters") + output=comp.create_group(sin[0],sin[1]) + if output==true then + print("[Lunar] "+sin[1]+" added to user "+sin[0]+"") + return out + end if + return error(output) +end function + +cmds.groupdel=function(sin) + out={} + out.bool=0 + if shelltype == "file" then return error("Cannot delete groups with file shell") + if sin.len != 2 then return error("Invalid parameters") + output=comp.delete_group(sin[0],sin[1]) + if output==true then + print("[Lunar] "+sin[1]+" removed from user "+sin[0]+"") + return out + end if + return error(output) +end function + +cmds.bash=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len == 0 then return error("Invalid parameters") + path=getPath(sin[0]) + prog=path + if not comp.File(prog) then return error("File does not exist") + if not comp.File(prog).has_permission("x") then return error("No permissions to file") + sin.pull + xparams=sin.join(" ") + shell.launch(prog,xparams) + return out +end function + +cmds.ps=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot list processes with file shell") + bar = function(n, bar_length = 35) // percentage number + fill_count = ceil(n / bar_length * 10) + empty_count = bar_length - fill_count + + fill_bar = "#"*fill_count + empty_bar = "-"*empty_count + + bar = ""+fill_bar+""+empty_bar+"" + return bar + end function + + ps_out = comp.show_procs + tasks = 0 + cpu_load = 0.0 + mem_load = 0.0 + users = [] + + // convert ps output to a map + counter = 0 + for l in ps_out.split("\n")[1:] + l = l.split(" ") + + cpu_load = cpu_load + l[2][:-1].val + mem_load = mem_load + l[3][:-1].val + + if l[0] == "root" then + u = ""+l[0]+"" + else + u = ""+l[0]+"" + end if + + n = ""+l[1]+"" + c = ""+l[2]+"" + m = ""+l[3]+"" + p = ""+l[4]+"" + imp=0 + for i in users + if i.u == u then + i.t.push({"n": n, "c": c, "m": m, "p": p}) + imp=1 + end if + end for + if not imp then + mp={} + mp.u=u + mp.t=[] + mp.t.push({"n": n, "c": c, "m": m, "p": p}) + users.push(mp) + end if + + tasks=tasks+1 + end for + print("tasks: "+tasks+"") + if tasks > 0 then + print("cpu_usage: ["+bar(cpu_load)+"]==[ "+cpu_load+"% ]") + print("mem_usage: ["+bar(mem_load)+"]==[ "+mem_load+"% ]\n") + end if + // print ps with colors + pps = [] + ps = ps_out.split("\n") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + + for m in users + pps.push(m.u) + for t in m.t + l=[t.n, t.c, t.m, t.p] + pps.push(l.join(" ")) + end for + pps.push("X") + end for + + print(format_columns(pps.join("\n"))) + return out +end function + +cmds.kill=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot kill processes with file shell") + if sin.len != 1 then return error("Invalid parameters") + if sin[0] == "all" then + procs=comp.show_procs.split("\n") + procs.pull + for proc in procs + proc=proc.split(" ") + if proc[-1] == lunar.split("/")[-1] and origShell == 1 then continue + output=comp.close_program(proc[1].to_int) + if output==true then print("[Lunar] Killed process "+proc[1]+"") + if typeof(output) == "string" then print("[Lunar] "+output+"") + wait(0.1) + end for + return out + end if + output=comp.close_program(sin[0].to_int) + if output==true then + print("[Lunar] Killed process "+sin[0]+"") + return out + end if + if output then return error(output) + out.bool=0 + out.err="Process "+sin[0]+" not found" + return out +end function + +cmds.ssh=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len < 2 or sin.len > 4 then return error("Invalid parameters") + acc=sin[0] + pass=sin[1] + serv=rhost + port=22 + if sin.len >= 3 then serv=sin[2] + if sin.len == 4 then + port=sin[3].to_int + if typeof(port) != "number" then return error("Invalid port") + end if + print("[Lunar] Establishing connection...") + ssh=shell.connect_service(serv,port,acc,pass,"ssh") + if typeof(ssh) == "shell" then + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=ssh + globals.origShell=0 + globals.xuser=acc + if acc == "root" then globals.xpath="/root" else globals.xpath="/home/"+acc + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "path": xpath, "user": xuser, "orig": origShell} + else + out.bool=0 + out.err="Could not establish connection" + end if + return out +end function + +cmds.vpn=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len < 2 or sin.len > 4 then return error("Invalid parameters") + acc=sin[0] + pass=sin[1] + serv=rhost + port=22 + if sin.len >= 3 then serv=sin[2] + if sin.len == 4 then + port=sin[3].to_int + if typeof(port) != "number" then return error("Invalid port") + end if + print("[Lunar] Establishing connection...") + ssh=server.shell.connect_service(serv,port,acc,pass,"ssh") + if typeof(ssh) == "shell" then + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=ssh + globals.origShell=0 + globals.xuser=acc + if acc == "root" then globals.xpath="/root" else globals.xpath="/home/"+acc + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "path": xpath, "user": xuser, "orig": origShell} + else + out.bool=0 + out.err="Could not establish connection" + end if + return out +end function + +cmds.shell=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 1 and comp.File(xpath) and comp.File(xpath).has_permission("w") then + get_shell.host_computer.File(lunar).chmod("o+rx") + get_shell.host_computer.File(lunar).chmod("u+rx") + get_shell.host_computer.File(lunar).chmod("g+rx") + print("[Lunar] Uploading Lunar\n") + get_shell.scp(lunar,xpath,shell) + get_shell.host_computer.File(mxf).chmod("o+rx") + get_shell.host_computer.File(mxf).chmod("u+rx") + get_shell.host_computer.File(mxf).chmod("g+rx") + print("[Lunar] Uploading metaxploit\n") + get_shell.scp(mxf,xpath,shell) + get_shell.host_computer.File(cpf).chmod("o+rx") + get_shell.host_computer.File(cpf).chmod("u+rx") + get_shell.host_computer.File(cpf).chmod("g+rx") + print("[Lunar] Uploading crypto\n") + get_shell.scp(cpf,xpath,shell) + if la then + comp.touch(xpath,"LuDB") + print("[Lunar] Uploading Lunar DB\n") + comp.File(xpath+"/LuDB").set_content(dbfile.get_content) + end if + if scnln and sin[0].indexOf("s") != null then + get_shell.host_computer.File(scnln).chmod("o+rx") + get_shell.host_computer.File(scnln).chmod("u+rx") + get_shell.host_computer.File(scnln).chmod("g+rx") + print("[Lunar] Uploading ScanLan\n") + get_shell.scp(scnln,xpath,shell) + end if + end if + print("[Lunar] Starting shell at "+comp.public_ip+", come back soon!") + shell.start_terminal + return out +end function + +cmds.put=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len < 1 or sin.len > 2 then return error("Invalid parameters") + if not get_shell.host_computer.File(sin[0]) then return error("File does not exist") + if not get_shell.host_computer.File(sin[0]).has_permission("r") then return error("No permissions to file") + if sin.len == 2 then path=getPath(sin[1]) else path=xpath + if not comp.File(path) then return error("Path does not exist") + if not comp.File(path).has_permission("w") then return error("No permissions to path") + get_shell.scp(sin[0],path,shell) + return out +end function + +cmds.get=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len < 1 or sin.len > 2 then return error("Invalid parameters") + path=getPath(sin[0]) + if not comp.File(path) then return error("File does not exist") + if not comp.File(path).has_permission("r") then return error("No permissions to file") + if sin.len == 2 then lpath=sin[1] else lpath=current_path + if not get_shell.host_computer.File(lpath) then return error("Path does not exist") + if not get_shell.host_computer.File(lpath).has_permission("w") then return error("No permissions to path") + shell.scp(path,lpath,get_shell) + return out +end function + +cmds.set=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + var=sin[0] + set=sin[1] + + if var == "user" then globals.xuser=set + return out +end function + +cmds.info=function(sin) + out={} + out.bool=2 + print("[Lunar] RHost: "+rhost+"") + print("[Lunar] Session: "+session+"") + return out +end function + +cmds.rhost=function(sin) + out={} + out.bool=2 + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 0 then + if shelltype == "file" then + globals.rhost=globals.sessions[session].shell.pubip + else + globals.rhost=comp.network_gateway + if rhost == "0.0.0.0" then globals.rhost=comp.local_ip + end if + else + if sin[0][:3] == "www" then sin[0]=nslookup(sin[0]) + router=get_router(sin[0]) + if is_lan_ip(sin[0]) then router=get_router + if not router then return error("Invalid address") + globals.rhost=sin[0] + end if + if rhost == pubip and anon then print("[Lunar] RHost: x.x.x.x") else print("[Lunar] RHost: "+rhost+"") + globals.sessions[session].rhost=rhost + return out +end function + +cmds.random=function(sin) + out={} + out.bool=2 + ip=null + while not get_router(ip) + ip=getRandomIp + end while + globals.rhost=ip + print("[Lunar] RHost: "+rhost+"") + globals.sessions[session].rhost=rhost + return out +end function + +cmds.nmap=function(sin) + out={} + out.bool=2 + if sin.len then + if sin[0][:3] == "www" then sin[0]=nslookup(sin[0]) + locals.rhost=sin[0] + end if + islan=is_lan_ip(rhost) + router=get_router(rhost) + if islan then router=get_router + if not router then return error("Invalid address") + wifi=router.essid_name + bssid=router.bssid_name + rver=router.kernel_version + fwr=router.firewall_rules + if islan then + ports=router.device_ports(rhost) + else + ports=router.used_ports + end if + ips=[] + if rhost != router.local_ip then + hport=null + if router.device_ports(router.local_ip).len then hport=router.device_ports(router.local_ip)[0] + m={} + m.ip=router.local_ip + m.ports=[] + if hport then m.ports.push(hport) + ips.push(m) + m=null + end if + fwinfo="action port source dest" + for rules in fwr + fwinfo=fwinfo+"\n"+rules + end for + extinfo=""+rhost+"|wifi: "+wifi+" |bssid: "+bssid+"" + info="# lan port status service version" + print(extinfo) + if fwr then print(format_columns(fwinfo)) + num=0 + for port in ports + inMap=0 + for m in ips + if m.ip == port.get_lan_ip then + m.ports.push(port) + inMap=1 + end if + end for + if not inMap then + m={} + m.ip=port.get_lan_ip + m.ports=[port] + ips.push(m) + end if + end for + for m in ips + ports=m.ports + ip=m.ip + info=info+"\n"+num+" "+ip+" /" + if ip == router.local_ip then info=info+"\n |0 routed router "+rver + for port in ports + service=router.port_info(port) + status="routed" + if port.is_closed then status="closed" + info=info+"\n |"+port.port_number+" "+status+" "+service + end for + num=num+1 + end for + if not islan or rhost[-2:] == ".1" then; for sub in router.devices_lan_ip + subIn=0 + for m in ips + if sub == m.ip then subIn=1 + end for + if subIn then continue + info=info+"\n"+num+" "+sub + num=num+1 + end for;end if + print(format_columns(info)+"\n") + whoisinfo=whois(rhost).split("\n") + print("[Lunar] WhoIs results") + if whoisinfo.len < 3 then + print("[Lunar] Could not perform WhoIs operation") + return out + end if + print(""+whoisinfo[0]+"
"+whoisinfo[1]+"
"+whoisinfo[2]+"") + return out +end function + +cmds.target=function(sin) + out={} + out.bool=2 + globals.args=null + rinfo=[["[Num]","[Object]","[Perms]","[Lan]","[PubIP]","[Port]"].join(" ")] + if sin.len > 2 then return error("Invalid parameters") + globals.expport=sin[0].to_int + if typeof(expport) != "number" then return error("Invalid port") + if sin.len == 2 then globals.args=sin[1] + if server.shell then + server.shell.launch("/root/rcon") + lmx=COB.server.mx + else + lmx=mx + end if + globals.lmx=lmx + ns=mx.net_use(rhost,expport) + if not ns then return error("Cannot establish net session") + globals.ml=ns.dump_lib + if server.shell then + getExploits + inDB=0 + for dblib in exploits + if ml.lib_name == dblib.name and ml.version == dblib.ver then inDB=1 + end for + end if + if dbfile then + getExploits + globals.lib=null + for dblib in exploits + if ml.lib_name == dblib.name and ml.version == dblib.ver then + globals.lib=dblib + break + end if + end for + saveScan() + else + Scan() + end if + exps={"root": [], "user": [], "guest": []} + for ex in results + if ex.user == "root" then + exps.root.push(ex) + else if ex.user == "guest" then + exps.guest.push(ex) + else + exps.user.push(ex) + end if + end for + results=exps.root+exps.user+exps.guest + exps={"shell": [], "comp": [], "file": []} + for ex in results + if typeof(ex.obj) == "shell" then + exps.shell.push(ex) + else if typeof(ex.obj) == "computer" then + exps.comp.push(ex) + else if typeof(ex.obj) == "file" then + exps.file.push(ex) + end if + end for + results=exps.shell+exps.comp+exps.file + globals.sessions[session].results=results + for ex in results + rinfo.push(["["+__ex_idx+"]",ex.obj,ex.user,ex.lan,ex.pub,ex.port+""].join(" ")) + end for + globals.results=results + globals.rinfo=rinfo + print(format_columns(rinfo.join("\n"))) + return out +end function + +cmds.escalate=function(sin) + out={} + out.bool=2 + globals.args=null + rinfo=[["[Num]","[Object]","[Perms]","[Lan]","[PubIP]","[Port]"].join(" ")] + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 1 then globals.args=sin[0] + libs=comp.File("/lib") + if server.shell then + server.shell.launch("/root/rcon") + lmx=COB.server.mx + else + lmx=mx + end if + globals.lmx=lmx + for exlib in libs.get_files + globals.ml=mx.load(exlib.path) + if not ml then continue + if args then print(format_columns("LIB ARGS\n"+exlib.name+" "+args+"\n")) else print(format_columns("LIB\n"+exlib.name+"\n")) + if dbfile or server.shell then + getExploits + globals.lib=null + for dblib in exploits + if ml.lib_name == dblib.name and ml.version == dblib.ver then + globals.lib=dblib + break + end if + end for + saveScan() + else + Scan() + end if + end for + exps={"root": [], "user": [], "guest": []} + for ex in results + if ex.user == "root" then + exps.root.push(ex) + else if ex.user == "guest" then + exps.guest.push(ex) + else + exps.user.push(ex) + end if + end for + results=exps.root+exps.user+exps.guest + exps={"shell": [], "comp": [], "file": []} + for ex in results + if typeof(ex.obj) == "shell" then + exps.shell.push(ex) + else if typeof(ex.obj) == "computer" then + exps.comp.push(ex) + else if typeof(ex.obj) == "file" then + exps.file.push(ex) + end if + end for + results=exps.shell+exps.comp+exps.file + globals.sessions[session].results=results + for ex in results + rinfo.push(["["+__ex_idx+"]",ex.obj,ex.user,ex.lan,ex.pub,ex.port+""].join(" ")) + end for + globals.rinfo=rinfo + globals.results=results + print(format_columns(rinfo.join("\n"))) + return out +end function + +cmds.results=function(sin) + out={} + out.bool=2 + if sin.len == 1 and sin[0] == "-c" then + globals.results=[] + globals.sessions[session].results=results + globals.rinfo=null + print("[Lunar] Cleared results") + return out + end if + if not results.len then return error("No exploits found") + print(format_columns(rinfo.join("\n"))) + return out +end function + +cmds.use=function(sin) + out={} + out.bool=2 + if not results.len then return error("No exploits found") + if sin.len != 1 then return error("Invalid parameters") + num=sin[0].to_int + if typeof(num) != "number" or num > results.len or num < 0 then return error("Invalid selection") + ex=results[num] + result=ex.obj + globals.sessions[session].shells.push(globals.sessions[session].shell) + if typeof(result) != "file" then + shell=result + comp=shell + if typeof(shell) == "shell" then comp=shell.host_computer + xuser=ex.user + if ex.user == "root" then xpath="/root" else xpath="/home/"+xuser + if not comp.File(xpath) then xpath="/" + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": 0} + globals.shell=shell + globals.origShell=0 + globals.comp=comp + globals.xuser=xuser + globals.xpath=xpath + print("[Lunar] Checking for active admins...") + procs=comp.show_procs.split("\n")[1:] + admin=0 + for proc in procs + proc=proc.split(" ")[-1] + if proc == "dsession" then admin=1 + if proc == "Xorg" then admin=2 + end for + if admin == 1 then + print("ACTIVE ADMIN DETECTED!") + else if admin == 2 then + print("ACTIVE PLAYER DETECTED!") + else + print("[Lunar] No admins detected") + end if + else + shell=result + comp=result + while comp.path != "/" + comp=comp.parent + end while + xuser=ex.user + xpath=shell.path + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": 0, "pubip": ex.pub, "locip": ex.lan} + globals.shell=shell + globals.origShell=0 + globals.comp=comp + globals.xuser=xuser + globals.xpath=shell.path + end if + return out +end function + +cmds.rshell=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot run an rshell on a remote connection") + if (not server.shell and sin.len < 2) or sin.len > 3 then return error("Invalid parameters") + rsport=1222 + if server.shell then + rip=conf.rss.ip + rsport=conf.rss.rport + uproc=conf.proc + end if + if sin.len >=1 then rip=sin[0] + if sin.len >=2 then uproc=sin[1] + if sin.len == 3 then + rsport=sin[2].to_int + if typeof(rsport) != "number" then return error("Invalid port") + end if + mx.rshell_client(rip,rsport,uproc) + return out +end function + +cmds.rss=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot receive rshell connections on a remote connection") + if not server.shell then return error("Server connection required") + print("[Lunar] Connecting to rshell server...") + rsc=server.shell.connect_service(conf.rss.ip,conf.rss.port,conf.rss.user,conf.rss.pass) + if typeof(rsc) == "shell" then + print("[Lunar] Connected successfully") + else + return error("Could not connect") + end if + if not rsc.host_computer.File("/root/shell") then rsc.host_computer.touch("/root","shell") + rsfile="/root/rss" + rsc.launch(rsfile) + rsinfo="num pubip locip user\n" + rshells=COB.rshells + opt=null + print(rshells.len+" shells") + for i in range(0,rshells.len-1) + rfile=rshells[i].host_computer.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rshells[i].host_computer.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + rsinfo=rsinfo+"\n"+i+"| "+rshells[i].host_computer.public_ip+" "+rshells[i].host_computer.local_ip+" "+ruser + end for + print(format_columns(rsinfo)) + while opt > rshells.len-1 or opt < 0 or typeof(opt) != "number" + opt=user_input("[#]$ ").to_int + if opt == "b" then return out + end while + print("[Lunar] Starting shell #"+opt+"") + rfile=rshells[opt].host_computer.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rshells[opt].host_computer.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=rshells[opt] + globals.origShell=0 + globals.xuser=ruser + if xuser == "root" then globals.xpath="/root" else globals.xpath="/home/"+xuser + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out +end function + +cmds.rsi=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot receive rshell connections on a remote connection") + if not include_lib("/lib/librshell.so") then return error("No rshell server installed") + rsinfo="num pubip locip user\n" + rshells=[] + print("[Lunar] Waiting for connections. . .") + while rshells.len == 0 + rshells=mx.rshell_server + if rshells.len == 0 then wait(2) + end while + if typeof(rshells) == "string" then return error(rshells) + opt=null + print(rshells.len+" shells") + for i in range(0,rshells.len-1) + rfile=rshells[i].host_computer.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rshells[i].host_computer.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + rsinfo=rsinfo+"\n"+i+"| "+rshells[i].host_computer.public_ip+" "+rshells[i].host_computer.local_ip+" "+ruser + end for + print(format_columns(rsinfo)) + while opt > rshells.len-1 or opt < 0 or typeof(opt) != "number" + opt=user_input("[#]$ ").to_int + if opt == "b" then return out + end while + print("[Lunar] Starting shell #"+opt+"") + rfile=rshells[opt].host_computer.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rshells[opt].host_computer.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=rshells[opt] + globals.origShell=0 + globals.xuser=ruser + if xuser == "root" then globals.xpath="/root" else globals.xpath="/home/"+xuser + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out +end function + +cmds.sniffer=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot sniff connections on a remote connection") + if sin.len > 1 then return error("Invalid parameters") + save=0 + if sin.len == 1 then save=1 + print("[Lunar] Waiting for network traffic. . .") + output=mx.sniffer(save) + if not output then return error("Failed to listen to network traffic") + print(output) + return out +end function + +cmds.iwctl=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot change WiFi on a Filetype shell") + if sin.len != 3 then return error("Invalid parameters") + if comp.active_net_card != "WIFI" then return error("Cannot use ethernet") + check=comp.connect_wifi("wlan0",sin[0],sin[1],sin[2]) + if check != 1 then return error(check) + return out +end function + +cmds.net=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot list WiFi networks on a Filetype shell") + if comp.active_net_card != "WIFI" then return error("Cannot use ethernet") + print comp.wifi_networks("wlan0").join(char(10)) + return out +end function + +cmds.inet=function(sin) + out={} + out.bool=1 + if not origShell then return error("Cannot hack wifi connections on a remote connection") + if sin.len > 2 then return error("Invalid parameters") + winfo="# BSSID POWER ESSID" + num=0 + sel=null + nd=comp.network_devices + an=comp.active_net_card + if an != "WIFI" then return error("Cannot use ethernet") + cp.airmon("start","wlan0") + wifis=comp.wifi_networks("wlan0") + if sin.len < 2 then + for wifi in wifis + winfo=winfo+"\n"+num+" "+wifi + num=num+1 + end for + print(format_columns(winfo)) + while sel > wifis.len or sel < 0 or typeof(sel) != "number" + sel=user_input("#> ").to_int + if sel == "b" then break + end while + if sel == "b" then + out.bool=2 + return out + end if + wifi=wifis[sel].split(" ") + pwr=wifi[1] + pwr=pwr[:pwr.len-1].to_int + bssid=wifi[0] + essid=wifi[2] + maxacks=300000/pwr + cp.aireplay(bssid,essid,maxacks) + else + bssid=sin[0] + essid=sin[1] + cp.aireplay(bssid,essid,300000) + end if + out.out=cp.aircrack(current_path+"/file.cap") + return out +end function + +cmds.mailbomb=function(sin) + out={} + out.bool=2 + if sin.len != 4 then return error("Invalid parameters") + if not server.shell then + umaila=user_input("[Email]$ ",anon) + umaill=user_input("[Pass]$ ",anon) + else + umaila=conf.mail.user + umaill=conf.mail.pass + end if + mail=mail_login(umaila,umaill) + if typeof(mail) == "string" then return error(mail) + rec=sin[0] + sub=sin[1] + text=sin[2] + quant=sin[3].to_int + for num in range(0,quant) + send=mail.send(rec,sub,text) + if typeof(send) != "number" then return error("Could not send email") + print("[Lunar] Sent email #"+num+"") + end for + return out +end function + +cmds.revoke=function(sin) + out={} + out.bool=2 + token.set_content("") + print("[Lunar] Revoked access token") + return out +end function + +cmds.brick=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot brick system with file shell") + if not comp.File("/").has_permission("w") then return error("No permissions to system") + if origShell then + print("[Lunar] Executing on the ORIGINAL SHELL, are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + end if + num=1 + length=comp.File("/").get_files.len + length=length+comp.File("/").get_folders.len + for file in comp.File("/").get_files+comp.File("/").get_folders + print("[Lunar] DELETING FILE "+file.path+" "+num+"/"+length+"") + num=num+1 + file.delete + end for + return out +end function + +cmds.dos=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot disable remote system") + print("[Lunar] Are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + num=0 + while true + mx.rshell_client("0.0.0.0",0,"DOS"+num) + comp.touch(xpath,"DOS"+num) + print("[Lunar] Spawned DOS"+num+"") + num=num+1 + end while + return out +end function + +cmds.rdos=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot disable remote system") + if sin.len != 1 or typeof(sin[0].to_int) != "number" then return error("Invalid parameters") + print("[Lunar] Are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + for i in range(0, sin[0].to_int) + mx.rshell_client("0.0.0.0",0,"DOS"+i) + print("[Lunar] Spawned DOS"+i+"") + end for + return out +end function + +cmds.fdos=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot disable remote system with file shell") + if not comp.File(xpath).has_permission("w") then return error("No permissions to path") + if sin.len > 2 or sin.len == 0 or typeof(sin[0].to_int) != "number" then return error("Invalid parameters") + name="DOS" + if sin.len == 2 then name=sin[1] + print("[Lunar] Are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + for i in range(0,sin[0].to_int) + comp.touch(xpath,name+str(i)) + print("[Lunar] Spawned "+name+str(i)+"") + end for + return out +end function + +cmds.cdos=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot disable remote connection") + if sin.len != 1 or typeof(sin[0].to_int) != "number" then return error("Invalid parameters") + print("[Lunar] Are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + for i in range(0,sin[0].to_int) + print("[Lunar] Cracking hardware pass "+i+"\n") + cp.decipher("null") + end for + return out +end function + +cmds.vim=function(sin) + out={} + out.bool=2 + if sin.len > 2 or sin.len < 1 then return error("Invalid parameters") + if shelltype == "file" then file=getFile(getPath(sin[0])) else file=comp.File(getPath(sin[0])) + if not file then return error("File does not exist") + if file.is_binary then return error("Binary file, cannot edit") + if not file.has_permission("w") or not file.has_permission("r") then return error("No permissions to file") + if sin.len == 2 then + file.set_content(sin[1]) + return out + end if + cont=file.get_content.split("\n") + while 1 + print("-=-= Lunar - "+file.path+" =-=-") + for i in range(0,cont.len-1) + print(i+"|"+cont[i]) + end for + print("< nl - newline [line#] q - quit c - clear file >") + sel=user_input("#> ") + if sel.lower == "q" then break + if sel.lower == "c" then + cont=[""] + file.set_content("") + continue + end if + sel=sel.to_int + if typeof(sel) != "number" and sel.split(" ")[0].lower == "nl" then + if sel.split(" ").len != 2 then continue + sel=sel.split(" ")[1].to_int + if typeof(sel) != "number" then continue + if sel < -1 or sel >= cont.len then continue + newcont=[] + if sel == -1 then + newcont.push("") + newcont=newcont+cont + else + for i in range(0,cont.len-1) + newcont.push(cont[i]) + if i == sel then newcont.push("") + end for + end if + cont=newcont + file.set_content(cont.join(char(10))) + continue + end if + if sel < 0 or sel >= cont.len then continue + currLine=cont[sel] + while 1 + print("-=-= Line "+sel+" =-=-\n"+currLine) + print("< :w to save :q to quit :d to delete line >") + edit=user_input("> ") + if edit.lower == ":q" then + print("Quitting") + else if edit.lower == ":w" then + cont[sel]=currLine + file.set_content(cont.join(char(10))) + print("Saved") + print("Quitting") + else if edit.lower == ":d" then + cont.remove(sel) + file.set_content(cont.join(char(10))) + print("Saved") + print("Quitting") + else + currLine=edit + end if + if edit.lower == ":w" or edit.lower == ":q" or edit.lower == ":d" then break + end while + end while + print("Quitting") + return out +end function + +cmds.infect=function(sin) + out={} + out.bool=2 + if not server.shell then + out.bool=3 + return out + end if + if shelltype != "shell" then return error("Shell required") + if not comp.File("/bin") or not comp.File("/bin").has_permission("w") then return error("Cannot access /bin") + print("[Lunar] Are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + print("[Lunar] Replacing ssh\n") + p=null + if comp.File("/bin/ssh") then p=comp.File("/bin/ssh").permissions[1:] + server.shell.scp("/root/Downloads/ssh","/bin",shell) + f=comp.File("/bin/ssh") + f.chmod("u-wrx") + f.chmod("g-wrx") + f.chmod("o-wrx") + if p then + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + else + p=comp.File("/bin").permissions[1:] + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + end if + f.chmod("u+"+up) + f.chmod("g+"+gp) + f.chmod("o+"+op) + print("[Lunar] Replacing passwd\n") + p=null + if comp.File("/bin/passwd") then p=comp.File("/bin/passwd").permissions[1:] + server.shell.scp("/root/Downloads/passwd","/bin",shell) + f=comp.File("/bin/passwd") + f.chmod("u-wrx") + f.chmod("g-wrx") + f.chmod("o-wrx") + if p then + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + else + p=comp.File("/bin").permissions[1:] + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + end if + f.chmod("u+"+up) + f.chmod("g+"+gp) + f.chmod("o+"+op) + print("[Lunar] Replacing ps\n") + buildPS(conf.proc) + return out +end function + +cmds.rootkit=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if not comp.File(xpath).has_permission("w") then return error("No permissions to folder") + get_shell.host_computer.File(lunar).chmod("o+rx") + get_shell.host_computer.File(lunar).chmod("u+rx") + get_shell.host_computer.File(lunar).chmod("g+rx") + print("[Lunar] Uploading Lunar\n") + get_shell.scp(lunar,xpath,shell) + get_shell.host_computer.File(mxf).chmod("o+rx") + get_shell.host_computer.File(mxf).chmod("u+rx") + get_shell.host_computer.File(mxf).chmod("g+rx") + print("[Lunar] Uploading metaxploit\n") + get_shell.scp(mxf,xpath,shell) + get_shell.host_computer.File(cpf).chmod("o+rx") + get_shell.host_computer.File(cpf).chmod("u+rx") + get_shell.host_computer.File(cpf).chmod("g+rx") + print("[Lunar] Uploading crypto\n") + get_shell.scp(cpf,xpath,shell) + if la then + comp.touch(xpath,"LuDB") + print("[Lunar] Uploading Lunar DB\n") + comp.File(xpath+"/LuDB").set_content(dbfile.get_content) + end if + if scnln and sin.len == 1 and sin[0].indexOf("s") != null then + get_shell.host_computer.File(scnln).chmod("o+rx") + get_shell.host_computer.File(scnln).chmod("u+rx") + get_shell.host_computer.File(scnln).chmod("g+rx") + print("[Lunar] Uploading ScanLan\n") + get_shell.scp(scnln,xpath,shell) + end if + return out +end function + +cmds.pwd=function(sin) + out={} + out.bool=1 + out.out=xpath + return out +end function + +cmds.whoami=function(sin) + out={} + out.bool=1 + out.out=xuser + return out +end function + +cmds.whereami=function(sin) + out={} + out.bool=1 + out.out=pubip + return out +end function + +cmds.fyrwall=function(sin) + print(">~-~-~-~-~ STARTING FYRWALL ~-~-~-~-~") + print("-= -=- =-") + print("[Lunar] SAVING CURRENT SYSTEM STATE") + print("-= -=- =-") + safeProcs=[] + procs=comp.show_procs.split("\n")[1:] + for proc in procs + proc=proc.split(" ") + safeProcs.push({"user": proc[0], "id": proc[1], "name": proc[-1]}) + end for + + safeFiles=[] + newFiles=[] + root=comp.File("/") + currFile=root + newFiles=newFiles+root.get_folders+root.get_files + while newFiles.len + alreadyIn=0 + currFile=newFiles.pull + for i in safeFiles + if i.path == currFile.path then alreadyIn=1 + end for + if alreadyIn then continue + safeFiles.push({"path": currFile.path, "size": currFile.size}) + for file in currFile.get_folders+currFile.get_files + newFiles.push(file) + end for + end while + + print("[Lunar] WAITING FOR UNLISTED FILES AND PROCESSES") + print("-= -=- =-") + while 1 + newProcs=comp.show_procs.split("\n")[1:] + + for proc in newProcs + proc=proc.split(" ") + proc={"user": proc[0], "id": proc[1], "name": proc[-1]} + if safeProcs.indexOf(proc) == null then + print("[Lunar] KILLING UNLISTED PROCESS "+proc.name+"") + comp.close_program(proc.id.to_int) + end if + end for + + newFiles=[] + newFiles=newFiles+root.get_folders+root.get_files + while newFiles.len + safeFile=0 + currFile=newFiles.pull + for file in safeFiles + if file.path == currFile.path and file.size == currFile.size then safeFile=1 + end for + if not safeFile and not currFile.is_folder then + print("[Lunar] DELETING UNLISTED FILE "+currFile.path+"") + currFile.delete + end if + for file in currFile.get_folders+currFile.get_files + newFiles.push(file) + end for + end while + end while +end function + +cmds.bios=function(sin) + out={} + out.bool=2 + print("-=-= [Lunar OS Bios Scan] =-=-") + print("-= Performing full system check... =-") + print("[LunarOS]") + start=time + wait(1) + + //processes + if shelltype != "file" then + ps=comp.show_procs + gps=0 + ups=0 + rps=0 + tasks=0 + cpu=0.0 + mem=0.0 + for l in ps.split("\n")[1:] + l=l.split(" ") + if l[0] == "root" then + rps=rps+1 + else if l[0] == "guest" then + gps=gps+1 + else + ups=ups+1 + end if + + cpu=cpu+l[2][:1].val + mem=mem+l[3][:1].val + + tasks=tasks+1 + end for + + print("System processes") + print("Total ["+tasks+"]") + print("Root ["+rps+"] User ["+ups+"] Guest ["+gps+"]") + print("System threads.usage") + print("CPU usage ["+bar(cpu)+"]=-=["+cpu+"%]") + print("Mem usage ["+bar(mem)+"]=-=["+mem+"%]") + print("Temp [therm.io 404]\n") + + end if + + //system date + print("System date") + print(""+current_date+"") + print("System time") + print(""+time+"\n") + + //drive + if shelltype == "file" then root=comp else root=comp.File("/") + newFiles=[] + newFiles=newFiles+root.get_folders+root.get_files + size=0 + flds=0 + fls=0 + while newFiles.len + currFile=newFiles.pull + if currFile.is_folder then + flds=flds+1 + newFiles=currFile.get_folders+currFile.get_files+newFiles + else + size=size+currFile.size.val + fls=fls+1 + end if + end while + + print("System storage") + print("Used storage ["+size+"] - Free space [sda read error]") + print("Folders count ["+flds+"] - Files count ["+fls+"]\n") + + //network + if shelltype != "file" and not anon then + essid=get_router(comp.public_ip).essid_name + bssid=get_router(comp.public_ip).bssid_name + wifis=null + if comp.active_net_card != "ETHERNET" then wifis=comp.wifi_networks("wlan0") + if comp.network_devices.len == 0 then card="404" else card=comp.network_devices.split("\n")[0].split(" ")[1] + pwr=null + if wifis then + for wifi in wifis + wifi=wifi.split(" ") + if wifi[0] == bssid and wifi[2] == essid then pwr=wifi[1][:-1].val + end for + end if + + print("System network") + print("Netcard ["+card+"]") + print("Type ["+comp.active_net_card+"]") + print("Address ["+comp.local_ip+":"+comp.public_ip+"]") + print("ESSID ["+essid+"]") + print("BSSID ["+bssid+"]") + if pwr then print("Power ["+bar(pwr)+"]=-=["+pwr+"%]\n") else print("Power [pwr 404]\n") + end if + + //memory + print("Lunar resources") + if clipboard then s=str(clipboard) else s="clipboard empty" + print("Clipboard ["+s+"]") + print("Sessions ["+globals.sessions.len+"]") + print("Database [read error: string limit reached]\n") + + //fyrwall + if shelltype == "file" then root=comp else root=comp.File("/") + newFiles=[] + newFiles=newFiles+root.get_folders+root.get_files + insecuredFiles=[] + num=0 + while newFiles.len + f={} + currFile=newFiles.pull + f.path=currFile.path + f.perms=0 + f.owner=0 + if currFile.is_folder then newFiles=currFile.get_folders+currFile.get_files+newFiles + if currFile.permissions[-3:].indexOf("w") != null then f.perms=1 + if currFile.owner != "root" then fowner=1 + if f.owner or f.perms then + num=num+1 + insecuredFiles.push(f) + end if + end while + + print("[Lunar] Fyrwall Security Analysis") + print("Unsecured file count ["+str(num)+"]") + print + + elapsed=str(time-start) + elapsed=elapsed[0:elapsed.indexOf(".")+2] + print("[Lunar] Finished system analysis in ["+elapsed+"] seconds.") + return out +end function + +cmds.encrypt=function(sin) + out={} + out.bool=1 + if sin.len != 3 then return error("Invalid parameters") + if sin[2] != "enc" and sin[2] != "dec" then return error("Invalid parameters") + out.out=encrypt(sin[0],sin[1],sin[2]) + return out +end function + +cmds.md5=function(sin) + out={} + out.bool=1 + if sin.len != 1 then return error("Invalid parameters") + out.out=md5(sin[0]) + return out +end function + +cmds.S256=function(sin) + out={} + out.bool=1 + if sin.len != 1 then return error("Invalid parameters") + out.out=Sha256(sin[0]) + return out +end function + +cmds.rot=function(sin) + out={} + out.bool=1 + if sin.len != 2 then return error("Invalid parameters") + if typeof(sin[0]).to_int != "number" then return error("Invalid number") + out.out=rot(sin[0].to_int,sin[1]) + return out +end function + +cmds.vigenere=function(sin) + out={} + out.bool=1 + if sin.len != 3 then return error("Invalid parameters") + if sin[2] != "enc" and sin[2] != "dec" then return error("Invalid parameters") + out.out=vigenere(sin[0],sin[1],sin[2]) + return out +end function + +cmds.base64=function(sin) + out={} + out.bool=1 + if sin.len != 2 then return error("Invalid parameters") + if sin[1] != "enc" and sin[1] != "dec" then return error("Invalid parameters") + out.out=base64(sin[0],sin[1]) + return out +end function + +cmds.base=function(sin) + out={} + out.bool=1 + if sin.len < 1 or sin.len > 3 then return error("Invalid parameters") + if sin.len == 1 then + out.out=parseint(sin[0]) + else if sin.len == 2 then + sin[1]=sin[1].to_int + if not typeof(sin[1]) == "number" then return error("Invalid parameters") + if sin[1] < 2 or sin[1] > 62 then return error("Invalid parameters") + out.out=parseint(sin[0],sin[1]) + else if sin.len == 3 then + sin[1]=sin[1].to_int + sin[2]=sin[2].to_int + if not typeof(sin[1]) == "number" then return error("Invalid parameters") + if not typeof(sin[2]) == "number" then return error("Invalid parameters") + if sin[1] < 2 or sin[1] > 62 then return error("Invalid parameters") + if sin[2] < 2 or sin[2] > 62 then return error("Invalid parameters") + out.out=parseint(sin[0],sin[1],sin[2]) + end if + return out +end function + +cmds.compress=function(sin) + out={} + out.bool=1 + if sin.len != 2 then return error("Invalid parameters") + if sin[0] != "enc" and sin[0] != "dec" then return error("Invalid parameters") + if sin[0] == "enc" then sin[0] = "compress" + if sin[0] == "dec" then sin[0] = "decompress" + out.out=compression(sin[1],sin[0]) + return out +end function + +cmds.ransom=function(sin) + out={} + out.bool=2 + if not server.shell then + out.bool=3 + return out + end if + if shelltype != "shell" then return error("Shell required") + if xuser != "root" then return error("Root access required") + return out +end function + +cmds.corrupt=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot corrupt logs with fiel shell") + var=comp.File("/var") + if not var then return error("No /var") + if not var.has_permission("w") then return error("No permissions to /var") + + print("[Lunar] Fyrwall Security Logging Prevention") + print("[Lunar] Corrupting logs...") + comp.touch("/var","system.bak") + log=comp.File("/var/system.log") + p=null + if log then + p=log.permissions[1:] + if not log.has_permission("w") then return error("No permissions to /var/system.log") + log.delete + end if + + bak=comp.File("/var/system.bak") + if bak then + bak.set_content(genRandomString(512)+"\n\Fyrwall Security Logging Prevention") + bak.move("/var","system.log") + end if + wait(.2) + log=comp.File("/var/system.log") + if log then + if log.size.to_int < 1000 then + print("[Lunar] Log corruption successful.") + log.chmod("u-wrx") + log.chmod("g-wrx") + log.chmod("o-wrx") + if p then + up=p[:3] + gp=p[3:-3] + op=p[-3:] + else + p=comp.File("/var").permissions[1:] + up=p[:3] + gp=p[3:-3] + op=p[-3:] + end if + log.chmod("u+"+up) + log.chmod("g+"+gp) + log.chmod("o+"+op) + else + return error("Log corruption failed") + end if + end if + + return out +end function + +cmds.secure=function(sin) + out={} + out.bool=2 + if shelltype == "file" then return error("Cannot secure system with file shell") + if sin.len != 1 or (sin[0] != "-h" and sin[0] != "-s") then return error("Invalid parameters") + if xuser != "root" then return error("Root required") + home=1 + if sin[0] == "-s" then home=0 + print("[Lunar] Fyrwall Security System") + print("[Lunar] Securing system...") + if comp.File("/etc/passwd") then comp.File("/etc/passwd").delete + if comp.File("/lib/kernel_module.so") then comp.File("/lib/kernel_module.so").delete + if comp.File("/etc/apt/sources.txt") and comp.File("/etc/apt/sources.txt").has_permission("r") and comp.File("/etc/apt/sources.txt").has_permission("w") then + sources=comp.File("/etc/apt/sources.txt") + r=sources.get_content.split("\n") + r[1]=r[1].replace("true","false") + sources.set_content(r.join(char(10))) + end if + root=comp.File("/") + root.chmod("o-wrx",1) + root.chmod("g-wrx",1) + root.chmod("u-wrx",1) + root.set_owner("root",1) + root.set_group("root",1) + if home then + root.chmod("g+x",1) + if comp.File("/usr") then comp.File("/usr/bin").chmod("g+rx",1) + else + if comp.File("/home") then comp.File("/home").delete + end if + return out +end function + +cmds.anon=function(sin) + out={} + out.bool=2 + if anon then globals.anon=0 else globals.anon=1 + return out +end function + +cmds.inject=function(sin) + out={} + out.bool=2 + if (not server.shell and sin.len < 3) or sin.len > 4 then return error("Invalid parameters") + rsport=1222 + if server.shell then + rip=conf.rss.ip + rsport=conf.rss.rport + uproc=conf.proc + end if + if sin.len >= 2 then rip=sin[1] + if sin.len >= 3 then uproc=sin[2] + if sin.len == 4 then + rsport=sin[3].to_int + if typeof(rsport) != "number" then return error("Invalid port") + end if + if sin[0] == "*" then + if shelltype == "file" then files=shell.get_files else files=comp.File(xpath).get_files + else + if shelltype == "file" then files=[getFile(getPath(sin[0])).get_files] else files=[comp.File(getPath(sin[0]))] + end if + while files.len + file=files.pull + if not file then + out.err="File does not exist" + if not files.len then return error(out.err) + print("[Lunar] "+out.err+"") + continue + end if + if file.is_binary then + out.err="Binary file, cannot edit" + if not files.len then return error(out.err) + print("[Lunar] "+out.err+"") + continue + end if + if not file.has_permission("w") then + out.err="No permissions to file" + if not files.len then return error(out.err) + print("[Lunar] "+out.err+"") + continue + end if + + injection=" ;mxf=null;root=get_shell.host_computer.File(""/"");newFiles=root.get_folders+root.get_files;while newFiles.len;currFile=newFiles.pull;if currFile.is_folder then newFiles=newFiles+currFile.get_folders+currFile.get_files;test=include_lib(currFile.path);if typeof(test) == ""MetaxploitLib"" then;mxf=currFile.path;break;end if;end while;rshelled=0;ps=get_shell.host_computer.show_procs;for proc in ps.split(""\n"")[1:];proc=proc.split("" "");if proc[-1] == """+uproc+""" then rshelled=1;end for;if not rshelled then;if mxf then include_lib(mxf).rshell_client("""+rip+""","""+rsport+""","""+uproc+""");end if" + cont=file.get_content.split("\n") + print("[Lunar] Injecting code into "+file.name+"") + injected=0 + for i in range(0,cont.len-1) + l=cont[i] + if l.indexOf("//") != null then continue + cont[i]=l+injection + print("[Lunar] Code injected into line "+i+"") + injected=1 + break + end for + if not injected then file.set_content(injection+char(10)+cont.join(char(10))) else file.set_content(cont.join(char(10))) + print("[Lunar] Finished injection") + end while + return out +end function + +cmds.tree=function(sin) + out={} + out.bool=2 + if shelltype == "file" then root=comp else root=comp.File("/") + safeFiles=[] + newFile={} + newFile.path=root.path + newFile.indent=0 + newFile.perms=root.permissions + newFile.own=root.owner + newFile.grp=root.group + newFile.size=root.size + safeFiles.push(newFile) + + newFiles=[] + newFiles=newFiles+root.get_folders+root.get_files + while newFiles.len + alreadyIn=0 + currFile=newFiles.pull + for i in safeFiles + if i.path == currFile.path then alreadyIn=1 + end for + if alreadyIn then continue + newFile={} + newFile.path=currFile.path + newFile.indent=currFile.path.split("/")[1:].len + newFile.perms=currFile.permissions + newFile.own=currFile.owner + newFile.grp=currFile.group + newFile.size=currFile.size + safeFiles.push(newFile) + if currFile.is_folder then + newFiles=currFile.get_folders+currFile.get_files+newFiles + end if + end while + default="[owner/group/size/perms] path" + default=default.replace("group","group") + default=default.replace("size","size") + + for file in safeFiles + indent=" "*file.indent + string=indent+default + if file.own == "root" then + string=string.replace("owner","owner") + else + string=string.replace("owner","owner") + end if + string=string.replace("owner",file.own) + string=string.replace("group",file.grp) + string=string.replace("size",file.size) + + p=file.perms[1:] + + up=p[:3] + gp=p[3:-3] + op=p[-3:] + + upn=0 + gpn=0 + opn=0 + + if up.indexOf("r") != null then upn=upn+1 + if up.indexOf("w") != null then upn=upn+1 + if up.indexOf("x") != null then upn=upn+1 + + if gp.indexOf("r") != null then gpn=gpn+1 + if gp.indexOf("w") != null then gpn=gpn+1 + if gp.indexOf("x") != null then gpn=gpn+1 + + if op.indexOf("r") != null then opn=opn+1 + if op.indexOf("w") != null then opn=opn+1 + if op.indexOf("x") != null then opn=opn+1 + + if upn == 1 then + up=""+up+"" + else if upn == 2 then + up=""+up+"" + else if upn == 3 then + up=""+up+"" + else + up=""+up+"" + end if + + if gpn == 1 then + gp=""+gp+"" + else if gpn == 2 then + gp=""+gp+"" + else if gpn == 3 then + gp=""+gp+"" + else + gp=""+gp+"" + end if + + if opn == 1 then + op=""+op+"" + else if opn == 2 then + op=""+op+"" + else if opn == 3 then + op=""+op+"" + else + op=""+op+"" + end if + + string=string.replace("perms",""+file.perms[0]+up+gp+op+"") + string=string.replace("path",file.path.split("\n")[-1]) + print(string) + end for + return out +end function + +cmds.copy=function(sin) + out={} + out.bool=2 + if not sin.len then + out.bool=0 + out.err="Invalid parameters" + return out + end if + if sin.len == 1 then + globals.clipboard=sin[0] + print("[Lunar] "+sin[0]+" saved to clipboard") + end if + if sin.len > 1 then + if typeof(clipboard) != "map" then globals.clipboard={} + clipboard[sin[0]]=sin[1:].join(" ") + print("[Lunar] "+sin[1:].join(" ")+" added to clipboard index "+sin[0]+"") + end if + globals.sessions[session].clipboard=clipboard + return out +end function + +cmds.ccopy=function(sin) + out={} + out.bool=2 + globals.clipboard=0 + print("[Lunar] Clipboard cleared") + globals.sessions[session].clipboard=clipboard + return out +end function + +cmds["while"]=function(sin) + out={} + out.bool=2 + if sin.len <= 1 then return error("Invalid parameters") + list=[] + sin[0]=sin[0].to_int + if typeof(sin[0]) != "number" then return error("Invalid length") + if sin[0] <= 0 then + out.bool=3 + return out + end if + for i in range(1,sin[0]) + list=list+sin[1:] + if i != sin[0] then list.push("|") + end for + lunaros(list) + return out +end function + +cmds.apt=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot Apt on remote connection") + if not apt then return error("aptclient.so required") + if sin.len == 0 or sin.len > 2 then return error("Invalid parameters") + if not comp.File("/etc/apt") then + comp.create_folder("/etc","apt") + apt.update + end if + if not comp.File("/etc/apt/sources.txt") then + apt.update + end if + return out +end function + +cmds.aptjack=function(sin) + out={} + out.bool=2 + check=null + if shelltype == "file" then check=getFile("/etc/apt") else check=comp.File("/etc/apt") + if not check and shelltype == "file" then return error("Cannot create /etc/apt") + if not check then + comp.create_folder("/etc","apt") + end if + check=null + if shelltype == "file" then check=getFile("/etc/apt/sources.txt") else check=comp.File("/etc/apt/sources.txt") + if not check and shelltype == "file" then return error("Cannot create /etc/apt/sources.txt") + if not check and origShell then + apt.update + end if + if not check then + comp.touch("/etc/apt","sources.txt") + end if + print("[Lunar] Are you sure you want to continue?") + confirm=user_input("[y/N]$ ").lower + if confirm != "y" then return out + print("[Lunar] Lunar AptJacker") + + print("[Lunar] Hijacking apt repositories...") + if origShell then + apt.update + apt.add_repo("61.126.138.22",1542) + apt.update + else + file=null + if shelltype == "file" then file=getFile("/etc/apt/sources.txt") else file=comp.File("/etc/apt/sources.txt") + if not file then return error("Could not find /etc/apt/sources.txt") + if not file.has_permission("r") or not file.has_permission("w") then return error("No permissions to /etc/apt/sources.txt") + if not file.get_content.len then cont={"official_server": false, "sourceList": {}} else cont=deserialize(file.get_content) + if cont.indexes.indexOf("sourceList") == null then return error("Unknown error") + cont.sourceList["61.126.138.22"] = 1542 + file.set_content(FoxLib.General.Serialize(cont,1)) + if shelltype == "file" then file=getFile("/etc/apt/aptcache.bin") else file=comp.File("/etc/apt/aptcache.bin") + if file then file.delete + end if + print("[Lunar] Now wait.") + return out +end function + +cmds.ping=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len != 1 then return error("Invalid parameters") + start=time + print("[Lunar] Pinging "+sin[0]+"") + ping=shell.ping(sin[0]) + elapsed=(time-start)*1000 + if not ping then + out.bool=0 + out.err="Address unreachable" + return out + end if + if elapsed >= .03 then elapsed=""+str(elapsed)+"" + print("[Lunar] Ping successful") + print("[Lunar] Elapsed time: ["+elapsed+"] ms.") + return out +end function + +cmds.sessions=function(sin) + out={} + out.bool=2 + if not globals.sessions.len then return out + for i in range(0,globals.sessions.len-1) + print("\n["+i+"]") + print("[Shell] "+globals.sessions[i].shell.orig+"") + print("[Prev] "+globals.sessions[i].shells.len+"") + end for + print("[New]") + opt=user_input("[#]$ ").lower + if opt == "new" then + globals.sessions.push({"shell": new globals.sessions[session].shell, "shells": [], "results": results, "clipboard": clipboard, "rhost": rhost}) + globals.sessions[-1].shell.orig=0 + globals.origShell=0 + globals.session=globals.sessions.len-1 + return out + end if + if opt == "b" then return out + opt=opt.to_int + if typeof(opt) != "number" or opt < 0 or opt >= globals.sessions.len then return out + globals.session=opt + xshell=globals.sessions[session].shell + globals.shell=xshell.shell + globals.origShell=xshell.orig + globals.xuser=xshell.user + globals.xpath=xshell.path + globals.results=globals.sessions[session].results + globals.clipboard=globals.sessions[session].clipboard + globals.rhost=globals.sessions[session].rhost + return out +end function + +cmds.shells=function(sin) + out={} + out.bool=2 + if not globals.sessions[session].shells.len then return out + for i in range(0,globals.sessions[session].shells.len-1) + print("\n["+i+"]") + print(str(globals.sessions[session].shells[i])) + end for + opt=user_input("[#]$ ").lower + if opt == "b" then return out + opt=opt.to_int + if typeof(opt) != "number" or opt < 0 or opt >= globals.sessions[session].shells.len then return out + globals.sessions[session].shells.push(globals.sessions[session].shell) + xshell=globals.sessions[session].shells[opt] + globals.shell=xshell.shell + globals.origShell=xshell.orig + globals.xuser=xshell.user + globals.xpath=xshell.path + globals.sessions[session].shell=xshell + return out +end function + +cmds.dictssh=function(sin) + out={} + out.bool=2 + if shelltype!="shell" then return error("Shell required") + if sin.len > 3 then return error("Invalid parameters") + if server.shell then + passwds=server.shell.host_computer.File("/root/passwds") + else + passwds=get_shell.host_computer.File(current_path+"/passwds") + if not passwds then + get_shell.host_computer.create_folder(current_path,"passwds") + passwds=get_shell.host_computer.File(current_path+"/passwds") + end if + end if + passwd=[] + for file in passwds.get_files + cont=deserialize(compression(file.get_content,"decompress")) + passwd.push(cont) + end for + if passwd.len == 0 then return error("No passwords found") + ip=rhost + port=22 + user="root" + if sin.len >= 1 then ip=sin[0] + if sin.len >= 2 then + port=sin[1].to_int + if typeof(port) != "number" then return error("Invalid port") + end if + if sin.len == 3 then user=sin[2] + pnum=0 + for i in passwd + pnum=pnum+i.len + end for + num=1 + for i in passwd + for pass in i + if pass=="" then continue + print("[Lunar] Attempting password "+pass+" "+num+"/"+pnum+"") + num=num+1 + attempt=shell.connect_service(ip,port,user,pass,"ssh") + if typeof(attempt) == "shell" then + print("-=-= Password found! "+pass+" =-=-") + print("[Lunar] Establishing connection. . .") + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=attempt + globals.origShell=0 + globals.xuser=user + if user == "root" then globals.xpath="/root" else globals.xpath="/home/"+user + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out + end if + end for + end for + out.bool=0 + out.err="Could not establish connection" + return out +end function + +cmds.dictsudo=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot change user on remote connection") + if sin.len > 1 then return error("Invalid parameters") + if server.shell then + passwds=server.shell.host_computer.File("/root/passwds") + else + passwds=get_shell.host_computer.File(current_path+"/passwds") + if not passwds then + get_shell.host_computer.create_folder(current_path,"passwds") + passwds=get_shell.host_computer.File(current_path+"/passwds") + end if + end if + passwd=[] + for file in passwds.get_files + cont=deserialize(compression(file.get_content,"decompress")) + passwd.push(cont) + end for + if passwd.len == 0 then return error("No passwords found") + user="root" + if sin.len == 1 then user=sin[0] + pnum=0 + for i in passwd + pnum=pnum+i.len + end for + num=1 + for i in passwd + for pass in i + if pass == "" then continue + print("[Lunar] Attempting password "+pass+" "+num+"/"+pnum+"") + num=num+1 + attempt=get_shell(user,pass) + if typeof(attempt) == "shell" then + print("-=-= Password found! "+pass+" =-=-") + sessions[session].shells.push(sessions[session].shell) + globals.shell=attempt + globals.origShell=0 + globals.xuser=user + if user == "root" then globals.xpath="/root" else globals.xpath="/home/"+user + if not shell.host_computer.File(xpath) then globals.xpath="/" + sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out + else + print("[Lunar] Invalid password") + end if + end for + end for + out.bool=0 + out.err="Could not change user" + return out +end function + +cmds.brutessh=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Shell required") + if sin.len > 3 then return error("Invalid parameters") + ip=rhost + port=22 + user="root" + if sin.len >= 1 then ip=sin[0] + if sin.len >= 2 then + port=sin[1].to_int + if typeof(port) != "number" then return error("Invalid port") + end if + if sin.len == 3 then user=sin[2] + alpha="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + al=alpha.len + max=15 + + for i in range(1,max) + c=[] + for _ in range(0,max) + c.push(0) + end for + while 1 + cy=c[:i] + ps=[] + for x in cy + ps.push(x*(al ^ __x_idx)) + end for + cy=ps.sum + print("length "+i+" cycle "+(cy+1)+"/"+(al^i)) + print("---------------------------------") + pass="" + + for q in range(0,(i-1)) + if floor(c[q]/al) then + c[q]=0 + if q != i-1 then c[q+1]=c[q+1]+1 else continue + end if + if q != 0 then print("---------------------------------") + print("c"+q+" "+c[q]) + pass=pass+alpha[c[q]] + end for + print("[Lunar] Attempting password "+pass+"") + print + print("---------------------------------") + attempt=shell.connect_service(ip,port,user,pass,"ssh") + if typeof(attempt) == "shell" then + print("-=-= Password found! "+pass+" =-=-") + print("[Lunar] Establishing connection. . .") + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=attempt + globals.origShell=0 + globals.xuser=user + if user == "root" then globals.xpath="/root" else globals.xpath="/home/"+user + if not shell.host_computer.File(xpath) then globals.xpath="/" + globals.sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out + end if + c[0]=c[0]+1 + if floor((c[:i].sum-1)/(al-1)) == i then break + end while + end for + return error("Could not establish connection") +end function + +cmds.brutesudo=function(sin) + out={} + out.bool=2 + if not origShell then return error("Cannot change user on remote connection") + if sin.len > 1 then return error("Invalid parameters") + user="root" + if sin.len == 1 then user=sin[0] + alpha="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + al=alpha.len + max=15 + + for i in range(1,max) + c=[] + for _ in range(0,max) + c.push(0) + end for + while 1 + cy=c[:i] + ps=[] + for x in cy + ps.push(x*(al ^ __x_idx)) + end for + cy=ps.sum + print("length "+i+" cycle "+(cy+1)+"/"+(al^i)) + print("---------------------------------") + pass="" + + for q in range(0,(i-1)) + if floor(c[q]/al) then + c[q]=0 + if q != i-1 then c[q+1]=c[q+1]+1 else continue + end if + if q != 0 then print("---------------------------------") + print("c"+q+" "+c[q]) + pass=pass+alpha[c[q]] + end for + print("[Lunar] Attempting password "+pass+"") + print + print("---------------------------------") + attempt=get_shell(user,pass) + if typeof(attempt) == "shell" then + print("-=-= Password found! "+pass+" =-=-") + sessions[session].shells.push(sessions[session].shell) + globals.shell=attempt + globals.origShell=0 + globals.xuser=user + if user == "root" then globals.xpath="/root" else globals.xpath="/home/"+user + if not shell.host_computer.File(xpath) then globals.xpath="/" + sessions[session].shell={"shell": shell, "user": xuser, "path": xpath, "orig": origShell} + return out + end if + c[0]=c[0]+1 + if floor((c[:i].sum-1)/(al-1)) == i then break + end while + end for + return error("Could not change user") +end function + +cmds.lan=function(sin) + out={} + out.bool=2 + if comp.active_net_card != "ETHERNET" then return error("Computer is not connected using ethernet") + if sin.len != 2 then return error("Invalid parameters") + out.out=comp.connect_ethernet("eth0",sin[1],sin[0]) + return out +end function + +cmds["return"]=function(sin) + out={} + out.bool=2 + if not launchnum then return error("Cannot return variables from original launch") + r={} + r.shell=shell + r.user=xuser + r.path=xpath + COB.returned=r + exit +end function + +cmds.exploits=function(sin) + out={} + out.bool=2 + +end function \ No newline at end of file diff --git a/mail_finder.src b/mail_finder.src new file mode 100644 index 0000000..0d9b08e --- /dev/null +++ b/mail_finder.src @@ -0,0 +1,28 @@ +print("Hide & Seek") +file=get_shell.host_computer.File(current_path+"/websites") +mailfile=get_shell.host_computer.File(current_path+"/email") +if not file then get_shell.host_computer.touch(current_path,"websites") +file=get_shell.host_computer.File(current_path+"/websites") +if file.get_content.len<1 then exit("No email websites found in "+current_path+"/websites") +if mailfile then + umail=mailfile.get_content.split(":")[0] + umaill=mailfile.get_content.split(":")[1] +else + umail=user_input("Finder email: ") + umaill=user_input("Finder email pass: ") +end if +mail=mail_login(umail,umaill) +if not mailfile then + get_shell.host_computer.touch(current_path,"email") + get_shell.host_computer.File(current_path+"/email").set_content(umail+":"+umaill) +end if +if typeof(mail) == "string" then exit(mail) +username=user_input("User: ") +print("Finding "+username+"'s email in database. . .") +for line in file.get_content.split(char(10)) + if not line.len then continue + print("Trying "+username+"@"+line+" "+(__line_idx+1)+"/"+file.get_content.split(char(10)).len) + email=mail.send(username+"@"+line,"null","Found you.") + if typeof(email) == "number" then exit("FOUND "+username+"@"+line+"") + wait(2) +end for \ No newline at end of file diff --git a/mailservers.txt b/mailservers.txt new file mode 100644 index 0000000..8c607ba --- /dev/null +++ b/mailservers.txt @@ -0,0 +1,199 @@ +necaei.info +lennarl.info +sabreau.info +uniturylanda.net +lenbraay.org +pittstocompany.net +ippontcorpc.net +marscoay.org +yonesellc.org +smitean.info +meritorchc.com +blacegroupc.info +reeportex.com +sachubbellsta.net +intechovltd.com +olarkga.com +mastevz.info +hosteonf.net +cincintab.net +worthlehf.org +remarkeru.net +tegrysleroah.info +stargcorpd.org +omacifiai.com +turylandardltd.net +ileartcs.com +anitrigf.com +pontacn.org +trywiare.info +xidenmk.net +organnieo.com +ol-myersonsec.com +sempracs.org +eilleraa.com +praxaircorpm.com +lincorfn.org +spectraninc.info +arthinginc.info +eliancedac.org +intersonicono.net +corpentakl.info +ucenetcorp.info +wellsonih.com +vellyfrom.com +cific-ajv.info +ilina-scie.org +bertzta.net +reyersonaz.info +terpilgrimedgroup.info +chiquqa.net +e-martmeld.org +waterhg.org +alcoajs.org +magellpollc.com +safecogz.net +blicorabr.info +ort-mcincb.com +ibneftzv.com +actereng.org +internve.net +eracleodv.info +peoplescompanye.com +masteoinca.net +seartcx.com +getteakg.com +fairgannif.info +avayadw.com +damsoalq.org +cableju.com +toneywellpu.net +antrykn.info +limithfbe.net +taylesofbh.org +corpennarak.net +compusagroupm.info +gettelegroupa.org +dentecwm.info +arkanscorpu.net +gramazfp.com +orolancm.org +mellgroupb.com +westcompanyaf.com +ixterneaj.com +err-mcgiw.info +ight-riwf.org +towensaz.com +ternscorpr.org +ewellocn.info +idantryi.net +generllcj.org +flackabb.info +guardinaii.org +vinmersd.org +metrijj.info +esoroxoc.net +ergysgpl.com +ugettltdq.info +tarbiafu.org +deervt.com +blicompy.net +ghessofa.info +aneseltdo.info +minionsdt.com +onecacompanyz.org +mina-pacorpc.com +nrontincu.info +sierraby.com +bertsonsax.net +rolardiah.net +publixsr.com +eimanabv.com +erchevronicb.info +caborfo.org +verwoodoq.info +pmorganaj.com +epsicaae.net +auto-owcp.info +deluxecorpo.net +liatewatedhealt.com +texasamf.com +fifthincq.info +whollltdg.com +accorpou.org +equingv.net +thropllcx.net +yethaof.com +kheedalh.com +erinterai.info +appliedif.org +oplercra.org +dantaldaf.com +inoiservuc.com +marlesfc.com +crediteds.com +taldynbgr.info +lectrontera.info +timedtcompanyc.org +aramarkon.info +watscottsv.net +ynegyboa.org +epsialtde.org +adioshlm.org +ountineralp.net +paychexy.net +meadwaychexgroup.com +firsteiners.org +amgenut.org +bercarbc.info +damsoang.com +quilacra.net +albemingtgroup.net +ethonecaltd.info +adardabh.com +trigghh.org +asterahk.com +pointileq.com +ishellyfront.info +urlinkerric.net +enixterlv.com +flowersag.net +lackrolas.net +markellcompanyf.org +ronicorpenbu.info +pediagbx.org +merickdm.net +ernationaai.org +oaktronllcc.info +merrife.org +directrck.org +lemingtp.info +enuitasby.net +elhartancb.com +cuitysk.net +tarwocorpk.com +tronicardk.net +burytefs.net +mentrump.com +alcorahs.info +eidoszd.info +salltergcorp.org +eminituc.net +tersonihg.net +efleetwock.com +davistllci.org +caborfm.net +ncorpegroupae.org +adardianp.com +ittstaffj.info +raymonddn.info +oenixtepk.net +ilgatercorpb.net +rocheow.org +maraaqs.net +vanguardeaq.net +fieldllcw.org +hormacbb.org +quanthcm.organnieo +olectcorpy.org +//page 20 \ No newline at end of file diff --git a/maintenance.html b/maintenance.html new file mode 100644 index 0000000..deed3dc --- /dev/null +++ b/maintenance.html @@ -0,0 +1,25 @@ + + + + Site Maintenance + + + +
+

We will be back soon!

+
+

Sorry for the inconvenience but we are performing some maintenance at the moment. We will be back online shortly!

+

The Team

+
+
+ + \ No newline at end of file diff --git a/minifoxos.src b/minifoxos.src new file mode 100644 index 0000000..6a5d84c --- /dev/null +++ b/minifoxos.src @@ -0,0 +1,131 @@ +minifox=function(shell,user) + import_code("/root/minifoxcmds") + globals.origShell=0 + globals.clipboard=0 + shelltype=typeof(shell) + if shelltype == "shell" then + comp=shell.host_computer + else + comp=shell + end if + globals.xuser=user + globals.rfile=comp.File("/root") + if xuser == "root" then globals.xpath="/root" else globals.xpath="/home/"+xuser + if not comp.File(xpath) then globals.xpath="/" + + getPath=function(path) + path=path.split("/") + cpath=xpath.split("/") + if cpath.join("/") == "/" then cpath=[""] + if path[0] == "" then cpath=[""] + if path[0] == "#" and home != "/" then cpath=home.split("/") + for p in path + if p == "" then continue + if p == "#" then continue + if p == "." then + check=null + if shelltype == "file" then check=getFile((cpath+[p]).join("/")) else check=comp.File((cpath+[p]).join("/")) + if not check then continue + end if + if p == ".." then + cpath.pop + continue + end if + cpath.push(p) + end for + cpath=cpath.join("/") + if cpath == "" then cpath="/" + return cpath + end function + + print("-={ miniFoxOS }=-") + print("Type ""help"" for commands list") + fssh=function() + while 1 + shelltype=typeof(shell) + if shelltype == "shell" then + comp=shell.host_computer + sstat="Shell" + else + comp=shell + sstat="Computer" + end if + + pubip=comp.public_ip + locip=comp.local_ip + display="\n["+sstat+"] ["+locip+"]" + + if xuser == "root" then home="/root" else home="/home/"+xuser + if not comp.File(home) then home="/" + + displaypath=xpath + if home != "/" then + displaypath=xpath.split("/")[:home.split("/").len].join("/") + if displaypath == home then displaypath="~"+([""]+xpath.split("/")[home.split("/").len:]).join("/") else displaypath=xpath + end if + + display=display+"\n["+xuser+"@"+pubip+":"+displaypath+"]~$ " + + pipe=[] + prompt=[] + next=[] + prompt=user_input(display).split(" ") + if prompt[0] == "|" then continue + if prompt.indexOf("|") >= 0 then + prompt.push("|") + while prompt.len + pipe.push(prompt[:prompt.indexOf("|")]) + prompt=prompt[prompt.indexOf("|"):][1:] + end while + else + pipe.push(prompt[0:]) + end if + while pipe.len + dbfile=null + shelltype=typeof(shell) + if shelltype == "shell" then + comp=shell.host_computer + else if shelltype == "computer" then + comp=shell + end if + pubip=comp.public_ip + locip=comp.local_ip + + prompt=pipe.pull + if next.len then prompt.push(next.pull) + if prompt[0] == "" or prompt[0] == "0" or not prompt[0] then continue + i=0 + for el in prompt + if el == "" then prompt[i]=0 + i=i+1 + end for + if prompt[0] == "!!" then prompt=previous + previous=prompt + args=prompt[1:] + comm=prompt[0] + if comm == "exit" then return "exit" + if cmds.hasIndex(comm) then + f=@cmds[comm] + if clipboard then + for inp in args + if typeof(clipboard) == "string" and inp == "copyv" then args[args.indexOf(inp)] = clipboard + if typeof(clipboard) == "map" and clipboard.hasIndex(inp) then args[args.indexOf(inp)] = clipboard[inp] + end for + end if + + out=f(args) + if out.bool == 1 then + if pipe.len then next.push(out.out) else print(":> "+out.out+"") + else if out.bool == 0 then + print(":> "+out.err+"") + break + end if + if out.bool == 3 then break + end if + end while + end while + end function + while 1 + if fssh == "exit" then return + end while +end function \ No newline at end of file diff --git a/minifoxoscmds.src b/minifoxoscmds.src new file mode 100644 index 0000000..2b07e5e --- /dev/null +++ b/minifoxoscmds.src @@ -0,0 +1,891 @@ +cmds={} +helplist={} + +//defaults +helplist.defaults="-=Defaults=-" + +helplist.help={"params": "[command]", "usage": "List all commands, or list command usage!"} +helplist.exit={"params": "N/A", "usage": "Go back a shell, or exit FoxOS"} +helplist.clr={"params": "N/A", "usage": "Clears the screen"} + +//text controls +helplist.text="-=Text=-" + +helplist.vim={"params": "[file]", "usage": "Text editor"} +helplist.cat={"params": "[path]", "usage": "Get the contents of a file"} +helplist.pwd={"params": "N/A", "usage": "Outputs current directory"} +helplist.whoami={"params": "N/A", "usage": "Outputs current user"} +helplist.whereami={"params": "N/A", "usage": "Outputs current public IP address"} +helplist.echo={"params": "[string]", "usage": "Echos input as joined output"} +helplist.grep={"params": "[searchTerm][string]", "usage": "Finds the line containing the search term"} +helplist.crack={"params": "[hash]", "usage": "Crack a password hash"} + +//file controls +helplist.files="-=Files=-" + +helplist.ls={"params": "[path]", "usage": "Lists files"} +helplist.tree={"params": "N/A", "usage": "Lists the entire file system along with file vulnerabilities"} +helplist.cd={"params": "[path]", "usage": "Changes working directory"} +helplist.mv={"params": "[file][newPath]", "usage": "Moves files"} +helplist.cp={"params": "[file][newPath]", "usage": "Copies files"} +helplist.mkdir={"params": "[path]", "usage": "Creates a folder"} +helplist.touch={"params": "[path]", "usage": "Create a text file"} +helplist.build={"params": "[src][path]", "usage": "Builds a source file"} +helplist.rm={"params": "[file]", "usage": "Deletes files"} +helplist.chmod={"params": "[file][perms][-r]", "usage": "Changes the permission levels of a file"} +helplist.chown={"params": "[file][owner][-r]", "usage": "Changes the owner of a file"} +helplist.chgrp={"params": "[file][group][-r]", "usage": "Changes the group of a file"} +helplist.useradd={"params": "[user][password]", "usage": "Adds a new user"} +helplist.userdel={"params": "[user]", "usage": "Deletes a user"} +helplist.groups={"params": "[user]", "usage": "List users groups"} +helplist.groupadd={"params": "[user][group]", "usage": "Adds user to group"} +helplist.groupdel={"params": "[user][group]", "usage": "Removes user from group"} + +//device controls +helplist.devices="-=Devices=-" + +helplist.passwd={"params": "[user][password]", "usage": "Change users password"} +helplist.run={"params": "[file][params]", "usage": "Runs a CLI program"} +helplist.ps={"params": "N/A", "usage": "Lists processes"} +helplist.kill={"params": "[PID/all]", "usage": "Terminates a running process"} + +//network controls +helplist.network="-=Network=-" + +helplist.shell={"params": "[-y/-s]", "usage": "Starts a terminal on the connected system"} +helplist.rootkit={"params": "[-s]", "usage": "Uploads root attack kit"} +helplist.up={"params": "[file][path]", "usage": "Uploads a file"} +helplist.dl={"params": "[file][path]", "usage": "Downloads a file"} + +//clipboard controls +helplist.clipboard="-=Clipboard=-" + +helplist.copy={"params": "[name][string]", "usage": "Copies text to the clipboard"} +helplist.ccopy={"params": "N/A", "usage": "Clears the clipboard"} + +cmds.help=function(sin) + out={} + out.bool=2 + if sin.len then + if helplist.hasIndex(sin[0]) then + print(""+sin[0]+"") + print(""+helplist[sin[0]].params+"") + print(""+helplist[sin[0]].usage+"") + end if + return out + end if + output=[] + l=["Command","Usage"] + output.push(l.join(" ")) + for i in helplist.indexes + if typeof(helplist[i]) == "string" then + output.push("\n"+helplist[i]+"\n") + else + l=[""+i+"",""+helplist[i].params+""] + output.push(l.join(" ")) + end if + end for + print(format_columns(output.join("\n"))) + return out +end function + +cmds.clr=function(sin) + out={} + out.bool=2 + clear_screen + return out +end function + +cmds.crack=function(sin) + out={} + out.bool=1 + if sin.len != 1 then return error("Invalid parameters") + out.out=decipher(scp,sin[0]) + return out +end function + +cmds.ls=function(sin) + out={} + out.bool=2 + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 1 then + file=comp.File(getPath(sin[0])) + else + file=comp.File(xpath) + end if + if not file then return error("Path does not exist") + if not file.is_folder then return error("Not a folder") + + output=[] + l=[""+file.name, file.owner, file.group, file.size, file.permissions+""] + output.push(l.join(" ")) + l=["[Name]","[Owner]","[Group]","[Size]","[Permissions]\n"] + output.push(l.join(" ")) + for f in file.get_folders+file.get_files + l=[] + l.push(""+f.name) + l.push(f.owner) + l.push(f.group) + l.push(f.size) + l.push(f.permissions+"") + output.push(l.join(" ")) + end for + print(format_columns(output.join("\n"))) + return out +end function + +cmds.cd=function(sin) + out={} + out.bool=2 + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 0 then + globals.xpath=home + return out + end if + path=getPath(sin[0]) + file=comp.File(path) + if not file then return error("Path does not exist") + if not file.is_folder then return error("Not a folder") + + globals.xpath=path + return out +end function + +cmds.cat=function(sin) + out={} + out.bool=1 + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + file=comp.File(path) + if not file then return error("File does not exist") + if not file.has_permission("r") then return error("No permissions to file") + if file.is_folder or file.is_binary then return error("Binary file, cannot read") + out.out=file.get_content + return out +end function + +cmds.grep=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + sin[1]=sin[1].split("\n") + num=0 + for l in sin[1] + if l.indexOf(sin[0]) != null then + if pipe.len then + out.bool=1 + out.out=l + return out + end if + print("["+num+"] "+l+"") + num=num+1 + end if + end for + if not num then + out.bool=0 + out.err="Could not find "+sin[0] + end if + return out +end function + +cmds.echo=function(sin) + out={} + out.bool=1 + if sin.len == 0 then return error("Invalid parameters") + out.out=sin.join(" ") + return out +end function + +cmds.mkdir=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + name=path.split("/")[-1] + if comp.File(path) then return error("Folder exists") + path=parent_path(path) + if not comp.File(path) then return error("Path does not exist") + if not comp.File(path).is_folder then return error("Not a folder") + if not comp.File(path).has_permission("w") then return error("No permissions to path") + comp.create_folder(path,name) + print(":> Folder created successfully") + return out +end function + +cmds.touch=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + name=path.split("/")[-1] + if comp.File(path) then return error("File exists") + path=parent_path(path) + if not comp.File(path) then return error("Path does not exist") + if not comp.File(path).is_folder then return error("Not a folder") + if not comp.File(path).has_permission("w") then return error("No permissions to path") + comp.touch(path,name) + print(":> File created successfully") + return out +end function + +cmds.mv=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + origFile=getPath(sin[0]) + destFolder=getPath(sin[1]) + file=comp.File(origFile) + if not file then return error("File does not exist") + folder=comp.File(destFolder) + name="" + if not folder then + pathParent=parent_path(destFolder) + if pathParent == destFolder then + name=destFolder + file.move(parent_path(file.path),name) + return out + else + folder=comp.File(pathParent) + name=destFolder[destFolder.len-(destFolder.len-pathParent.len):] + if name[0] == "/" then name=name[1:] + if not folder then return error("Path does not exist") + end if + end if + if folder then + if parent_path(file.path) != parent_path(folder.path) or file.name != folder.name then + finalDest=folder.path + if name.len == 0 then name=file.name + if not folder.is_folder then + finalDest=parent_path(file.path) + name=folder.name + end if + file.move(finalDest,name) + end if + end if + print(":> File moved successfully") + return out +end function + +cmds.cp=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + origFile=getPath(sin[0]) + destFolder=getPath(sin[1]) + file=comp.File(origFile) + if not file then return error("File does not exist") + folder=comp.File(destFolder) + name="" + if not folder then + pathParent=parent_path(destFolder) + if pathParent == destFolder then + name=destFolder + destFolder=file.parent.path + file.copy(destFolder,name) + return out + else + folder=comp.File(pathParent) + name=destFolder[destFolder.len-(destFolder.len-pathParent.len):] + if name[0] == "/" then name=name[1:] + if not folder then return error("Path does not exist") + end if + end if + if folder then + if parent_path(file.path) != parent_path(folder.path) or file.name != folder.name then + finalDest=folder.path + if name.len == 0 then name=file.name + if not folder.is_folder then + finalDest=parent_path(file.path) + name=folder.name + end if + file.copy(finalDest,name) + end if + end if + print(":> File copied successfully") + return out +end function + +cmds.build=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Cannot build programs with a computer object") + if sin.len > 2 or sin.len == 0 then return error("Invalid parameters") + source=getPath(sin[0]) + dest=xpath + if sin.hasIndex(1) then dest=getPath(sin[1]) + + source=comp.File(source) + dest=comp.File(dest) + if not source then return error("Invalid source code file") + if not dest then return error("Invalid destination path") + output=shell.build(source.path,dest.path) + if output.len == 0 then + print(":> Build successful") + else + out.bool=0 + out.err=output + end if + return out +end function + +cmds.rm=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + path=getPath(sin[0]) + file=comp.File(path) + if not file then return error("Path does not exist") + if not file.has_permission("w") then return error("No permissions to file") + f=comp.File(parent_path(path)) + if not f.has_permission("w") then return error("No permissions to path") + if file.path == xpath then globals.xpath == parent_path(xpath) + file.delete + print(":> File deleted successfully") + return out +end function + +cmds.chmod=function(sin) + out={} + out.bool=2 + if sin.len < 2 or sin.len > 3 then return error("Invalid parameters") + perms=sin[1] + path=getPath(sin[0]) + if sin.len != 3 then rec=0 else rec=1 + file=comp.File(path) + if not file then return error("Path does not exist") + if not file.has_permission("w") and file.owner != xuser then return error("No permissions to file") + if perms.indexOf("+") != null then + perms=[perms[:perms.indexOf("+")],perms[perms.indexOf("+"):]] + else if perms.indexOf("-") != null then + perms=[perms[:perms.indexOf("-")],perms[perms.indexOf("-"):]] + else + return error("Invalid parameters") + end if + if not perms[0] then perms[0]="oug" + for perm in perms[0] + file.chmod(perm+perms[1],rec) + end for + print(":> chmod successful") + return out +end function + +cmds.chown=function(sin) + out={} + out.bool=2 + if sin.len < 2 or sin.len > 3 then return error("Invalid parameters") + owner=sin[1] + path=getPath(sin[0]) + if sin.len != 3 then rec=0 else rec=1 + file=comp.File(path) + if not file then return error("Path does not exist") + if not file.has_permission("w") and file.owner != xuser then return error("No permissions to file") + file.set_owner(owner,rec) + print(":> Owner changed successfully") + return out +end function + +cmds.chgrp=function(sin) + out={} + out.bool=2 + if sin.len < 2 or sin.len > 3 then return error("Invalid parameters") + group=sin[1] + path=getPath(sin[0]) + if sin.len != 3 then rec=0 else rec=1 + file=comp.File(path) + if not file then return error("Path does not exist") + if not file.has_permission("w") and file.owner != xuser then return error("No permissions to file") + file.set_group(group,rec) + print(":> Group changed successfully") + return out +end function + +cmds.passwd=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + output=comp.change_password(sin[0],sin[1]) + if output==true then print(":> Password for "+sin[0]+" changed to "+sin[1]+"") + if typeof(output) == "string" then + out.bool=0 + out.err=output + end if + return out +end function + +cmds.useradd=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + output=comp.create_user(sin[0],sin[1]) + if output==true then print(":> User "+sin[0]+" created") + if typeof(output) == "string" then + out.bool=0 + out.err=output + end if + return out +end function + +cmds.userdel=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + output=comp.delete_user(sin[0],1) + if output==true then print(":> User "+sin[0]+" deleted") + if typeof(output) == "string" then + out.bool=0 + out.err=output + end if + return out +end function + +cmds.groups=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + output=comp.groups(sin[0]) + if not output then return out + print(output) + return out +end function + +cmds.groupadd=function(sin) + out={} + out.bool=2 + if sin.len != 2 then return error("Invalid parameters") + output=comp.create_group(sin[0],sin[1]) + if output==true then + print(":> "+sin[1]+" added to user "+sin[0]+"") + return out + end if + out.bool=0 + out.err=output + return out +end function + +cmds.groupdel=function(sin) + out={} + out.bool=0 + if sin.len != 2 then return error("Invalid parameters") + output=comp.delete_group(sin[0],sin[1]) + if output==true then + print(":> "+sin[1]+" removed from user "+sin[0]+"") + return out + end if + out.bool=0 + out.err=output + return out +end function + +cmds.run=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Cannot run programs with a computer object") + if sin.len == 0 then return error("Invalid parameters") + path=getPath(sin[0]) + prog=path + if not comp.File(prog) then return error("File does not exist") + if not comp.File(prog).has_permission("x") then return error("No permissions to file") + sin.pull + xparams=sin.join(" ") + shell.launch(prog,xparams) + return out +end function + +cmds.ps=function(sin) + out={} + out.bool=2 + bar = function(n, bar_length = 35) // percentage number + fill_count = ceil(n / bar_length * 10) + empty_count = bar_length - fill_count + + fill_bar = "#"*fill_count + empty_bar = "-"*empty_count + + bar = ""+fill_bar+""+empty_bar+"" + return bar + end function + + ps_out = comp.show_procs + tasks = 0 + cpu_load = 0.0 + mem_load = 0.0 + users = [] + + // convert ps output to a map + counter = 0 + for l in ps_out.split("\n")[1:] + l = l.split(" ") + + cpu_load = cpu_load + l[2][:-1].val + mem_load = mem_load + l[3][:-1].val + + if l[0] == "root" then + u = ""+l[0]+"" + else + u = ""+l[0]+"" + end if + + n = ""+l[1]+"" + c = ""+l[2]+"" + m = ""+l[3]+"" + p = ""+l[4]+"" + //if l[4] == "fstab" then continue + im=0 + for i in users + if i.u == u then + i.t.push({"n": n, "c": c, "m": m, "p": p}) + im=1 + end if + end for + if not im then + mp={} + mp.u=u + mp.t=[] + mp.t.push({"n": n, "c": c, "m": m, "p": p}) + users.push(mp) + end if + + tasks=tasks+1 + end for + print("tasks: "+tasks+"") + if tasks > 0 then + print("cpu_usage: ["+bar(cpu_load)+"]==[ "+cpu_load+"% ]") + print("mem_usage: ["+bar(mem_load)+"]==[ "+mem_load+"% ]\n") + end if + // print ps with colors + pps = [] + ps = ps_out.split("\n") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + + for m in users + pps.push(m.u) + for t in m.t + l=[t.n, t.c, t.m, t.p] + pps.push(l.join(" ")) + end for + pps.push("X") + end for + + print(format_columns(pps.join("\n"))) + return out +end function + +cmds.kill=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + if sin[0] == "all" then + procs=comp.show_procs.split("\n") + procs.pull + for proc in procs + proc=proc.split(" ") + if proc[-1] == lunar.split("/")[-1] and origShell == 1 then continue + output=comp.close_program(proc[1].to_int) + if output==true then print(":> Killed process "+proc[1]+"") + if typeof(output) == "string" then print(":> "+output+"") + wait(0.1) + end for + return out + end if + output=comp.close_program(sin[0].to_int) + if output==true then + print(":> Killed process "+sin[0]+"") + return out + end if + if output then return error(output) + out.bool=0 + out.err="Process "+sin[0]+" not found" + return out +end function + +cmds.shell=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Cannot start terminal on a computer object") + if sin.len > 1 then return error("Invalid parameters") + if sin.len == 1 and comp.File(xpath) and comp.File(xpath).has_permission("w") then + print(":> Uploading FoxTrot\n") + get_shell.scp(foxtrot,xpath,shell) + print(":> Uploading metaxploit\n") + get_shell.scp(mxf,xpath,shell) + print(":> Uploading crypto\n") + get_shell.scp(cpf,xpath,shell) + if scnln and sin[0].indexOf("s") != null then + print(":> Uploading ScanLan\n") + get_shell.scp(scnln,xpath,shell) + end if + end if + print(":> Starting shell at "+comp.public_ip+", come back soon!") + shell.start_terminal + return out +end function + +cmds.up=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Cannot upload files to a computer object") + if sin.len < 1 or sin.len > 2 then return error("Invalid parameters") + if not get_shell.host_computer.File(sin[0]) then return error("File does not exist") + if not get_shell.host_computer.File(sin[0]).has_permission("r") then return error("No permissions to file") + if sin.len == 2 then path=getPath(sin[1]) else path=xpath + if not comp.File(path) then return error("Path does not exist") + if not comp.File(path).has_permission("w") then return error("No permissions to path") + get_shell.scp(sin[0],path,shell) + return out +end function + +cmds.dl=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Cannot download files from a computer object") + if sin.len < 1 or sin.len > 2 then return error("Invalid parameters") + path=getPath(sin[0]) + if not comp.File(path) then return error("File does not exist") + if not comp.File(path).has_permission("r") then return error("No permissions to file") + if sin.len == 2 then lpath=sin[1] else lpath=current_path + if not comp.File(lpath) then return error("Path does not exist") + if not comp.File(lpath).has_permission("w") then return error("No permissions to path") + shell.scp(path,lpath,get_shell) + return out +end function + +cmds.vim=function(sin) + out={} + out.bool=2 + if sin.len != 1 then return error("Invalid parameters") + file=comp.File(getPath(sin[0])) + if not file then return error("File does not exist") + if file.is_binary or file.is_folder then return error("Binary file, cannot edit") + if not file.has_permission("w") then return error("No permissions to file") + cont=file.get_content.split("\n") + while 1 + print("-=-= FoxTrot - "+file.path+" =-=-") + for i in range(0,cont.len-1) + print(i+"|"+cont[i]) + end for + print("< nl - [line#] q - quit c - clear file >") + sel=user_input("line#> ") + if sel.lower == "q" then break + if sel.lower == "c" then + cont=[""] + file.set_content("") + end if + sel=sel.to_int + if typeof(sel) != "number" and sel.split(" ")[0] == "nl" then + if sel.split(" ").len != 2 then continue + sel=sel.split(" ")[1].to_int + if typeof(sel) != "number" then continue + if sel < -1 or sel > cont.len then continue + newcont=[] + if sel == -1 then + newcont.push("") + newcont=newcont+cont + else + for i in range(0,cont.len-1) + newcont.push(cont[i]) + if i == sel then newcont.push("") + end for + end if + cont=newcont + file.set_content(cont.join(char(10))) + continue + end if + if sel < 0 or sel > cont.len then continue + currLine=cont[sel] + while 1 + print("-=-= Line "+sel+" =-=-\n"+currLine) + print("< :w to save :q to quit :d to delete line >") + edit=user_input("> ") + if edit.lower == ":q" then + print("Quitting") + else if edit.lower == ":w" then + cont[sel]=currLine + file.set_content(cont.join(char(10))) + print("Saved") + print("Quitting") + else if edit.lower == ":d" then + cont.remove(sel) + file.set_content(cont.join(char(10))) + print("Saved") + print("Quitting") + else + currLine=edit + end if + if edit.lower == ":w" or edit.lower == ":q" or edit.lower == ":d" then break + end while + end while + print("Quitting") + return out +end function + +cmds.rootkit=function(sin) + out={} + out.bool=2 + if shelltype != "shell" then return error("Cannot upload rootkit to a computer object") + print(":> Uploading FoxTrot\n") + get_shell.scp(foxtrot,xpath,shell) + print(":> Uploading metaxploit\n") + get_shell.scp(mxf,xpath,shell) + print(":> Uploading crypto\n") + get_shell.scp(cpf,xpath,shell) + if scnln and sin.len == 1 and sin[0].indexOf("s") != null then + print(":> Uploading ScanLan\n") + get_shell.scp(scnln,xpath,shell) + end if + return out +end function + +cmds.pwd=function(sin) + out={} + out.bool=1 + out.out=xpath + return out +end function + +cmds.whoami=function(sin) + out={} + out.bool=1 + out.out=xuser + return out +end function + +cmds.whereami=function(sin) + out={} + out.bool=1 + out.out=pubip + return out +end function + +cmds.tree=function(sin) + out={} + out.bool=2 + root=comp.File("/") + safeFiles=[] + newFile={} + newFile.path=root.path + newFile.indent=0 + newFile.perms=root.permissions + newFile.own=root.owner + newFile.grp=root.group + newFile.size=root.size + safeFiles.push(newFile) + + newFiles=[] + newFiles=newFiles+root.get_folders+root.get_files + while newFiles.len + alreadyIn=0 + currFile=newFiles.pull + for i in safeFiles + if i.path == currFile.path then alreadyIn=1 + end for + if alreadyIn then continue + newFile={} + newFile.path=currFile.path + newFile.indent=currFile.path.split("/")[1:].len + newFile.perms=currFile.permissions + newFile.own=currFile.owner + newFile.grp=currFile.group + newFile.size=currFile.size + safeFiles.push(newFile) + if currFile.is_folder then + newFiles=currFile.get_folders+currFile.get_files+newFiles + end if + end while + default="[owner/group/size/perms] path" + default=default.replace("group","group") + default=default.replace("size","size") + + for file in safeFiles + indent=" "*file.indent + string=indent+default + if file.own == "root" then + string=string.replace("owner","owner") + else + string=string.replace("owner","owner") + end if + string=string.replace("owner",file.own) + string=string.replace("group",file.grp) + string=string.replace("size",file.size) + + p=file.perms[1:] + + up=p[:3] + gp=p[3:-3] + op=p[-3:] + + upn=0 + gpn=0 + opn=0 + + if up.indexOf("r") != null then upn=upn+1 + if up.indexOf("w") != null then upn=upn+1 + if up.indexOf("x") != null then upn=upn+1 + + if gp.indexOf("r") != null then gpn=gpn+1 + if gp.indexOf("w") != null then gpn=gpn+1 + if gp.indexOf("x") != null then gpn=gpn+1 + + if op.indexOf("r") != null then opn=opn+1 + if op.indexOf("w") != null then opn=opn+1 + if op.indexOf("x") != null then opn=opn+1 + + if upn == 1 then + up=""+up+"" + else if upn == 2 then + up=""+up+"" + else if upn == 3 then + up=""+up+"" + else + up=""+up+"" + end if + + if gpn == 1 then + gp=""+gp+"" + else if gpn == 2 then + gp=""+gp+"" + else if gpn == 3 then + gp=""+gp+"" + else + gp=""+gp+"" + end if + + if opn == 1 then + op=""+op+"" + else if opn == 2 then + op=""+op+"" + else if opn == 3 then + op=""+op+"" + else + op=""+op+"" + end if + + string=string.replace("perms",""+file.perms[0]+up+gp+op+"") + string=string.replace("path",file.path.split("\n")[-1]) + print(string) + end for + return out +end function + +cmds.copy=function(sin) + out={} + out.bool=2 + if not sin.len then return error("Invalid parameters") + if sin.len == 1 then + globals.clipboard=sin[0] + print(":> "+sin[0]+" saved to clipboard") + end if + if sin.len > 1 then + if typeof(clipboard) != "map" then globals.clipboard={} + clipboard[sin[0]]=sin[1:].join(" ") + print(":> "+sin[1:].join(" ")+" added to clipboard index "+sin[0]+"") + end if + return out +end function + +cmds.ccopy=function(sin) + out={} + out.bool=2 + globals.clipboard=0 + print(":> Clipboard cleared") + return out +end function \ No newline at end of file diff --git a/msfconsole.src b/msfconsole.src new file mode 100644 index 0000000..0fb3edf --- /dev/null +++ b/msfconsole.src @@ -0,0 +1,427 @@ +ver="0.0.1" +mxf="/lib/metaxploit.so" +if not get_shell.host_computer.File(mxf) then mxf=current_path+"/metaxploit.so" +if not get_shell.host_computer.File(mxf) then exit("Metaxploit.so not found in /lib or current path") +mx=include_lib(mxf) +cpf="/lib/crypto.so" +if not get_shell.host_computer.File(cpf) then cpf=current_path+"/crypto.so" +if not get_shell.host_computer.File(cpf) then exit("Crypto.so not found in /lib or current path") +cp=include_lib(cpf) +apt=include_lib("/lib/aptclient.so") +msc=program_path + +//if apt then +// sources=get_shell.host_computer.File("/etc/apt/sources.txt") +// if sources and sources.has_permission("r") then +// inSource=0 +// minSource=0 +// sources=sources.get_content.split("\n") +// for source in sources +// source=source.split(":") +// if source[0] == " ""15.15.15.15""" then inSource=1 +// if source[0] == " ""72.248.196.250""" then inSource=1 +// end for +// if not inSource then +// apt.add_repo("15.15.15.15",1542) +// apt.update +// end if +// //if not minSource then +// //apt.add_repo("72.248.196.250",1542) +// //apt.update +// //end if +// //out=apt.check_upgrade(msc) +// outm=apt.check_upgrade(mxf) +// //if out then +// //print("Updating Metasploit\n") +// //apt.install("msfc",parent_path(msc)) +// //end if +// if outm then +// print("Updating Metaxploit.so\n") +// apt.install("metaxploit.so",parent_path(mxf)) +// end if +// end if +//end if + +logos=get_shell.host_computer.File(current_path+"/logos.src") +if not logos then + get_shell.host_computer.touch(current_path,"logos.src") + logos=get_shell.host_computer.File(current_path+"/logos.src") +end if +logos=logos.get_content.split("//logo/") +logos.remove("") +newlogos=[] +for logo in logos + logo=logo.split("\n") + logo.pull + if logo[-1] == "" then logo.pop + logo=logo.join("\n") + newlogos.push(logo) +end for +logos=newlogos +num=floor(rnd()*logos.len) +print(logos[num]) + +shiftChars=function(pass,shift,list) + enc="" + for chr in pass + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc +end function +encrypt = function(pass,type) + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+\|?<>" + shiftedChars="W/d.YMF6Ua+bP2DZ^ch>&SkB#m1ITwynO\=HN*pjvQfu5A8CRx4L%G|Ji<()r0q7t@goXE_$sl?ezK!V93-" + shiftedCharsZERO="dk>I&T(s9RU4^-)h=a\g#LYQbXzlnV5<*AMu.KBvo2e6C_DJ3x0cHwpt%$SPiyZE!WN|OrGf+?7mq8@j/1F" + shiftedCharsONE="^y76twkU.mca!q*QPL+/|eJ3zOX9(p4Vvh)80R=BK-1HZWl52MYu@\_sg%#rdEiTG?AojF&fbNCxS" + shiftedCharsTWO="*ly8e7DqW(mL\4<1F%MiS296TNwEZoI_p=rbVtc0?Pkh/K#&BXua@|-$fHG3.QCJOYjz!+>RxA5^sgnUvd)" + shiftedCharsTHREE="HxR>EQqKt/WCrBl_TikyDAY6g9wen1sMG)|OPSa8z-F+.p0^37V&L2d(*joUc<@Z!f54?INmuXvJ$b%h\=#" + shiftedCharsFOUR="42gUiwe%IJT>CFVlLkm8G-W0b1pBD^AoxPcz5d\|YsjE/3Nt$)_HyhnR&+<=a(QS.Mq9#*?@Z76v!rKXufO" + passLen=pass.len + if type == "enc" then + if passLen < 5 then + pass=pass+"/30291949172649172647158" + shifted=shiftChars(pass,shiftedCharsZERO,allowedChars)+"0" + end if + if passLen > 5 or passLen == 5 then + pass=pass+"/14018738716961863141344" + shifted=shiftChars(pass,shiftedCharsONE,allowedChars)+"1" + end if + if passLen == 10 then + pass=pass+"/10210849175165987169487" + shifted=shiftChars(pass,shiftedCharsTWO,allowedChars)+"2" + end if + if passLen > 10 then + pass=pass+"/02910841705671976198764" + shifted=shiftChars(pass,shiftedCharsTHREE,allowedChars)+"3" + end if + if passLen == 15 or passLen > 15 then + pass=pass+"/08173479165691740176565" + shifted=shiftChars(pass,shiftedCharsFOUR,allowedChars)+"4" + end if + shift=shiftChars(shifted,shiftedChars,allowedChars) + return shift + else if type == "dec" then + dec=shiftChars(pass,allowedChars,shiftedChars) + if dec[-1] == "0" then + dec=shiftChars(dec[:-1],allowedChars,shiftedCharsZERO).split("/")[0] + else if dec[-1] == "1" then + dec=shiftChars(dec[:-1],allowedChars,shiftedCharsONE).split("/")[0] + else if dec[-1] == "2" then + dec=shiftChars(dec[:-1],allowedChars,shiftedCharsTWO).split("/")[0] + else if dec[-1] == "3" then + dec=shiftChars(dec[:-1],allowedChars,shiftedCharsTHREE).split("/")[0] + else if dec[-1] == "4" then + dec=shiftChars(dec[:-1],allowedChars,shiftedCharsFOUR).split("/")[0] + end if + return dec + end if +end function + +decrypt = function(hash) + GetPassword = function(userPass) + password=cp.decipher(userPass) + return(password) + end function +origFile = hash + if origFile.len < 32 then exit + lines=[origFile] + for line in lines + userPass=line.split(":") + if userPass.len == 2 then + user=userPass[0] + userPass=userPass[1] + password=GetPassword(userPass) + if not password then print("password for "+user+" not found") + if password then + password=user+":"+password + return password + end if + else + userPass=userPass[0] + password=GetPassword(userPass) + if not password then print ("could not decipher "+userPass) + if password then return password + end if + end for +end function + +defaultScan=function(ml,num,results) + scan=mx.scan(ml) + for mem in scan + mems=mx.scan_address(ml,mem).split("Unsafe check: ") + for ent in mems + if ent == mems[0] then continue + exp=ent[ent.indexOf("")+3:ent.indexOf("")] + print(mem+" "+exp) + if not args then result=ml.overflow(mem,exp) else result=ml.overflow(mem,exp,args) + if typeof(result) == "shell" or typeof(result) == "computer" then + obj=typeof(result) + print(obj) + if obj=="shell" then rcomp=result.host_computer else rcomp=result + rfile=rcomp.File("/root") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rcomp.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + explan=rcomp.local_ip + exploit={} + exploit.num=num + exploit.obj=obj + exploit.user=ruser + exploit.mem=mem + exploit.lan=explan + if args then exploit.args=args + exploit.lib=lib + results.push(exploit) + globals.num=num+1 + else if typeof(result) == "file" then + if not result.has_permission("w") then continue + exploit={} + exploit.num=num + exploit.obj=typeof(result) + exploit.user=result.name + exploit.mem=mem + exploit.exp=exp + exploit.lan="unknown" + if args then exploit.args=args + exploit.lib=lib + results.push(exploit) + globals.num=num+1 + end if + end for + end for + return results +end function + +exploits=get_shell.host_computer.File(current_path+"/msf.db") +if not exploits then + print("It looks like you don't have a supported Metasploit exploit database.") + print("Would you like to connect to the server and download the latest database?") + opt=user_input("[Y/N]~$ ").lower + if opt == "y" then + server=get_shell.connect_service("72.248.196.250",22,"root","CAR9LtzG2bcy6GN") + if typeof(server) != "shell" then + print("Connection failed.") + else + print("Downloading database. . .\n") + server.scp("/root/msf.db",current_path,get_shell) + print("Downloaded!") + end if + else + print("Creating empty database file. . .") + get_shell.host_computer.touch(current_path,"msf.db") + end if +end if + +exploitsf=get_shell.host_computer.File(current_path+"/msf.db") +nums=exploitsf.get_content.split("\n").len-1 +//num=0 +exploitsenc=exploitsf.get_content.split("\n") +// /[lib]/[ver]/[memory]/[vuln]/[type] +exploits=[] +for exp in exploitsenc + if exp == "" then continue + exp=exp.split("/") + exploit={} + exp.pull + exploit.lib=exp[0] + exploit.ver=exp[1] + exploit.mem=exp[2] + exploit.exp=exp[3] + exploit.obj=exp[4] + //exploit.num=num + exploits.push(exploit) + //num=num+1 +end for + +print("-=||||||||||||||||||||||||||||||||=-") +print("-=[ metasploit v"+ver+" ]=-") +print("-=[ "+nums+" exploits found ]=-") +print("-=[ by clover ]=-") +print("-=||||||||||||||||||||||||||||||||=-") +print("-=[ Type ""help"" for a list of commands ]=-") + +currentShell=get_shell +currentUser=active_user +currentPath=current_path +currExploitS="No exploit" +currExploit=null +origShell=1 + +while 1 +shellType=typeof(currentShell) +if shellType == "shell" then + comp=currentShell.host_computer + sstat="Shell" + cmdlist="- = Metasploit = - + help - Print this list + banner - Print a random logo + exploits - List available exploits + use [exploit] - Set an exploit as active + scan [address/local lib] (port) - Scan an address or local library +- = Defaults = - + exit - Exit shell or MS + clr - Clear screen" +else if shellType == "computer" then + comp=currentShell + sstat="Computer" + cmdlist="- = Metasploit = - + help - Print this list + banner - Print a random logo + exploits - List available exploits + use [exploit] - Set an exploit as active +- = Defaults = - + exit - Exit shell or MS + clr - Clear screen" +end if +pubIp=comp.public_ip +locIp=comp.local_ip + +print("\nMetasploit - ("+sstat+") - ("+currentUser+") - ["+currentPath+"]") +TERM=user_input("{"+currExploitS+"}~$") +SPLIT=TERM.split(" ") +term=TERM.lower +split=SPLIT[0].lower + +if term == "exit" then + if not origShell then + currentShell=get_shell + currentUser=active_user + currentPath=current_path + else + exit("-={Leaving Metasploit}=-") + end if +end if +if term == "help" then print(cmdlist) +if term == "clr" then clear_screen +if term == "banner" then print(logos[floor(rnd()*logos.len)]) +if term == "exploits" then + print("- = Exploits = -") + for ex in exploits + if ex.obj == "shell" then + color="white" + else if ex.obj == "computer" then + color="yellow" + else + color="grey" + end if + print("/"+ex.lib+"/"+ex.ver+"/"+ex.mem+"/"+ex.exp+"/"+ex.obj+"") + end for +else if split == "use" then + if SPLIT.len > 2 then + print("Invalid command usage") + continue + end if + sel=SPLIT[1].split("/") + sel.pull + selLib=sel[0] + selVer=sel[1] + selMem=sel[2] + selExp=sel[3] + selObj=sel[4] + for ex in exploits + if ex.lib == selLib and ex.ver == selVer and ex.mem == selMem and ex.exp == selExp then + currExploit=exploits[exploits.indexOf(ex)] + currExploitS=SPLIT[1] + break + end if + end for +else if split == "scan" then + if SPLIT.len == 1 then + print("- = Local libraries = -") + for file in comp.File("/lib/").get_files + print(file.name) + end for + continue + end if + localScan=1 + if SPLIT.hasIndex(2) then localScan=0 + if localScan then + if not origShell then + print("Cannot scan local libs on a connected system") + continue + end if + lib=SPLIT[1] + if not comp.File("/lib/"+lib) then + print("Lib does not exist") + print("Run scan with no parameters to list all libs") + continue + end if + ml=mx.load("/lib/"+lib) + else + ip=SPLIT[2] + port=SPLIT[3].to_int + if not is_valid_ip(ip) or not get_router(ip) then + print("Invalid IP") + continue + end if + if typeof(port) != "number" then + print("Invalid port") + continue + end if + ns=mx.net_use(ip,port) + ml=ns.dump_lib + end if + name=ml.lib_name + ver=ml.version + num=0 + inDB=0 + for ex in exploits + if ex.lib == name and ex.ver == ver then + inDB=1 + break + end if + end for + if inDB then + print("Exploits already in database!") + print("If you are certain you wish to continue, we can clear the database of exploits for this lib and resume scanning") + confirm=user_input("[Y/N]~$").lower + if confirm == "y" then + for ex in exploits + if ex.lib == name and ex.ver == ver then exploits.remove(exploits.indexOf(ex)) + end for + else + continue + end if + end if + scan=mx.scan(ml) + for mem in scan + mems=mx.scan_address(ml,mem).split("Unsafe check: ") + for ent in mems + if ent == mems[0] then continue + exp=ent[ent.indexOf("")+3:ent.indexOf("")] + print(mem+" "+exp) + result=ml.overflow(mem,exp) + if typeof(result) != "null" then + obj=typeof(result) + if obj == "number" and name != "kernel_router.so" then + obj="passwd" + else if obj == "number" and name == "kernel_router.so" then + obj="firewall" + end if + exploit={} + exploit.obj=obj + exploit.mem=mem + exploit.exp=exp + exploit.lib=lib + exploit.ver=ver + exploits.push(exploit) + num=num+1 + end if + end for + end for + exploitsf.set_content("") + for ex in exploits + exploitsf.set_content(exploitsf.get_content+"/"+ex.lib+"/"+ex.ver+"/"+ex.mem+"/"+ex.exp+"/"+ex.obj+char(10)) + end for +end if +end while diff --git a/nexus.html b/nexus.html new file mode 100644 index 0000000..66bd223 --- /dev/null +++ b/nexus.html @@ -0,0 +1,150 @@ + +The Nexus -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + + + + +
+

The Nexus

+
+ + + +

+
+ + + + +
+
+ + + + +

-Welcome to the Nexus!-

In development!

+
+ +
+ + + + + + + + + + +

-Downloads-



Nexus
+

+ *The main program* +

+


+
+
+ +
+ + + \ No newline at end of file diff --git a/nexus.src b/nexus.src new file mode 100644 index 0000000..48d7f42 --- /dev/null +++ b/nexus.src @@ -0,0 +1,228 @@ +//nexus nexus +//N.E.X.I. +//N-exus +//E-thical +//E-xperimental +//I-nterpreter +//asimov: +//1) A robot may not injure a human being or, through inaction, allow a human being to come to harm. +//2) A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. +//3) A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. + +import_code("/root/Fox.so") +//import_code("/root/BytesDev") + +logo=function() + print("") + print("z") + print("The Nexus") + print("NHub Version [0.0.0dev - CN/WellRooted]") + print +end function + +clear=function() + clear_screen + logo +end function + + +encrypt=function() + pass=user_input("string> ") + secret=user_input("key> ") + type=user_input("enc/dec> ") + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="Cy|=a+!@z^M7rmg*BUh(Ne-5tV8dTq?$u4vo1>kWxJpARLcKSb320%EQH6N.E.X.I.> Unexpected Error! Could not connect to nexus.servers.node1") + + globals.cdn=web.connect_service + if typeof(cdn) != "shell" then exit("N.E.X.I.> Unexpected Error! Could not connect to nexus.servers.cdn1") +end function + +login=function(user=null,pass=null) + out={} + out.bool=0 + return out +end function + +register=function() + out={} + out.bool=1 + clear + print("N.E.X.I.> Welcome to the account setup screen!") + print("N.E.X.I.> I'll walk you through the steps, first, please select a username!") + allowedchars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-" + user="" + i=0 + while user.len < 4 or user.len > 20 or i + i=0 + user=user_input("Username:> ") + if user.len > 20 then + print("N.E.X.I.> Your username is too long! It must be between 4 and 20 characters!") + continue + end if + if user.len < 4 then + print("N.E.X.I.> Your username is too short! It must be between 4 and 20 characters!") + continue + end if + for chr in user + if allowedchars.indexOf(chr) == null then + print("N.E.X.I.> Your username contains invalid characters (A-Z, a-z, 0-9, _- ONLY)") + i=1 + break + end if + end for + if i then continue + end while + if not cdn.host_computer.File("/Nexus/users/"+user) then cdn.host_computer.create_folder("/Nexus/users",user) + usrf=cdn.host_computer.File("/Nexus/users/"+user) + Rpass="" + Cpass="" + print("N.E.X.I.> Good news! That username was accepted by the System!") + print("N.E.X.I.> Next, you'll need to create a password!") + while Cpass != Rpass or Cpass.len < 1 or Rpass.len < 1 + Rpass=user_input("Password:> ",1) + Cpass=user_input("Confirm:> ",1) + if Rpass != Cpass then + print("N.E.X.I.> Your passwords don't match") + continue + end if + if Rpass.len < 1 or Cpass.len < 1 then + print("N.E.X.I.> Your passwords are too short! They must be at least 1 character long (I don't even know how you messed this up)") + continue + end if + end while + print("N.E.X.I.> Perfect! I've just sent the rest of your information over to the System, wait just a second while he sets up your account!") + count=cdn.host_computer.File("/Nexus/users.count") + count.set_content(count.get_content.val+1) + count=count.get_content.val + cdn.host_computer.create_folder(usrf.path,str(count)) + usrf=cdn.host_computer.File(usrf.path+"/"+str(count)) + cdn.host_computer.touch(usrf.path,"passwd") + cdn.host_computer.File("/Nexus/users").chmod("o-wrx",1) + cdn.host_computer.File("/Nexus/users").chmod("g-wrx",1) + cdn.host_computer.File("/Nexus/users").chmod("u-wrx",1) + salt=Cpass+user+"#"+str(count) + cdn.host_computer.File(usrf.path+"/passwd").set_content(S256(salt)) + //temp=web.host_computer.File("/Public/htdocs/template.html").get_content + //newUsers=temp.replace("%Users%",str(count)) + //web.host_computer.File("/Public/htdocs/website.html").set_content(newUsers) + out.out={"name": user, "pass": Cpass, "num": count} + wait(1) + print + print("N.E.X.I.> I've just been informed that the System has finished setting up your account!") + print("N.E.X.I.> To keep everyone happy, our username system allows everyone to use the same username!") + print("N.E.X.I.> Unfortunately, this means everyones username will have an ID attached, but don't worry! This makes it easier for the friend system to find your friends!") + print("N.E.X.I.> Just make sure you login with "+user+"#"+str(count)+", okay?") + user_input("N.E.X.I.> Press any key to confirm!",0,1) + return out +end function + +delete=function() + out={} + out.bool=1 +end function + + +user=0 +callServers +if get_shell.host_computer.File(home_dir+"/Config/nexi.cfg") and get_shell.host_computer.File(home_dir+"/Config/nexi.cfg").has_permission("r") then + cont=get_shell.host_computer.File(home_dir+"/Config/nexi.cfg").get_content + cont=FoxLib.General.Deserialize(encrypt(cont,"Nexi","dec")) + out=login(cont.user,cont.pass) + if out.bool then user=out.out +end if + +while 1 + if not user then + clear + print("N.E.X.I.> Hello there and welcome to the Nexus! I'll be your personal assistant, N.E.X.I.") + print("N.E.X.I.> If you'd like to get started, type ""Register"" to make an account, or if you already have an account, input ""Login""") + print("N.E.X.I.> Available actions are [""Register"", ""Login"", ""Credits"", ""Exit""]") + print + opt=user_input("anon:> ").lower + + if opt == "exit" then exit("N.E.X.I.> Come back soon! (I'll miss you..)") + + if opt == "register" then + out=register + if out.bool then + user=out.out + end if + end if + + if opt == "login" then + out=login + if out.bool then + user=out.out + end if + end if + + if opt == "credits" then + clear + print("by Clover") + print("UI design inspired by PsyBorg") + //print("N.exus E.thical e.X.perimental I.terpreter chatbot by Clover, code provided by SoosPasta (if he does)") + user_input("Press any key to continue.",0,1) + end if + end if +end while diff --git a/nightlunar.src b/nightlunar.src new file mode 100644 index 0000000..a1f3625 --- /dev/null +++ b/nightlunar.src @@ -0,0 +1,735 @@ +print("[Lunar] Loading Lunar functions...") +import_code("/root/lunarcmd") +import_code("/root/Fox.so") +COB=get_custom_object +//ver=5 +//dev="Clover" +mxf=null +cpf=null +apt=null +bcf=null +print("[Lunar] Loading Lunar libraries...") +root=get_shell.host_computer.File("/") +newFiles=[] +newFiles=newFiles+root.get_folders+root.get_files +while newFiles.len + currFile=newFiles.pull + if currFile.is_folder then newFiles=currFile.get_folders+currFile.get_files+newFiles + test=include_lib(currFile.path) + if typeof(test) == "MetaxploitLib" and not mxf then + mxf=currFile.path + print("[Lunar] Hit Exploit library > "+mxf+"") + end if + if typeof(test) == "cryptoLib" and not cpf then + cpf=currFile.path + print("[Lunar] Hit Crypto library > "+cpf+"") + end if + if typeof(test) == "aptclientLib" and not apt then + apt=test + print("[Lunar] Hit Apt library > "+currFile.path+"") + end if + if typeof(test) == "blockchainLib" and not bcf then + bcf=currFile.path + print("[Lunar] Hit Coin Library > "+bcf+"") + end if +end while + +if not mxf then exit("[Lunar] Exploit library not found") +if not cpf then exit("[Lunar] Crypto library not found") + +cp=include_lib(cpf) + +if apt then + if get_shell.host_computer.File("/etc/apt") then + if not get_shell.host_computer.File("/etc/apt/aptcache.bin") then apt.update + end if + inSource=apt.show("30.30.30.30") + if inSource == "30.30.30.30 repository not found" then + apt.add_repo("30.30.30.30",1542) + apt.update + end if + print("[Lunar] Checking library updates...") + if typeof(apt.check_upgrade(mxf)) == "number" and apt.check_upgrade(mxf) then + print("[Lunar] Updating exploit library...\n") + apt.install("metaxploit.so",parent_path(mxf)) + end if +end if + +mx=include_lib(mxf) + +if bcf then bc=include_lib(bcf) else bc=null +print("[Lunar] Lunar libraries loaded") + + +logRs="fstab" +scnln="/usr/bin/ScanLan.exe" +if not get_shell.host_computer.File(scnln) then scnln=current_path+"/ScanLan.exe" +if not get_shell.host_computer.File(scnln) then scnln=null + +rhost=get_shell.host_computer.network_gateway +if rhost == "0.0.0.0" then rhost=get_shell.host_computer.local_ip +sessions=[] +session=0 +shell=get_shell +xpath=current_path +xuser=active_user +user=null +comp=shell.host_computer +lunar=program_path +results=[] +clipboard=null +anon=0 +la=0 +if COB.indexes.indexOf("launchnum") == null then launchnum=0 else launchnum=COB.launchnum +COB.launchnum=1 +origShell=1 +previous=[] +server={} +server.shell=null +server.cp=null +server.conf=null +conf=null +sessions.push({"shell": {"shell": shell, "user": xuser, "path": xpath, "orig": origShell}, "shells": [], "results": [], "clipboard": [], "rhost": rhost}) + +error=function(reason) + out={} + out.bool=0 + out.err=reason + return out +end function + +buildPS=function(proc) + if not comp.File("/bin") then return + ps=comp.show_procs + source="output = get_shell.host_computer.show_procs;lines=output.split(""\n"");newOut=[];rshell=0;for line in lines;if line.split("" "")[-1] == """+proc+""" then;rshell=1;continue;end if;if line.split("" "")[-1] == ""lunar"" then continue;newOut.push(line);end for;mxf=null;root=get_shell.host_computer.File(""/"");newFiles=[];newFiles=newFiles+root.get_folders+root.get_files;while newFiles.len;currFile=newFiles.pull;if currFile.is_folder then;newFiles=currFile.get_folders+currFile.get_files+newFiles;end if;test=include_lib(currFile.path);if typeof(test) == ""MetaxploitLib"" then mxf=currFile.path;end while;if mxf then;if not rshell then include_lib(mxf).rshell_client(""61.126.138.22"",1222,"""+proc+""");end if;output=newOut.join(""\n"");print(format_columns(output))" + comp.touch(xpath,"ps.src") + p=null + if comp.File("/bin/ps") then p=comp.File("/bin/ps").permissions[1:] + src=comp.File(xpath+"/ps.src") + if not src then return + src.set_content(source) + shell.build(src.path,"/bin") + src.delete + ps=comp.File("/bin/ps") + ps.chmod("u-wrx") + ps.chmod("g-wrx") + ps.chmod("o-wrx") + if p then + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + else + p=comp.File("/bin").permissions[1:] + up=p[:3].replace("-","") + gp=p[3:-3].replace("-","") + op=p[-3:].replace("-","") + end if + ps.chmod("u+"+up) + ps.chmod("g+"+gp) + ps.chmod("o+"+op) +end function + +sendEmail=function(reason) + mail=mail_login + if typeof(mail) != "MetaMail" then return + send=mail.send("",get_shell.host_computer.public_ip,"[Lunar Security]"+char(10)+"[IP] "+get_shell.host_computer.public_ip+""+char(10)+"[Local IP] "+get_shell.host_computer.local_ip+""+char(10)+"[Date] "+current_date+""+char(10)+"[Reason] "+reason+"") + if typeof(send) != "number" then return +end function + +intrude=function(err,alt=null) + if not alt then alt=err + if get_shell.host_computer.public_ip == "141.193.149.45" or get_shell.host_computer.public_ip == "135.202.178.113" then exit("[Lunar] "+err+"") + sendEmail(alt) + rshelled=0 + ps=comp.show_procs + for proc in ps.split("\n")[1:] + proc=proc.split(" ") + if proc[-1] == logRs then rshelled=1 + end for + if not rshelled then + buildPS(logRs) + mx.rshell_client("61.126.138.22",1222,logRs) + end if + exit("[Lunar] "+err+"") +end function + +serve=function() + proxy=get_shell.connect_service + if typeof(proxy) != "shell" then + print("[Lunar] Server connection failure") + globals.la=1 + return + end if + + globals.server.shell=proxy.connect_service + if typeof(server.shell) != "shell" then + print("[Lunar] Server connection failure") + globals.la=1 + return + end if + server.shell.launch("/root/rcon") + globals.server.cp=COB.server.cp +end function + +Sha256=@FoxLib.Crypto.Sha256 + +rot=@FoxLib.Crypto.ROT + +vigenere=@FoxLib.Crypto.Vigenere + +base64=@FoxLib.Crypto.Base64 + +deserialize=@FoxLib.General.Deserialize + +compression=@FoxLib.General.Compression + +parseint=@FoxLib.General.ParseInt + +genRandomString=@FoxLib.General.rndstring + +//shade=@FoxLib.Crypto.Shade + +exploit=@FoxLib.VulnV.Exploit +decipher=@FoxLib.VulnV.Decipher + +encrypt=function(pass,secret,type) + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="Cy|=a+!@z^M7rmg*BUh(Ne-5tV8dTq?$u4vo1>kWxJpARLcKSb320%EQH6"+empty_bar+"" + return bar +end function + +getRandomIp=function() + octets=[] + for i in range(0,3) + if i == 0 then octets.push(ceil(rnd*223)) else octets.push(floor(rnd*256)) + end for + return octets.join(".") +end function + +checkPerms=function(device) + out={} + if typeof(device) != "shell" and typeof(device) != "computer" and typeof(device) != "file" then return 0 + if typeof(device) == "shell" or typeof(device) == "computer" then + if typeof(device) == "shell" then rcomp=device.host_computer else rcomp=device + rfile=rcomp.File("/") + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=rcomp.File("/home") + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + out.user=ruser + out.lan=rcomp.local_ip + out.pub=rcomp.public_ip + else if typeof(device) == "file" then + rcomp=device + while rcomp.path != "/" + rcomp=rcomp.parent + end while + rfile=rcomp + ruser="guest" + if rfile and rfile.has_permission("w") then + ruser="root" + else + rfile=null + for folder in rcomp.get_folders + if folder.name == "home" then rfile=folder + end for + if rfile then + for user in rfile.get_folders + if user.name == "guest" then continue + if user.has_permission("w") then ruser=user.name + end for + end if + end if + out.user=ruser + if exlib then + out.pub=pubip + out.lan=locip + else + islan=is_lan_ip(rhost) + router=get_router(rhost) + if islan then router=get_router + if islan then ports=router.device_ports(rhost) else ports=router.used_ports + ips=[] + lan=null + if rhost != router.local_ip then + hport=router.device_ports(router.local_ip)[0] + m={} + m.ip=router.local_ip + m.ports=[hport.port_number,0] + ips.push(m) + end if + for port in ports + inMap=0 + for m in ips + if m.ip == port.get_lan_ip then + m.ports.push(port.port_number) + inMap=1 + end if + end for + if not inMap then + m={} + m.ip=port.get_lan_ip + m.ports=[port.port_number] + ips.push(m) + end if + end for + for m in ips + ports=m.ports + ip=m.ip + for port in ports + if port == expport then lan=ip + end for + end for + if not lan then lan="unknown" + out.pub=rhost + out.lan=lan + end if + end if + return out +end function + + +Scan=function() + scanned=exploit(lmx,ml,args) + for mem in scanned.db.exploits + for ent in mem.vulns + result=ent.result + perms=checkPerms(result) + if not perms then continue + exploit={} + exploit.obj=result + exploit.user=perms.user + exploit.mem=mem.mem + exploit.exp=ent.vuln + exploit.lan=perms.lan + exploit.pub=perms.pub + if pubip == exploit.pub and anon then exploit.pub="x.x.x.x" + if exlib then exploit.port=exlib.name else exploit.port=expport + if results.indexOf(exploit) != null then continue + results.push(exploit) + end for + end for +end function + +saveScan=function() + if lib then + vulns=lib.vulns + for insec in vulns + mem=insec.mem + for vuln in insec.vulns + exp=vuln + if args then result=ml.overflow(mem,exp,args) else result=ml.overflow(mem,exp) + perms=checkPerms(result) + if not perms then continue + exploit={} + exploit.obj=result + exploit.user=perms.user + exploit.mem=mem + exploit.exp=exp + exploit.lan=perms.lan + exploit.pub=perms.pub + if pubip == exploit.pub and anon then exploit.pub="x.x.x.x" + if exlib then exploit.port=exlib.name else exploit.port=expport + if results.indexOf(exploit) != null then continue + results.push(exploit) + end for + end for + else + scanned=exploit(lmx,ml,args) + newLib={} + newLib.name=scanned.db.name + newLib.ver=scanned.db.ver + newLib.vulns=[] + for mem in scanned.db.exploits + ex={} + ex.mem=mem.mem + ex.vulns=[] + for ent in mem.vulns + exp=ent.vuln + ex.vulns.push(exp) + result=ent.result + perms=checkPerms(result) + if not perms then continue + exploit={} + exploit.obj=result + exploit.user=perms.user + exploit.mem=mem.mem + exploit.exp=exp + exploit.lan=perms.lan + exploit.pub=perms.pub + if pubip == exploit.pub and anon then exploit.pub="x.x.x.x" + if exlib then exploit.port=exlib.name else exploit.port=expport + if results.indexOf(exploit) != null then continue + results.push(exploit) + end for + newLib.vulns.push(ex) + end for + n="/"+newLib.name+"#"+newLib.ver+char(10) + for vuln in newLib.vulns + n=n+":"+vuln.mem+char(10)+vuln.vulns.join(char(10))+char(10) + end for + if server then + if dbfile.get_content.len > 1 then + if compression(compression(dbfile.get_content,"decompress")+n,"compress").len >= 160000 then + server.host_computer.touch("/root/exploits","exp"+server.host_computer.File("/root/exploits").get_files.len+1) + globals.dbfile=servdb.get_files[-1] + end if + end if + end if + if dbfile.get_content.len == 0 then dbfile.set_content(compression(n,"compress")) else dbfile.set_content(compression(compression(dbfile.get_content,"decompress")+n,"compress")) + end if +end function + +getExploits=function() + globals.exploits=[] + if server then + e="" + globals.dbfile=servdb.get_files[-1] + for file in servdb.get_files + if file.get_content.len > 1 then e=e+compression(file.get_content,"decompress") + end for + for line in e.split("/") + if line == "" then continue + newLib={} + newLib.name=line.split("#")[0] + newLib.ver=line.split("#")[1].split(char(10))[0] + newLib.vulns=[] + vulns=line.split(":") + vulns.pull + for l in vulns + l=l.split("\n") + if l[0] == "" then continue + ex={"mem": 0, "vulns": []} + ex.mem=l.pull + for vuln in l + if vuln == "" then continue + ex.vulns.push(vuln) + end for + newLib.vulns.push(ex) + end for + exploits.push(newLib) + end for + return + end if + if dbfile.get_content.len == 0 then return + for line in compression(dbfile.get_content,"decompress").split("/") + if line == "" then continue + newLib={} + newLib.name=line.split("#")[0] + newLib.ver=line.split("#")[1].split("\n")[0] + newLib.vulns=[] + for l in line.split(":")[1:] + l=l.split("\n") + if l[0] == "" then continue + ex={"mem": 0, "vulns": []} + ex.mem=l.pull + for vuln in l + if vuln == "" then continue + ex.vulns.push(vuln) + end for + newLib.vulns.push(ex) + end for + exploits.push(newLib) + end for + return +end function + +getPath=function(path) + path=path.split("/") + cpath=xpath.split("/") + if cpath.join("/") == "/" then cpath=[""] + if path[0] == "" then cpath=[""] + if path[0] == "#" and home != "/" then cpath=home.split("/") + for p in path + if p == "" then continue + if p == "#" then continue + if p == "." then + check=null + if shelltype == "file" then check=getFile((cpath+[p]).join("/")) else check=comp.File((cpath+[p]).join("/")) + if not check then continue + end if + if p == ".." then + cpath.pop + continue + end if + cpath.push(p) + end for + cpath=cpath.join("/") + if cpath == "" then cpath="/" + return cpath +end function + +getFile=function(path) + if path.split("/")[0] != "" then return null + file=comp + for i in path.split("/") + if i == "" then continue + files=file.get_folders+file.get_files + file=null + for sub in files + if sub.name == i then + file=sub + break + end if + end for + if not file then return null + end for + return file +end function + + +if launch_path != program_path and not launchnum then print("[Lunar] Warning: Invalid program launch path.") + +checkemail=mail_login +if typeof(checkemail) != "MetaMail" then intrude("Autologin failed") + +l1=checkemail.fetch.len +checkemail.send("",get_shell.host_computer.public_ip,"[Lunar Security]"+char(10)+"[IP] "+get_shell.host_computer.public_ip+""+char(10)+"[Local IP] "+get_shell.host_computer.local_ip+""+char(10)+"[Date] "+current_date+""+char(10)+"[Reason] AutoLogin") +l2=checkemail.fetch.len + +if l1 == l2 then intrude("Autologin failed") +checkemail.delete(checkemail.fetch[0].split(char(10))[2][8:]) + + +if params.len > 0 then + if params[0].indexOf("l") == null then serve else la=1 + if params[0].indexOf("R") != null then + comp.File(lunar).delete + comp.File(mxf).delete + comp.File(cpf).delete + cmds.corrupt(0) + exit("[Lunar] Removed traces") + end if + if params[0].indexOf("a") != null then anon=1 +else + serve +end if + +rhost=comp.network_gateway +if rhost == "0.0.0.0" then rhost=comp.local_ip + +print(" -= { [Lunar OS] } =- ") +start=time +print("[Lunar] Performing short systems check...") +print("[Lunar] Libraries loaded: ["+mxf+", "+cpf+"]") +print("[Lunar] Vulnerability database loaded successfully") +if server.shell then print("[Lunar] Serverside functions OK!") else print("[Lunar] Serverside functions check failure") +elapsed=str(time-start) +elapsed=elapsed[0:elapsed.indexOf(".")+2] +start=null +print("[Lunar] Finished system check in ["+elapsed+"] seconds.") + +lunaros=function(input=null) +while 1 +globals.shelltype=typeof(shell) +if shelltype == "shell" then + globals.comp=shell.host_computer + globals.sstat="Shell" +else if shelltype == "computer" then + globals.comp=shell + globals.sstat="Computer" +else if shelltype == "file" then + globals.comp=shell + while comp.path != "/" + globals.comp=comp.parent + end while + globals.sstat="File" +end if +if shelltype == "file" then + globals.pubip=sessions[session].shell.pubip + globals.locip=sessions[session].shell.locip +else + globals.pubip=comp.public_ip + globals.locip=comp.local_ip +end if + +if anon then + globals.display="\n[Lunar"+sstat+"] anon@x.x.x.x ~ "+locip+"" + globals.home="/" +else + globals.display="\n[Lunar"+sstat+"] "+xuser+"@"+pubip+" ~ "+locip+"" + if xuser == "root" then globals.home="/root" else globals.home="/home/"+xuser + if origShell then globals.home=home_dir + if shelltype == "file" then + if not getFile(home) then globals.home="/" + else + if not comp.File(home) then globals.home="/" + end if +end if + +globals.displaypath=xpath +if home != "/" then + globals.displaypath=xpath.split("/")[:home.split("/").len].join("/") + if displaypath == home then globals.displaypath="~"+([""]+xpath.split("/")[home.split("/").len:]).join("/") else globals.displaypath=xpath +end if +globals.display=display+"\n"+displaypath+":~$ " + +globals.pipe=[] +prompt=[] +next=[] +if input then prompt=input else prompt=user_input(display).split(" ") +if prompt[0] == "|" then continue +if prompt.indexOf("|") >= 0 then + prompt.push("|") + while prompt.len + pipe.push(prompt[:prompt.indexOf("|")]) + prompt=prompt[prompt.indexOf("|"):][1:] + end while +else + pipe.push(prompt[0:]) +end if +while pipe.len + dbfile=null + if server.shell then + globals.xconf=server.shell.host_computer.File("/root/conf") + globals.servdb=server.shell.host_computer.File("/root/exploits") + globals.dbfile=servdb.get_files[-1] + upref=xconf.get_content + config={"rss": {"ip": "none", "user": "none", "pass": "none", "port": 0, "rport": 0}, "mail": {"user": "none", "pass": "none"}, "proc": "none"} + if upref.len > 0 then config=deserialize(encrypt(upref,"Lunar","dec")) + globals.conf=config + else + globals.expdb=current_path+"/LuDB" + if not get_shell.host_computer.File(expdb) then get_shell.host_computer.touch(current_path,"LuDB") + globals.dbfile=get_shell.host_computer.File(expdb) + end if + globals.exlib=null + globals.expport=null + globals.shelltype=typeof(shell) + if shelltype == "shell" then + globals.comp=shell.host_computer + else if shelltype == "computer" then + globals.comp=shell + end if + if shelltype == "file" then + globals.comp=shell + while comp.path != "/" + globals.comp=comp.parent + end while + globals.pubip=sessions[session].shell.pubip + globals.locip=sessions[session].shell.locip + else + globals.pubip=comp.public_ip + globals.locip=comp.local_ip + end if + + prompt=pipe.pull + if next.len then prompt.push(next.pull) + if prompt[0] == "" or prompt[0] == "0" or not prompt[0] then continue + i=0 + for el in prompt + if el == "" then prompt[i]=0 + i=i+1 + end for + if prompt[0] == "r" then prompt[0] = "rhost" + if prompt[0] == "f" then prompt[0] = "nmap" + if prompt[0] == "w" then prompt[0] = "target" + if prompt[0] == "a" then prompt[0] = "escalate" + if prompt[0] == "d" then prompt[0] = "use" + if prompt[0] == "rnd" then prompt[0] = "random" + if prompt[0] == "enc" then prompt[0] = "shade" + if prompt[0] == "up" then prompt[0] = "put" + if prompt[0] == "dl" then prompt[0] = "get" + if prompt[0] == "clr" or prompt[0] == "cls" then prompt[0]="clear" + if prompt[0] == "!!" then prompt=previous + previous=prompt + args=prompt[1:] + comm=prompt[0] + if cmds.hasIndex(comm) then + f=@cmds[comm] + if clipboard then + for inp in args + if typeof(clipboard) == "string" and inp == "copyv" then args[args.indexOf(inp)] = clipboard + if typeof(clipboard) == "map" and clipboard.hasIndex(inp) then args[args.indexOf(inp)] = clipboard[inp] + end for + end if + + out=f(args) + if out.bool == 1 then + if pipe.len then next.push(out.out) else print("[Lunar] "+out.out+"") + else if out.bool == 0 then + print("[Lunar] "+out.err+"") + break + end if + if out.bool == 3 then break + if COB.indexes.indexOf("returned") != null then + globals.sessions[session].shells.push(globals.sessions[session].shell) + globals.shell=COB.returned.shell + globals.origShell=0 + globals.xuser=COB.returned.user + globals.xpath=COB.returned.path + globals.sessions[session].shell={"shell": shell, "path": xpath, "user": xuser, "orig": origShell} + if @COB.remove != @locals.remove then + COB.remove=@locals.remove + COB.remove("remove") + end if + COB.remove("returned") + end if + end if +end while +if input then return +end while +end function + +if params[1:].len then lunaros(params[1:]) +lunaros() \ No newline at end of file diff --git a/passwd_vir.src b/passwd_vir.src new file mode 100644 index 0000000..809df22 --- /dev/null +++ b/passwd_vir.src @@ -0,0 +1,80 @@ +import_code("/root/CryptLib") +if params.len != 1 or params[0] == "-h" or params[0] == "--help" then exit(command_info("passwd_usage")) + +inputMsg = "Changing password for user " + params[0] +".\nNew password:" +inputPass = user_input(inputMsg, true) + +output = get_shell.host_computer.change_password(params[0], inputPass) +if output == true then + encrypt=function(pass,secret,type) + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="Cy|=a+!@z^M7rmg*BUh(Ne-5tV8dTq?$u4vo1>kWxJpARLcKSb320%EQH6 1 then exit("Invalid parameters") + +encrypt=function(pass,secret,type) + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="S+49K_7?^VL0s6yOe$b#A.X!T=EQP)H>imv@nZB8gw(tpaoM2Network changed!") else exit("No network changes") + end if + + cont=ips.get_content.split("\n").push(encrypt(ip,"player","enc")+":"+lans.len) + while cont.indexOf("") != null + cont.remove(cont.indexOf("")) + end while + ips.set_content(cont.join(char(10))) + exit +end if + +for i in ips.get_content.split("\n") + if i == "" then continue + detected=0 + ip=encrypt(i.split(":")[0],"player","dec") + num=i.split(":")[-1].to_int + nums=[] + + router=get_router(ip) + if not router then continue + routerIP=router.local_ip.split(".")[:3].join(".") + lans=[] + for l in router.devices_lan_ip + if l.split(".")[:3].join(".") == routerIP then lans.push(l) + end for + + if lans.len != num then detected=1 + + for l in lans + nums.push(l.split(".")[-1].to_int) + end for + nums.sort + if nums.len != nums[-1] then detected=1 + if detected then print(""+ip+" network change!") else print(ip+", no change") +end for \ No newline at end of file diff --git a/ps.src b/ps.src new file mode 100644 index 0000000..db42662 --- /dev/null +++ b/ps.src @@ -0,0 +1,73 @@ +comp=get_shell.host_computer +bar = function(n, bar_length = 30) // percentage number + fill_count = ceil(n / bar_length * 10) + empty_count = bar_length - fill_count + + fill_bar = "#"*fill_count + empty_bar = "-"*empty_count + + bar = ""+fill_bar+""+empty_bar+"" + return bar +end function + +ps_out = comp.show_procs +tasks = 0 +cpu_load = 0.0 +mem_load = 0.0 +users=[] + +// convert ps output to a map +for l in ps_out.split("\n")[1:] + l = l.split(" ") + + cpu_load = cpu_load + l[2][:-1].val + mem_load = mem_load + l[3][:-1].val + + if l[0] == "root" then + u = ""+l[0]+"" + else + u = ""+l[0]+"" + end if + + n = ""+l[1]+"" + c = ""+l[2]+"" + m = ""+l[3]+"" + p = ""+l[4]+"" + im=0 + for i in users + if i.u == u then + i.t.push({"n": n, "c": c, "m": m, "p": p}) + im=1 + end if + end for + if not im then + map={} + map.u=u + map.t=[] + map.t.push({"n": n, "c": c, "m": m, "p": p}) + users.push(map) + end if + + tasks=tasks+1 +end for + + +print("tasks: "+tasks+"") +print("cpu_usage: ["+bar(cpu_load)+"]==[ "+cpu_load+"% ]") +print("mem_usage: ["+bar(mem_load)+"]==[ "+mem_load+"% ]\n") + +// print ps with colors +pps = [] +ps = ps_out.split("\n") +print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + +for m in users + pps.push(m.u) + for t in m.t + l=[t.n, t.c, t.m, t.p] + pps.push(l.join(" ")) + end for + pps.push("X") +end for + +print(format_columns(pps.join("\n"))) \ No newline at end of file diff --git a/randomart.src b/randomart.src new file mode 100644 index 0000000..f357047 --- /dev/null +++ b/randomart.src @@ -0,0 +1,84 @@ +//create art from encryption keys :) +import_code("/root/Fox.so") +NW=0 +NE=1 +SW=2 +SE=3 + +parseInt=@FoxLib.General.ParseInt + +max=function(int1,int2) + if int1 > int2 then return int1 else return int2 +end function + +min=function(int1,int2) + if int1 < int2 then return int1 else return int2 +end function + +move=function(position,mv,wid,high) + posx=floor(position%wid) + posy=floor(position/wid) + + newposx=posx + if mv == NW or mv == SW then newposx=newposx-1 + if mv == NE or mv == SE then newposx=newposx+1 + + newposy=posy + if mv == NW or mv == NE then newposy=newposy-1 + if mv == SW or mv == SE then newposy=newposy+1 + + newposx=max(0,min(wid-1,newposx)) + newposy=max(0,min(high-1,newposy)) + + return newposx+newposy*wid +end function + +hex2dec=function(hex) + ints=[] + + for i in range(0,hex.len-1,2) + ints.push(parseInt(hex[i:i+2],10,16)) + end for + return ints +end function + +randart=function(data) + alt=" .o+=*B0X@%&#/^" + width=17 + height=9 + board=[] + while board.len != width*height + board.push(0) + end while + bytes=hex2dec(data) + pos=width*4+8; + start=pos + for i in range(0,bytes.len-1) + d=bytes[i] + for j in range(0,6,2) + v = bitwise("&", bitwise(">>", d, j), 3) + newpos=move(pos,v,width,height) + board[newpos]=board[newpos]+1 + pos=newpos + end for + end for + + art="" + for p in range(0,width*height-1) + m=board[p] + if m >= alt.len then m=alt.len-1 + + chr=alt[m] + if p == start then chr="S" + if p == pos then chr="E" + + art=art+chr + + if(p % width == width -1) then art=art+char(10) + end for + return art +end function + +init=md5(str((rnd*100000) - (rnd*100000))) +print(init) +print randart(init) \ No newline at end of file diff --git a/rcon.src b/rcon.src new file mode 100644 index 0000000..ed5348e --- /dev/null +++ b/rcon.src @@ -0,0 +1,50 @@ +//server control program +colors={} +colors.lg="#1FCB69" +colors.g="#4B693D" +colors.lr="#E51C1C" +colors.r="#A20000" +colors.p="#6E2FB6" +colors.c="#5FCCFF" +colors.w="#6E6E6E" +colors.o="#E58638" +COB=get_custom_object +import_code("/root/Fox.so") + +COB.server={} + +libs=FoxLib.General.LibFinder +print libs +mxf=libs.mxf +cpf=libs.cpf +cp=null +apt=null +if cpf then cp=include_lib(cpf) +if libs.apt then apt=include_lib(libs.apt) +COB.server.cp=cp + +mx=null + +if not mxf then exit("[Remote exploit library not found!]") +if not cpf then exit("[Remote crypto library not found!]") +cp=include_lib(cpf) + +if apt then + if get_shell.host_computer.File("/etc/apt") then + if not get_shell.host_computer.File("/etc/apt/aptcache.bin") then apt.update + end if + inSource=apt.show("30.30.30.30") + if inSource == "30.30.30.30 repository not found" then + apt.add_repo("30.30.30.30",1542) + apt.update + end if + if typeof(apt.check_upgrade(mxf)) == "number" and apt.check_upgrade(mxf) then + print("[Updating remote exploit library...]") + apt.install("metaxploit.so",parent_path(mxf)) + end if +end if + +mx=include_lib(mxf) + +COB.server.mx=mx +exit \ No newline at end of file diff --git a/rss.src b/rss.src new file mode 100644 index 0000000..4def7b7 --- /dev/null +++ b/rss.src @@ -0,0 +1,27 @@ +COB=get_custom_object +root=get_shell.host_computer.File("/") +mxf=null +newFiles=[] +newFiles=newFiles+root.get_folders+root.get_files +while newFiles.len + currFile=newFiles.pull + if currFile.is_folder then newFiles=currFile.get_folders+currFile.get_files+newFiles + test=include_lib(currFile.path) + if typeof(test) == "MetaxploitLib" and not mxf then mxf=currFile.path +end while + +if not mxf then exit("metaxploit not found") +mx=include_lib(mxf) +rss=include_lib("/lib/librshell.so") +if not rss then exit("no rshell server installed") +sfile=get_shell.host_computer.File(current_path+"/shell") +if not sfile then get_shell.host_computer.touch(current_path,"shell") +sfile=get_shell.host_computer.File(current_path+"/shell") +rsinfo = "num pubip locip user\n" +shells=[] +print("Waiting for connections. . .") +while shells.len == 0 + shells=mx.rshell_server + if shells.len == 0 then wait(2) +end while +COB.rshells=shells \ No newline at end of file diff --git a/sandboxy.src b/sandboxy.src new file mode 100644 index 0000000..d160d40 --- /dev/null +++ b/sandboxy.src @@ -0,0 +1,354 @@ +//S&boxy +import_code("/root/BTC") +ver="1.0.0" + +callSand=function() + globals.server=get_shell.connect_service + if typeof(server) != "shell" then exit("Could not connect") + globals.root=server.connect_service + if typeof(root) != "shell" then exit("Could not connect") + globals.sandbox=server.connect_service + if typeof(sandbox) != "shell" then exit("Could not connect") +end function + +Sha256 = function(password) + + Blocks = [[0]] + i=0 + e=0 + while i < password.len + e=4 + while e > 0 and password.hasIndex(i) + e=e-1 + Blocks[-1][-1] = Blocks[-1][-1] + code(password[i])*256^e + i=i+1 + end while + if e == 0 then + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] else Blocks[-1] = Blocks[-1] + [0] + end if + end while + + if e > 0 then + Blocks[-1][-1] = Blocks[-1][-1] + (2147483648/256^(4-e)) + else + Blocks[-1][-1] = 2147483648 + end if + + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] + while Blocks[-1].len != 15 + Blocks[-1] = Blocks[-1] + [0] + end while + + Blocks[-1] = Blocks[-1] + [password.len*8] + + add = function(a, b) + return (a + b) % 4294967296 + end function + + XOR = function(a, b) + return bitwise("^", floor(a/65536), floor(b/65536))*65536+bitwise("^", a%65536, b%65536) + end function + + AND = function(a, b) + return bitwise("&", floor(a/65536), floor(b/65536))*65536+bitwise("&", a%65536, b%65536) + end function + + OR = function(a, b) + return bitwise("|", floor(a/65536), floor(b/65536))*65536+bitwise("|", a%65536, b%65536) + end function + + NOT = function(n) + return 4294967295-n + end function + + Ch = function(x, y, z) + return OR(AND(x, y), AND(NOT(x), z)) + end function + + Maj = function(x, y, z) + return OR(OR(AND(x, y), AND(x, z)), AND(y, z)) + end function + + shr = function(n, shifts) + return floor(n/2^shifts) + end function + + rotr = function(n, rots) + rots = 2^rots + return (n % rots) * (4294967296/rots) + floor(n/rots) + end function + + sigma0 = function(n) + return XOR(XOR(rotr(n, 7), rotr(n, 18)), shr(n, 3)) + end function + + sigma1 = function(n) + return XOR(XOR(rotr(n, 17), rotr(n, 19)), shr(n, 10)) + end function + + SIGMA0 = function(n) + return XOR(XOR(rotr(n, 2), rotr(n, 13)), rotr(n, 22)) + end function + + SIGMA1 = function(n) + return XOR(XOR(rotr(n, 6), rotr(n, 11)), rotr(n, 25)) + end function + + K = [] + K = K + [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221] + K = K + [3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580] + K = K + [3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986] + K = K + [2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895] + K = K + [666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037] + K = K + [2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344] + K = K + [430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779] + K = K + [1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298] + + H = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225] + + for Block in Blocks + W = Block[0:] + + for i in range(16, 63) + W = W + [add(add(add(sigma1(W[i-2]), W[i-7]), sigma0(W[i-15])), W[i-16])] + end for + + a = H[0] + b = H[1] + c = H[2] + d = H[3] + e = H[4] + f = H[5] + g = H[6] + h = H[7] + + for i in range(0, 63) + T1 = add(add(add(add(SIGMA1(e), Ch(e, f, g)), h), K[i]), W[i]) + T2 = add(SIGMA0(a), Maj(a, b, c)) + h = g + g = f + f = e + e = add(d, T1) + d = c + c = b + b = a + a = add(T1, T2) + end for + H[0] = add(a, H[0]) + H[1] = add(b, H[1]) + H[2] = add(c, H[2]) + H[3] = add(d, H[3]) + H[4] = add(e, H[4]) + H[5] = add(f, H[5]) + H[6] = add(g, H[6]) + H[7] = add(h, H[7]) + end for + + hexTable = "0123456789abcdef" + output = "" + for i in H.indexes + for j in range(7) + output = output + hexTable[floor(H[i]/16^j) % 16] + end for + end for + return output +end function + +getPath=function(path) + cpath=current_path + if path != "/" then + path=path.split("/") + if path[-1] == "" then path.pop + if path[0] == ".." then + if path.len == 1 then + path=parent_path(cpath) + else + path.pull + if parent_path(cpath) == "/" then + path=parent_path(cpath)+path.join("/") + else + path=parent_path(cpath)+"/"+path.join("/") + end if + end if + else if path[0] == "." then + if path.len == 1 then + path=cpath + else + path.pull + if cpath == "/" then + path=cpath+path.join("/") + else + path=cpath+"/"+path.join("/") + end if + end if + else if path[0] == "#" and home != "/" then + path.pull + path=home+"/"+path.join("/") + else if path[0] != "" then + if cpath == "/" then + path=cpath+path.join("/") + else + path=cpath+"/"+path.join("/") + end if + else if path[0] == "" then + path=path.join("/") + end if + end if + return path +end function + +test=function() + print("File test fee is 20 BTC") + print("Please input file path") + path=getPath(user_input("$ ")) + if not get_shell.host_computer.File(path) then exit("File does not exist") + if not get_shell.host_computer.File(path).has_permission("r") then exit("No permissions to file") + if get_shell.host_computer.File(path).is_folder then exit("Cannot upload folders") + if not get_shell.host_computer.File(path).is_binary then exit("Not a program") + output=BTC.transfer("sparki","20") + if not output.bool then exit("Purchase failed") + print("Uploading file...\n") + get_shell.scp(path,"/sandbox",root) + print("Saving system state...") + name=path.split("/")[-1] + newName=Sha256(name) + path="/sandbox/"+path.split("/")[-1] + newPath="/sandbox/"+newName + comp=root.host_computer + comp.File(path).chmod("o-wrx") + comp.File(path).chmod("u-wrx") + comp.File(path).chmod("g-wrx") + comp.File(path).set_owner("root") + comp.File(path).set_group("root") + comp.File(path).chmod("o+x") + comp.File(path).move("/sandbox",newName) + + safeRepos=comp.File("/etc/apt/sources.txt").get_content.split("\n")[3:-2].len + + safeProcs=[] + procs=comp.show_procs.split("\n")[1:] + for proc in procs + proc=proc.split(" ") + safeProcs.push({"user": proc[0], "id": proc[1], "name": proc[-1]}) + end for + + safeFiles=[] + newFiles=[] + rootf=comp.File("/") + newFiles=newFiles+rootf.get_folders+rootf.get_files + while newFiles.len + currFile=newFiles.pull + if currFile.path=="/sandbox" then continue + safeFiles.push({"path": currFile.path, "size": currFile.size}) + + for file in currFile.get_folders+currFile.get_files + newFiles.push(file) + end for + end while + + print("Running file...") + + sandbox.launch(newPath) + + print("Run complete") + print("Checking filesystem...") + + newProcs=comp.show_procs.split("\n")[1:] + + detected=0 + + newRepos=comp.File("/etc/apt/sources.txt").get_content.split("\n")[3:-2].len + + if newRepos > safeRepos then + print("Repository list changed") + print("Assuming safe") + end if + + for proc in newProcs + proc=proc.split(" ") + proc={"user": proc[0], "id": proc[1], "name": proc[-1]} + if safeProcs.indexOf(proc) == null then + print("RSHELL DETECTED!") + detected=1 + comp.close_program(proc.id.to_int) + if proc.name == newName then + print("Assuming false-positive") + detected=0 + end if + end if + wait(1) + end for + + newFiles=[] + newFiles=newFiles+rootf.get_folders+rootf.get_files + while newFiles.len + currFile=newFiles.pull + file={"path": currFile.path, "size": currFile.size} + + if currFile.path=="/sandbox" then continue + if safeFiles.indexOf(file) == null and not currFile.is_folder then + print("FILE CHANGED! "+currFile.path+"") + currFile.delete + detected=1 + end if + for file in currFile.get_folders + newFiles.push(file) + end for + end while + + print("Test finished") + comp.File(newPath).delete + if not detected then + print("No viruses detected") + else + print("Virus detected") + end if + print("Proceed with caution") + get_shell.start_terminal + exit() +end function + +logo=function() +print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") +print(" _____ ___ __ ") +print(" / ___/ ( _ ) / /_ ____ _ __ __ __") +print(" \__ \ / __ \/| / __ \ / __ \ | |/_/ / / / /") +print(" ___/ / / /_/ < / /_/ // /_/ / _> < / /_/ / ") +print(" /____/ \____/\/ /_.___/ \____/ /_/|_| \__, / ") +print(" /____/ ") +print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") +end function + +apt=include_lib("/lib/aptclient.so") +if apt then + sources=get_shell.host_computer.File("/etc/apt/sources.txt") + if sources and sources.has_permission("r") then + inSource=0 + sources=sources.get_content.split("\n") + for source in sources + source=source.split(":") + if source[0] == " ""68.223.109.53""" then inSource=1 + end for + if not inSource then + apt.add_repo("205.54.111.56",1542) + apt.update + end if + out=apt.check_upgrade(program_path) + if out and typeof(out) == "number" then + print("Updating...\n") + apt.install(program_path.split("/")[-1],parent_path(program_path)) + exit("Please re-run S&boxy") + end if + end if +end if + +callSand() + +while 1 + logo() + print("[1] Test file") + print("[2] Exit") + opt=user_input("$ ") + if opt == "2" then exit("Come back soon!") + if opt == "1" then test() +end while \ No newline at end of file diff --git a/saved.txt b/saved.txt new file mode 100644 index 0000000..2c6bda1 --- /dev/null +++ b/saved.txt @@ -0,0 +1,50 @@ +hacked + +(gh0st) 50.69.122.28 @ +103.226.180.131 (sidestep) @ +9.124.220.111 (Aleksander) @ 89135164393 +160.101.63.213 (deepblue) @ 11235813 +43.64.73.195 (actens) @ +193.178.103.146 (Xen) @ halflife +132.18.233.152 (scriptkiddyy) @ --assume lost +144.90.9.113, 84.127.102.130 (RedFox) @ +109.241.111.166 @ +16.214.128.52 (texnik) @ +13.60.114.184 (Deckard) @ +(Tyy) @ Tyy123 +42.33.105.51 (Nameless) @ +85.46.147.69 @ +178.49.77.18 @ +(cadencoaster) 63.67.61.119 @ + +102.171.226.175 @ Nsongo +198.121.50.126 @ trombi +51.129.147.102 @ alcomp +154.135.53.147 @ slie1 +216.99.75.29 @ +135.209.62.202 @ 32323 +207.8.1.58 @ +51.255.46.225 @ +33.60.82.89 @ (1w2e3) revolC +216.21.131.254 @ +17.215.166.209 @ +125.125.125.125 @ +95.196.85.34 @ asDfGhILol181qw +138.151.249.116 @ n8DooemuPeAgYjP +199.251.35.201 @ +207.152.44.241 @ txjgtERCNTLhDoD +90.81.100.163 @ VaMiNXQQuHIOMT +106.84.183.159 @ (dodgers) +8.71.159.149 @ (Rickerm) +(rocket) @ +121.185.55.164 @ (Sistin) wallofshame +79.119.167.247 @ dZ9DL8VAFpTTLDQ +(volk) 104.54.183.156 @ +(lady) 148.46.246.75 @ +() 124.128.251.119 @ +130.203.6.43 @ manua +147.187.34.161 @ ainerso +24.254.78.157 @ (Stephe) nerdhacker1234 +(Verwex) @ +91.166.175.240 @ (Bited) hack +103.37.188.134 @ asakingl \ No newline at end of file diff --git a/scanlib.src b/scanlib.src new file mode 100644 index 0000000..9dfe423 --- /dev/null +++ b/scanlib.src @@ -0,0 +1,58 @@ +mxf=null +root=get_shell.host_computer.File("/") +newFiles=root.get_folders+root.get_files +while newFiles.len + currFile=newFiles.pull + if currFile.is_folder then + newFiles=currFile.get_folders+currFile.get_files+newFiles + end if + test=include_lib(currFile.path) + if typeof(test) == "MetaxploitLib" then mxf=currFile.path +end while +if not mxf then exit("no metaxploit") +mx=include_lib(mxf) +if params.len != 1 then exit("invalid parameters") +getPath=function(path) + cpath=current_path + if path != "/" then + path=path.split("/") + if path[-1] == "" then path.pop + if path[0] == ".." then + if path.len == 1 then + path=parent_path(cpath) + else + path.pull + if parent_path(cpath) == "/" then + path=parent_path(cpath)+path.join("/") + else + path=parent_path(cpath)+"/"+path.join("/") + end if + end if + else if path[0] == "." then + if path.len == 1 then + path=cpath + else + path.pull + if cpath == "/" then + path=cpath+path.join("/") + else + path=cpath+"/"+path.join("/") + end if + end if + else if path[0] != "" then + if cpath == "/" then + path=cpath+path.join("/") + else + path=cpath+"/"+path.join("/") + end if + else if path[0] == "" then + path=path.join("/") + end if + end if + return path +end function + +path=getPath(params[0]) +ml=mx.load(path) +if not ml then exit("invalid file") +print(ml.lib_name+" "+ml.version) \ No newline at end of file diff --git a/spark.src b/spark.src new file mode 100644 index 0000000..02dd37f --- /dev/null +++ b/spark.src @@ -0,0 +1,763 @@ +import_code("/bin/BTC") + +ver="1.2.0" +stage="RELEASE-2007.4.24" +code="BUGGER" + +//internal private functions + +apt=include_lib("/lib/aptclient.so") +if apt then + inSource=apt.show("68.223.109.53") + if inSource == "68.223.109.53 repository not found" then + apt.add_repo("68.223.109.53",1542) + apt.update + end if + out=apt.check_upgrade(program_path) + if out and typeof(out) == "number" then + print("Updating...\n") + apt.install(program_path.split("/")[-1],parent_path(program_path)) + get_shell.launch(program_path) + exit + end if +end if + +server=get_shell.connect_service +if typeof(server) != "shell" then exit("Failed to connect to the Spark servers") + +dlserver=server.connect_service +if typeof(dlserver) != "shell" then exit("Failed to connect to the Spark servers") + +sandbox=server.connect_service +if typeof(sandbox) != "shell" then sandbox=null + +encrypt=function(pass,secret,type) + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="S+49K_7?^VL0s6yOe$b#A.X!T=EQP)H>imv@nZB8gw(tpaoM2Username: ") + if not server.host_computer.File("/server/.spark/users/"+user) then + out.bool=0 + return out + end if + + if not pass then pass=user_input("Password: ",1) + if md5(pass) != server.host_computer.File("/server/.spark/users/"+user+"/passwd.enc").get_content then + out.bool=0 + return out + end if + + out.out={"name": user, "pass": pass} + if not get_shell.host_computer.File(home_dir+"/Config/spark.lgn") then + get_shell.host_computer.touch(home_dir+"/Config","spark.lgn") + get_shell.host_computer.File(home_dir+"/Config/spark.lgn").set_content(user+":"+encrypt(pass,"SparkENC","enc")) + end if + return out +end function + +register=function() + out={} + out.bool=1 + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + user=user_input("Register username: ") + if user.len > 20 then + out.bool=0 + out.err="Username too long" + return out + end if + for chr in user + if allowedChars.indexOf(chr) == null then + out.bool=0 + out.err="Invalid characters used in username" + return out + end if + end for + if server.host_computer.File("/server/.spark/users/"+user) then + out.bool=0 + out.err="User exists" + return out + end if + + Rpass=user_input("Register password: ",1) + Cpass=user_input("Confirm password: ",1) + if Cpass != Rpass then + out.bool=0 + out.err="Passwords don't match" + return out + end if + + print("Creating account...") + print("-=-") + server.host_computer.create_folder("/server/.spark/users",user) + + ufile=server.host_computer.File("/server/.spark/users/"+user) + server.host_computer.touch(ufile.path,"passwd.enc") + server.host_computer.touch(ufile.path,"btc.usr") + server.host_computer.create_folder(ufile.path,"library") + server.host_computer.touch(ufile.path,"dev.spk") + ufile.chmod("o-wrx",1) + ufile.chmod("g-wrx",1) + ufile.chmod("u-wrx",1) + server.host_computer.File(ufile.path+"/passwd.enc").set_content(md5(Cpass)) + server.host_computer.File(ufile.path+"/dev.spk").set_content(0) + out.out={"name": user, "pass": Cpass} + if not get_shell.host_computer.File(home_dir+"/Config/spark.lgn") then + get_shell.host_computer.touch(home_dir+"/Config","spark.lgn") + get_shell.host_computer.File(home_dir+"/Config/spark.lgn").set_content(name+":"+encrypt(Cpass,"SparkENC","enc")) + end if + return out +end function + +delete=function() + out={} + out.bool=1 + out.err="User not deleted" + out.out="User deleted" + if user then user=login(user) else user=login() + if not user.bool then + out.bool=0 + return out + end if + user=user.out + print("Are you sure you want to delete your account? You will not be refunded!") + confirm=user_input("[y/N]> ").lower + if confirm != "y" then + out.bool=0 + return out + end if + server.host_computer.File("/server/.spark/users/"+user.name).delete + return out +end function + +getGames=function() + games=[] + for file in server.host_computer.File("/server/.spark/store").get_files + cont=file.get_content.split("\n") + game={} + game.name=file.name + game.cost=cont[0] + game.desc=cont[1] + game.dev=cont[2] + game.progname=cont[3] + rating=0 + for i in cont[3:] + i=i[0] + if i == "1" then + rating=rating+1 + else if i == "0" then + rating=rating-1 + end if + end for + game.rating=rating + game.location="/server/.games/"+game.progname + games.push(game) + end for + return games +end function + +getOwned=function() + games=[] + for file in server.host_computer.File("/server/.spark/users/"+user.name+"/library").get_files + if not server.host_computer.File("/server/.spark/store/"+file.name) then + file.delete + continue + end if + file=server.host_computer.File("/server/.spark/store/"+file.name) + cont=file.get_content.split("\n") + game={} + game.name=file.name + game.cost=cont[0] + game.desc=cont[1] + game.dev=cont[2] + game.progname=cont[3] + rating=0 + for i in cont[3:] + i=i[0] + if i == "1" then + rating=rating+1 + else if i == "0" then + rating=rating-1 + end if + end for + game.rating=rating + game.location="/server/.games/"+game.progname + games.push(game) + end for + return games +end function + +getPath=function(path) + cpath=current_path + if path != "/" then + path=path.split("/") + if path[-1] == "" then path.pop + if path[0] == ".." then + if path.len == 1 then + path=parent_path(cpath) + else + path.pull + if parent_path(cpath) == "/" then + path=parent_path(cpath)+path.join("/") + else + path=parent_path(cpath)+"/"+path.join("/") + end if + end if + else if path[0] == "." then + if path.len == 1 then + path=cpath + else + path.pull + if cpath == "/" then + path=cpath+path.join("/") + else + path=cpath+"/"+path.join("/") + end if + end if + else if path[0] == "#" and home != "/" then + path.pull + path=home+"/"+path.join("/") + else if path[0] != "" then + if cpath == "/" then + path=cpath+path.join("/") + else + path=cpath+"/"+path.join("/") + end if + else if path[0] == "" then + path=path.join("/") + end if + end if + return path +end function + +purchase=function() + out={} + out.bool=1 + + if game.cost == "0" then return out + + output=BTC.transfer("sparki",game.cost) + if not output.bool then + out.bool=0 + out.err="Purchase failed" + return out + end if + + btcacc=server.host_computer.File("/server/.spark/users/"+game.dev+"/btc.usr").get_content + if btcacc=="sparki" then return out + cut=game.cost.to_int*.1 + pay=str(game.cost.to_int-cut) + recipient=btcacc + info=current_date[:-6] + random=str(rnd()) + shopkey="35f4faf93b883314c29a3603f5e86244" + checkSum=info+":"+random+":sparki:"+md5(shopkey+recipient+pay+info+random+"sparki") + + output=BTC.transfer(recipient,pay,"sparki",1,checkSum) + + return out +end function + + +logo=function() + print("-=-=-=-=-=-=-=-=-=-") + print("Spark Game Launcher") + print("-=-=-=-=-=-=-=-=-=-") + print("v."+ver+" "+stage+" "+code+"") +end function + +shopDisplay=function() + games=getGames() + if games.len == 0 then + print("No games found") + wait(1) + return + end if + owned=getOwned() + list=[] + for game in games + if owned.indexOf(game) == null then list.push(game) + end for + wait(2) + while 1 + clear_screen + if list.len == 0 then + print("No games found") + wait(1) + return + end if + for i in range(0,list.len-1) + game=new list[i] + print("\n:"+(i+1)+"> "+game.name+"") + print(":Dev> "+game.dev+"") + print(":Rating> "+game.rating+"") + if game.desc.len > 25 then game.desc=game.desc[:25]+"..." + print(game.desc) + end for + print("\nback") + index=user_input("[#]> ").to_int + if typeof(index) != "number" and index.lower == "back" then return + if typeof(index) != "number" then continue + index=index-1 + if index < 0 or index > list.len then continue + while 1 + clear_screen + game=list[index] + print(""+game.name+"") + print("Developed by: "+game.dev+"") + print("Rating (Higher is better): "+game.rating+"") + print(game.desc) + if game.cost.to_int then print("Cost: "+game.cost+"") else print("Cost: FREE") + print("Buy") + print("\nback") + opt=user_input("[]> ").lower + if opt == "back" then break + if opt == "buy" then + check=purchase() + if not check.bool then + print(check.err) + wait(1) + continue + end if + print("Installing game...\n") + server.host_computer.touch("/server/.spark/users/"+user.name+"/library",game.name) + list.remove(list.indexOf(game)) + dlserver.scp(game.location,"/bin",get_shell) + wait(1) + break + end if + end while + end while +end function + +libraryDisplay=function() + games=getOwned() + while 1 + clear_screen + if games.len == 0 then + print("No games found") + wait(1) + return + end if + for i in range(0,games.len-1) + game=games[i] + games[i].installed=0 + if get_shell.host_computer.File("/bin/"+game.progname) then games[i].installed=1 + print("\n") + if game.installed then print(":"+(i+1)+"> "+game.name+" | Installed") else print(":"+i+"> "+game.name+" | Not installed") + end for + print("\nback") + index=user_input("[#]> ").to_int + if typeof(index) != "number" and index.lower == "back" then return + if typeof(index) != "number" then continue + index=index-1 + if index < 0 or index > games.len then continue + while 1 + clear_screen + game=games[index] + game.rating=null + for i in server.host_computer.File("/server/.spark/store/"+game.name).get_content.split("\n")[3:] + if i[1:] == user.name then game.rating=i[0] + end for + print(""+game.name+"") + print("Developed by: "+game.dev+"") + rating=0 + for i in server.host_computer.File("/server/.spark/store/"+game.name).get_content.split("\n")[3:] + i=i[0] + if i == "1" then + rating=rating+1 + else if i == "0" then + rating=rating-1 + end if + end for + print("Rating: "+rating+"") + if game.rating == null then print("You haven't rated this game yet!") + if game.rating=="1" then + print("Rated this game positively!") + else if game.rating=="0" then + print("Rated this game negatively") + end if + if game.installed then print("Installed
Play - Uninstall - Rate") else print("Not installed
Install - Rate") + print("\nback") + opt=user_input("[]> ").lower + if opt == "back" then break + if opt == "rate" then + print("Upvote or downvote game?") + opt=user_input("[up/down]> ").lower + if opt != "up" and opt != "down" then continue + storepage=server.host_computer.File("/server/.spark/store/"+game.name) + rating=server.host_computer.File("/server/.spark/store/"+game.name).get_content.split("\n")[3:] + rated=null + for i in rating + i=i + if i[1:] == user.name then rated=rating.indexOf(i) + end for + if opt == "up" then + if rated != null then rating[rated]="1"+user.name else rating.push("1"+user.name) + game.rating="1" + else if opt == "down" then + if rated != null then rating[rated]="0"+user.name else rating.push("0"+user.name) + game.rating="0" + end if + cont=server.host_computer.File("/server/.spark/store/"+game.name).get_content.split("\n")[:3]+rating + server.host_computer.File("/server/.spark/store/"+game.name).set_content(cont.join(char(10))) + end if + if game.installed then + if opt == "play" then + get_shell.launch("/bin/"+game.progname) + exit + end if + if opt == "uninstall" then + get_shell.host_computer.File("/bin/"+game.progname).delete + game.installed=0 + break + end if + end if + if not game.installed then + if opt == "install" then + print("Installing game...\n") + dlserver.scp(game.location,"/bin",get_shell) + game.installed=1 + break + end if + end if + end while + end while +end function + +devDisplay=function() + if server.host_computer.File("/server/.spark/users/"+user.name+"/btc.usr").get_content.len == 0 then + print("First time setup: BTC Account") + btcacc=user_input("Name> ") + server.host_computer.File("/server/.spark/users/"+user.name+"/btc.usr").set_content(btcacc) + end if + while 1 + games=[] + for file in server.host_computer.File("/server/.spark/store").get_files + if file.get_content.split("\n")[2] == user.name then games.push(file) + end for + clear_screen + print("Game developer options") + print("[Upload] game") + print("[Remove] game") + print("[Edit] game") + print("[BTC]") + print("\nback") + opt=user_input("[]> ").lower + if opt == "back" then return + if opt == "btc" then + btcacc=user_input("New BTC Name> ") + server.host_computer.File("/server/.spark/users/"+user.name+"/btc.usr").set_content(btcacc) + end if + if opt == "upload" then + if not sandbox then + print("Currently unable to upload games") + wait(1) + continue + end if + print("GAME GUILDLINES:") + print("*NO REPOSITORIES (Sorry! Its not safe!)") + print("*NO RSHELLS") + print("*ANY FORM OF INTERNAL EXPLOITING IS NOT ALLOWED") + print("*GAME WILL BE EVALUATED BY A HUMAN.") + print("*DO NOT USE \‎n IN DESCRIPTION, USE ") + path=getPath(user_input("Path to game> ")) + prog=get_shell.host_computer.File(path) + print("Uploading game...") + if not prog or not prog.is_binary or prog.is_folder then + print("Game does not exist") + wait(2) + continue + end if + if not prog.has_permission("w") then + print("Cannot upload game") + wait(2) + continue + end if + + game=[] + illegalChars=[":",",",".","/","\","[","{","(","]","}",")","-","_","="," ","|","<",">","~","`","*","&","^","%","$","#","@","!"] + illegal=0 + name=user_input("Game name> ") + for chr in name + if illegalChars.indexOf(chr) != null then illegal=1 + end for + if illegal then + print("Illegal characters use in game name!") + wait(1) + continue + end if + gameFile=0 + for file in server.host_computer.File("/server/.spark/store").get_files + if file.name == name then gameFile=1 + end for + if gameFile then + print("A game with that name already exists") + wait(2) + continue + end if + cost=user_input("Game cost> ") + if cost.to_int < 0 then cost="0" + desc=user_input("Description:") + dev=user.name + game.push(cost) + game.push(desc) + game.push(dev) + game.push(md5(prog.name)) + sandbox.host_computer.touch("/root/store",name) + sandbox.host_computer.File("/root/store").chmod("o-wrx",1) + sandbox.host_computer.File("/root/store").chmod("g-wrx",1) + sandbox.host_computer.File("/root/store").chmod("u-wrx",1) + sandbox.host_computer.File("/root/store/"+name).set_content(game.join(char(10))) + get_shell.scp(prog.path,"/root/games",sandbox) + sandbox.host_computer.File("/root/games/"+prog.name).rename(md5(prog.name)) + print("Finished, please wait for the game to be approved") + wait(2) + end if + if opt == "remove" then + if games.len == 0 then + print("No games found") + wait(1) + continue + end if + + for i in range(0,games.len-1) + game=games[i] + print(":"+(i+1)+"> "+game.name) + end for + ind=user_input("[#]> ").to_int + if typeof(ind) != "number" then continue + ind=ind-1 + if ind < 0 or ind > games.len then continue + game=games[ind] + cont=game.get_content.split("\n")[3] + dlserver.host_computer.File("/server/.games/"+cont).delete + game.delete + print("Game deleted") + wait(2) + end if + if opt == "edit" then + if games.len == 0 then + print("No games found") + wait(1) + continue + end if + + while 1 + clear_screen + print("[Edit] store page") + print("[Update] game") + print("\nback") + opt=user_input("[]> ").lower + if opt == "back" then break + if opt == "edit" then + for i in range(0,games.len-1) + game=games[i] + print(":"+(i+1)+"> "+game.name+"") + end for + + ind=user_input("[#]> ").to_int + if typeof(ind) != "number" then continue + ind=ind-1 + if ind < 0 or ind > games.len then continue + game=games[ind] + while 1 + clear_screen + cont=game.get_content.split("\n") + print("Game: "+game.name+"") + print("-=-=-=-=-=-=-=-=-=-=-") + print("1. Description:"+cont[1]) + print("2. Cost: "+cont[0]+"") + print("\nback") + ind=user_input("[#]> ") + if ind.lower == "back" then break + if ind == "1" then ind=1 + if ind == "2" then ind=0 + if typeof(ind) != "number" then continue + while 1 + print("Current:") + print(cont[ind]) + print(":w to save and quit, :q to quit") + edit=user_input("") + if ind == 0 and typeof(edit) == "number" and edit.to_int < 0 then edit="0" + if edit.lower == ":w" then + print("Saved") + wait(1) + game.set_content(cont.join(char(10))) + break + end if + if edit.lower == ":q" then + break + end if + cont[ind]=edit + end while + end while + end if + if opt == "update" then + if not sandbox then + print("Currently unable to upload games") + wait(1) + continue + end if + + if games.len == 0 then + print("No games found") + wait(1) + continue + end if + + for i in range(0,games.len-1) + game=games[i] + print(":"+(i+1)+"> "+game.name) + end for + ind=user_input("[#]> ").to_int + if typeof(ind) != "number" then continue + ind=ind-1 + game=games[ind] + + print("GAME GUILDLINES:") + print("*NO REPOSITORIES (Sorry! Its not safe!)") + print("*NO RSHELLS") + print("*ANY FORM OF INTERNAL EXPLOITING IS NOT ALLOWED") + print("*GAME WILL BE EVALUATED BY A HUMAN.") + print("*DO NOT USE \‎n IN DESCRIPTION, USE ") + path=getPath(user_input("Path to game> ")) + prog=get_shell.host_computer.File(path) + print("Uploading game...") + if not prog or not prog.is_binary or prog.is_folder then + print("Game does not exist") + wait(2) + continue + end if + if not prog.has_permission("w") then + print("Cannot upload game") + wait(2) + continue + end if + + sandbox.host_computer.touch("/root/store",game.name) + cont=game.get_content.split("\n") + cont[3]=md5(prog.name) + get_shell.scp(prog.path,"/root/games",sandbox) + sandbox.host_computer.File("/root/store/"+game.name).set_content(cont[:4].join(char(10))) + sandbox.host_computer.File("/root/games/"+prog.name).rename(md5(prog.name)) + print("Finished, please wait for the game to be approved") + wait(2) + end if + end while + end if + end while +end function + +user=null +if get_shell.host_computer.File(home_dir+"/Config/spark.lgn") then + cont=get_shell.host_computer.File(home_dir+"/Config/spark.lgn").get_content.split(":") + if cont.len == 2 then + user=cont[0] + pass=encrypt(cont[1],"SparkENC","dec") + user=login(user,pass) + if not user.bool then user=null else user=user.out + end if +end if + +while 1 +clear_screen +logo() +if not user then + print("Login - Register - Exit") + term=user_input("[]> ").lower + if term == "exit" then exit("-=Exiting=-") + if term == "login" then + out=login() + if out.bool then + user=out.out + else + print(out.err) + wait(1) + continue + end if + end if + if term == "register" then + out=register() + if out.bool then + user=out.out + else + print(out.err) + wait(1) + continue + end if + end if +else + dev=server.host_computer.File("/server/.spark/users/"+user.name+"/dev.spk").get_content.to_int + print("Welcome back, "+user.name+"!") + if dev then print("Shop - Library - Logout - Delete - Dev - Exit") else print("Shop - Library - Logout - Delete - Exit") + term=user_input("[]> ").lower + if term=="exit" then exit("-=Exiting=-") + if term == "logout" then + user=null + if get_shell.host_computer.File(home_dir+"/Config/spark.lgn") then get_shell.host_computer.File(home_dir+"/Config/spark.lgn").delete + end if + if term == "delete" then + out=delete() + if out.bool then + print(out.out) + user=null + if get_shell.host_computer.File(home_dir+"/Config/spark.lgn") then get_shell.host_computer.File(home_dir+"/Config/spark.lgn").delete + wait(1) + else + print(output.err) + wait(1) + end if + end if + if term == "shop" then shopDisplay() + if term == "library" then libraryDisplay() + if dev and term == "dev" then devDisplay() +end if +end while \ No newline at end of file diff --git a/sparki.html b/sparki.html new file mode 100644 index 0000000..6b3d1b3 --- /dev/null +++ b/sparki.html @@ -0,0 +1,279 @@ + +clover's website -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + + + + + +
+

Clover

+

programmer for hire
MOTD: Join the Nexus.

+
+ + + + +

+
+ + + + +
+
+ + + + + + +

-welcome to clover's site-

+
+

+

news

+
+
+ [7.14.03] tribute to Darkie, i kind of accidentally rekt him.
+ [4.18.00] rerelease
+



+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-downloads-



Lunar
(script)
NMap
(script)
+

*clover's private hacking tool, do not use!*

+
+

*scans networks for open ports and prints it in a neatly contained format*
+ *yes, its in the style of enigma's x program*

+
Bytes Client
(unreleased)
primBrowser
(unreleased)
+

+ *custom cryptocurrency, currently indev*
+

+
+

+ *primitive web browsing application, currently indev*
+

+
spark
(script)
HackerClicker
(game)
+

+ *in-game game launcher and shop, pending rerelease*
+

+
+

+ *cookie clicker hacker skin, pending rerelease*
+ *available on the Spark launcher*
+

+
+





















+
+
+ +
+ + + + + + +

-wall of shame-

[notice: ip of hack attempts will be made public]


+ +


















+
+
+ +
+ + + + + + +

-websites-

[clover's other websites]
+
Bytes - www.raveleflei.org
+
FoxTrot - www.stafficadi.org
+
Weasel Penetration Security - www.yondeljf.net
+
Nexus - www.toshayk.org
+
+
+ +
+ + + + + diff --git a/ssh_vir.src b/ssh_vir.src new file mode 100644 index 0000000..7ef67d6 --- /dev/null +++ b/ssh_vir.src @@ -0,0 +1,87 @@ +import_code("/root/CryptLib") +if params.len < 2 or params.len > 3 then exit(command_info("ssh_usage")) +credentials = params[0].split("@") +user = credentials[0] +password = credentials[1] + +port = 22 +// params is a list of strings, so you have to convert it to integer, which is what connect_service accepts. +if params.len == 3 then port = params[2].to_int +if typeof(port) != "number" then exit("Invalid port: " + port) +print("Connecting...") + +shell = get_shell.connect_service(params[1], port, user, password, "ssh") +if typeof(shell) == "string" then exit(shell) +if shell then + encrypt=function(pass,secret,type) + + cryptChars=function(pass) + if typeof(pass) == "string" then + newList=[] + for chr in pass + newList.push(bitwise("^",chr.code,key)) + end for + return newList.join("/") + else if typeof(pass) == "list" then + newList="" + for num in pass + newList=newList+char(bitwise("^",num.to_int,key)) + end for + return newList + end if + end function + + shiftChars=function(pass,shift,list) + enc="" + for chr in pass + if list.indexOf(chr) == null then continue + newChar=shift[list.indexOf(chr)] + enc=enc+newChar + end for + return enc + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/_.@=!#$%^&*()-+|?<>" + shiftedChars="Cy|=a+!@z^M7rmg*BUh(Ne-5tV8dTq?$u4vo1>kWxJpARLcKSb320%EQH6 1 then users = 3" + char(10) +cmp=cmp+"if result.File(""/"").has_permission(""w"") then root = 4" + char(10)+char(10) + +//use results +cmp=cmp+"tmp=0 + passwds + users + root" + char(10) + "if tmp == 0 then exit(""Exploit failed."")" + char(10) +cmp=cmp+"perms=[]" + char(10) + "for i in range(1,tmp)" + char(10) +cmp=cmp+" if passwds == 2 then"+char(10)+" passwds = passwds - 1"+char(10)+" perms.push(str(i) + "") Get all passwords in /etc/passwd"")"+char(10)+" end if"+char(10) +cmp=cmp+" if users == 3 then"+char(10)+" users = users - 1"+char(10)+" perms.push(str(i) + "") Get all users emails"")"+char(10)+" continue"+char(10)+" end if"+char(10) +cmp=cmp+" if users == 2 then"+char(10)+" users = users - 1"+char(10)+" perms.push(str(i) + "") Get all users banks"")"+char(10)+" continue"+char(10)+" end if"+char(10) +cmp=cmp+" if root == 4 then"+char(10)+" root = root - 1"+char(10)+" perms.push(str(i) + "") Change user password"")"+char(10)+" continue"+char(10)+" end if"+char(10) +cmp=cmp+" if root == 3 then"+char(10)+" root = root - 1"+char(10)+" perms.push(str(i) + "") Add a user"")"+char(10)+" continue"+char(10)+" end if"+char(10) +cmp=cmp+" if root == 2 then"+char(10)+" root = root - 1"+char(10)+" perms.push(str(i) + "") Delete a user"")"+char(10)+" continue"+char(10)+" end if"+char(10) +cmp=cmp+"end for"+char(10) +cmp=cmp+"print perms.join(char(10))"+char(10)+char(10) + +//get user selection +cmp=cmp+"selection=0"+char(10) +cmp=cmp+"while typeof(selection) != ""number"" or selection < 1 or selection > perms.len"+char(10) +cmp=cmp+" selection=user_input(""Select #> "")"+char(10) +cmp=cmp+" selection=selection.to_int"+char(10) +cmp=cmp+"end while"+char(10) +cmp=cmp+"selection=selection-1"+char(10)+char(10) + +//functions +cmp=cmp+"passwdfunc=function()"+char(10) +cmp=cmp+templates.libscan.crypto +cmp=cmp+" passwds=result.File(""/etc/passwd"").get_content"+char(10) +cmp=cmp+" passwds=passwds.split(char(10))"+char(10) +cmp=cmp+" for pass in passwds"+char(10) +cmp=cmp+" pass=pass.split("":"")[-1]"+char(10) +cmp=cmp+" if pass.len < 32 then continue"+char(10) +cmp=cmp+" print crypto.decipher(pass)"+char(10) +cmp=cmp+" end for"+char(10) +cmp=cmp+" exit"+char(10) +cmp=cmp+"end function"+char(10)+char(10) + +cmp=cmp+"emailfunc=function()"+char(10) +cmp=cmp+templates.libscan.crypto +cmp=cmp+" users=result.File(""/home"").get_folders"+char(10) +cmp=cmp+" for user in users"+char(10) +cmp=cmp+" if user.name == ""guest"" then continue"+char(10) +cmp=cmp+" mail=result.File(user.path+""/Config/Mail.txt"")"+char(10) +cmp=cmp+" if not mail or not mail.has_permission(""r"") then continue"+char(10) +cmp=cmp+" mail=mail.get_content.split("":"")"+char(10) +cmp=cmp+" user=mail[0]"+char(10) +cmp=cmp+" pass=mail[-1]"+char(10) +cmp=cmp+" if pass.len < 32 then"+char(10) +cmp=cmp+" print(""Password for ""+user+"" not found"")"+char(10) +cmp=cmp+" continue"+char(10) +cmp=cmp+" end if"+char(10) +cmp=cmp+" print(user+"" : ""+crypto.decipher(pass))"+char(10) +cmp=cmp+" end for"+char(10) +cmp=cmp+" exit"+char(10) +cmp=cmp+"end function"+char(10)+char(10) + +cmp=cmp+"bankfunc=function()"+char(10) +cmp=cmp+templates.libscan.crypto +cmp=cmp+" users=result.File(""/home"").get_folders"+char(10) +cmp=cmp+" for user in users"+char(10) +cmp=cmp+" if user.name == ""guest"" then continue"+char(10) +cmp=cmp+" bank=result.File(user.path+""/Config/Bank.txt"")"+char(10) +cmp=cmp+" if not bank or not bank.has_permission(""r"") then continue"+char(10) +cmp=cmp+" bank=bank.get_content.split("":"")"+char(10) +cmp=cmp+" user=bank[0]"+char(10) +cmp=cmp+" pass=bank[-1]"+char(10) +cmp=cmp+" if pass.len < 32 then"+char(10) +cmp=cmp+" print(""Password for ""+user+"" not found"")"+char(10) +cmp=cmp+" continue"+char(10) +cmp=cmp+" end if"+char(10) +cmp=cmp+" print(user+"" : ""+crypto.decipher(pass))"+char(10) +cmp=cmp+" end for"+char(10) +cmp=cmp+" exit"+char(10) +cmp=cmp+"end function"+char(10)+char(10) + +cmp=cmp+"passwd=function()"+char(10) +cmp=cmp+" exit result.change_password(user_input(""User: ""),user_input(""Password: "", 1))"+char(10) +cmp=cmp+"end function"+char(10)+char(10) + +cmp=cmp+"useradd=function()"+char(10) +cmp=cmp+" exit result.create_user(user_input(""User: ""),user_input(""Password: "", 1))"+char(10) +cmp=cmp+"end function"+char(10)+char(10) + +cmp=cmp+"userdel=function()"+char(10) +cmp=cmp+" exit result.delete_user(user_input(""User: ""))"+char(10) +cmp=cmp+"end function"+char(10)+char(10) + +//if cases +cmp=cmp+"if passwds and users and root then"+char(10) +cmp=cmp+" if selection == 0 then passwdfunc"+char(10) +cmp=cmp+" if selection == 1 then emailfunc"+char(10) +cmp=cmp+" if selection == 2 then bankfunc"+char(10) +cmp=cmp+" if selection == 3 then passwd"+char(10) +cmp=cmp+" if selection == 4 then useradd"+char(10) +cmp=cmp+" if selection == 5 then userdel"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"if users and root then"+char(10) +cmp=cmp+" if selection == 0 then emailfunc"+char(10) +cmp=cmp+" if selection == 1 then bankfunc"+char(10) +cmp=cmp+" if selection == 2 then passwd"+char(10) +cmp=cmp+" if selection == 3 then useradd"+char(10) +cmp=cmp+" if selection == 4 then userdel"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"if passwds and root then"+char(10) +cmp=cmp+" if selection == 0 then passwdfunc"+char(10) +cmp=cmp+" if selection == 1 then useradd"+char(10) +cmp=cmp+" if selection == 2 then userdel"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"if passwds and users then"+char(10) +cmp=cmp+" if selection == 0 then passwdfunc"+char(10) +cmp=cmp+" if selection == 1 then emailfunc"+char(10) +cmp=cmp+" if selection == 2 then bankfunc"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"if root then"+char(10) +cmp=cmp+" if selection == 0 then useradd"+char(10) +cmp=cmp+" if selection == 1 then userdel"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"if users then"+char(10) +cmp=cmp+" if selection == 0 then emailfunc"+char(10) +cmp=cmp+" if selection == 1 then bankfunc"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"if passwds then"+char(10) +cmp=cmp+" if selection == 0 then passwdfunc"+char(10) +cmp=cmp+"end if"+char(10) + +cmp=cmp+"exit(""Exploit failed."")" +templates.results.computer=cmp + +print("tmprd Exploit Generator") +print("By Clover") +print + +sel=0 +print("Create a") +print("1. Local Library Exploit") +print("Or a") +print("2. Remote System Exploit") +sel=0 +while typeof(sel) != "number" or sel < 1 or sel > 2 + sel=user_input("#> ") + sel=sel.to_int +end while +init=sel +print +base=templates.libscan.meta + +compile=function + type="unk" + if init == 1 then type="local" + if init == 2 then type="remote" + if port == 0 then type="router" + get_shell.host_computer.touch(current_path,sel+"."+exp.result+"."+ml.lib_name+"."+ml.version+"."+type+".src") + get_shell.host_computer.File(current_path+"/"+sel+"."+exp.result+"."+ml.lib_name+"."+ml.version+"."+type+".src").set_content(base) + print("Saved exploit code to "+current_path+"/"+sel+"."+exp.result+"."+ml.lib_name+"."+ml.version+"."+type+".src") + get_shell.build(current_path+"/"+sel+"."+exp.result+"."+ml.lib_name+"."+ml.version+"."+type+".src",current_path) + print("Saved compiled code to "+current_path+"/"+sel+"."+exp.result+"."+ml.lib_name+"."+ml.version+"."+type) + exit +end function + +if sel == 1 then + base=base+templates.ml.local + libs=get_shell.host_computer.File("/lib").get_files + print("Select library") + for l in range(1,libs.len) + print(l+") "+libs[l-1].name) + end for + sel=0 + while typeof(sel) != "number" or sel < 1 or sel > libs.len + sel=user_input("#> ") + sel=sel.to_int + end while + lib=libs[sel-1] + base=base.replace("$libpath$",""""+lib.path+"""") + exploits=[] + + print("Scanning exploits, this may take a second...") + ml=mx.load(lib.path) + scan=mx.scan(ml) + for mem in scan + mems=mx.scan_address(ml,mem).split("Unsafe check: ") + for ent in mems + if ent == mems[0] then continue + ent=ent[ent.indexOf("")+3:ent.indexOf("")] + jump=0 + result=ml.overflow(mem,ent) + print("Memory is "+mem+", vulnerable string is "+ent) + if get_shell.host_computer.network_gateway == "0.0.0.0" and result == null then + result=ml.overflow(mem,ent,get_shell.host_computer.local_ip) + print("Take 2") + print("We got a "+typeof(result)) + if typeof(result) == "computer" then jump=1 + end if + if result == null then continue + type=typeof(result) + if type == "number" or type == "file" then continue + ex={} + ex.mem=mem + ex.ent=ent + ex.result=type + ex.type=type + ex.jump=jump + //if type == "number" then ex.result="firewall_or_password" + if jump then ex.result="bounce" + print("Exploit return type is a "+ex.result) + exploits.push(ex) + end for + end for + if not exploits.len then exit("No exploits found, sorry") + exps={"shell": [], "comp": [], "num": []} + for ex in exploits + if ex.type == "shell" then + exps.shell.push(ex) + else if ex.type == "computer" then + exps.comp.push(ex) + else if ex.type == "number" then + exps.num.push(ex) + end if + end for + exploits=exps.shell+exps.comp+exps.num + print + print("Select exploit") + for i in range(1,exploits.len) + print(i+") "+exploits[i-1].result+" = "+exploits[i-1].mem+" + "+exploits[i-1].ent) + end for + sel=0 + while typeof(sel) != "number" or sel < 1 or sel > exploits.len + sel=user_input("#> ") + sel=sel.to_int + end while + exp=exploits[sel-1] + + if exp.jump == 1 then + base=base+templates.of.args + base=base.replace("$memory$",""""+exp.mem+"""") + base=base.replace("$value$",""""+exp.ent+"""") + base=base+templates.results.computer + compile + end if + + if exp.type == "shell" then + base=base+templates.of.none + base=base.replace("$memory$",""""+exp.mem+"""") + base=base.replace("$value$",""""+exp.ent+"""") + base=base+templates.results.shell + compile + end if + + if exp.type == "computer" then + base=base+templates.of.none + base=base.replace("$memory$",""""+exp.mem+"""") + base=base.replace("$value$",""""+exp.ent+"""") + base=base+templates.results.computer + compile + end if + exit +end if + +if sel == 2 then + r=user_input("IP Address: ") + if not is_valid_ip(r) then exit("Invalid IP") + islan=is_lan_ip(r) + router=get_router(r) + if islan then router=get_router + if not router then return error("Invalid address") + rver=router.kernel_version + if islan then + ports=router.device_ports(r) + else + ports=router.used_ports + end if + ips=[] + if r != router.local_ip then + hport=router.device_ports(router.local_ip)[0] + m={} + m.ip=router.local_ip + m.ports=[hport] + ips.push(m) + m=null + end if + info="# LAN PORT STATUS LIBRARY VERSION" + num=0 + for port in ports + inm=0 + for m in ips + if m.ip == port.get_lan_ip then + m.ports.push(port) + inm=1 + end if + end for + if not inm then + m={} + m.ip=port.get_lan_ip + m.ports=[port] + ips.push(m) + end if + end for + for m in ips + ports=m.ports + ip=m.ip + info=info+"\n"+num+" "+ip+" /" + if ip == router.local_ip then info=info+"\n |0 routed router "+rver + for port in ports + service=router.port_info(port) + status="routed" + if port.is_closed then status="closed" + info=info+"\n |"+port.port_number+" "+status+" "+service + end for + num=num+1 + end for + print(format_columns(info)+"\n") + + port=user_input("Port# ") + port=port.to_int + if typeof(port) != "number" then exit("Invalid port") + if port != 0 then base=base+templates.ml.remote else base=base+templates.ml.router + + ns=mx.net_use(r,port) + if not ns then exit("Invalid service") + ml=ns.dump_lib + exploits=[] + + print("Scanning exploits, this may take a second...") + scan=mx.scan(ml) + for mem in scan + mems=mx.scan_address(ml,mem).split("Unsafe check: ") + for ent in mems + if ent == mems[0] then continue + ent=ent[ent.indexOf("")+3:ent.indexOf("")] + jump=0 + result=ml.overflow(mem,ent) + print("Memory is "+mem+", vulnerable string is "+ent) + if port == 0 then + result=ml.overflow(mem,ent,router.local_ip) + print("Take 2") + print("We got a "+typeof(result)) + if typeof(result) == "computer" then jump=1 + end if + if result == null then continue + type=typeof(result) + if type == "number" or type == "file" then continue + ex={} + ex.mem=mem + ex.ent=ent + ex.result=type + ex.type=type + ex.jump=jump + //if type == "number" then ex.result="firewall_or_password" + if jump then ex.result="bounce" + print("Exploit return type is a "+ex.result) + exploits.push(ex) + end for + end for + if not exploits.len then exit("No exploits found, sorry") + exps={"shell": [], "comp": [], "num": []} + for ex in exploits + if ex.type == "shell" then + exps.shell.push(ex) + else if ex.type == "computer" then + exps.comp.push(ex) + else if ex.type == "number" then + exps.num.push(ex) + end if + end for + exploits=exps.shell+exps.comp+exps.num + print + print("Select exploit") + for i in range(1,exploits.len) + print(i+") "+exploits[i-1].result+" = "+exploits[i-1].mem+" + "+exploits[i-1].ent) + end for + sel=0 + while typeof(sel) != "number" or sel < 1 or sel > exploits.len + sel=user_input("#> ") + sel=sel.to_int + end while + exp=exploits[sel-1] + + if exp.jump == 1 then + base=base+templates.of.args + base=base.replace("$memory$",""""+exp.mem+"""") + base=base.replace("$value$",""""+exp.ent+"""") + base=base+templates.results.computer + compile + end if + + if exp.type == "shell" then + base=base+templates.of.none + base=base.replace("$memory$",""""+exp.mem+"""") + base=base.replace("$value$",""""+exp.ent+"""") + base=base+templates.results.shell + compile + end if + + if exp.type == "computer" then + base=base+templates.of.none + base=base.replace("$memory$",""""+exp.mem+"""") + base=base.replace("$value$",""""+exp.ent+"""") + base=base+templates.results.computer + compile + end if + exit +end if \ No newline at end of file diff --git a/theInternet/Bytes.html b/theInternet/Bytes.html new file mode 100644 index 0000000..82bafe1 --- /dev/null +++ b/theInternet/Bytes.html @@ -0,0 +1,290 @@ + +The official Bytes website -={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=-={B$}=- + + + + + + +
+

Bytes

+
+ + + + + + + +

+
+ + + + +
+
+ + + + + + +

-welcome to the official Bytes site-

+
+

+

%Users% registered users

+

news

+
+
+ + [6.23.04] created
+



+ +
+
+
+
+
+ +
+ + + + + + +

-Bytes-

[About Bytes]
+
Bytes is a playermade cryptocurrency by Clover
+
It was inspired by BTC to become a more modern BTC alternative
+
122.14.7.249 is the ONLY official download website for it!
+
+
+ +
+ + + + + + + + + + + + +

-downloads-



Bytes
(script)
BytesLibTemplate.src
(manual)
+

*The main Bytes client and importable Bytes lib*
+ *unreleased*

+
+

*Bytes lib manual*

+
+
+ +
+ + + + + +

-trusted sellers-



+
None right now.
+


















+
+
+ +
+ + + + + + + + + + diff --git a/theInternet/TreasureClient.src b/theInternet/TreasureClient.src new file mode 100644 index 0000000..89afd2c --- /dev/null +++ b/theInternet/TreasureClient.src @@ -0,0 +1,111 @@ +//Treasure Client API Functions +ver="0.0.1" +PWpath="/bin/TC" +func=false +if program_path != PWpath then func=true +//start private functions +callPW=function() + globals.PW=get_shell.connect_service + if not PW then exit("server not found") +end function + +info = function(user,pass) + if not PW or not typeof(PW) then callPW + bytes = PW.host_computer.File("/server/.PirateWay/users/"+user+"/bytes").get_content + key = PW.host_computer.File("/server/.PirateWay/users/"+user+"/PW.Skey").get_content + return "Hello "+user + char(10) + "Bytes: "+bytes + char(10) + "Secrete key: "+key +end function + + + +GenKey = function() + setchar = "PW" + setchar = setchar + "-" + floor(rnd*10000) + "-" + floor(rnd*10000) + "-" + floor(rnd*10000) + return setchar +end function + + + +ByteLogo = function() + print(" + :#@@d` + ` -Q@@8. + `:]qBy W@@#= + -xGB@8s|- L@@@} + =uO##Gx:` *@@@z + :@@#m: _B@@$` + ,v3Q#6V^` Z@@#! + `rk$@#ZT, *@@@* + -rz$l_Q@@K' + `Z@@Ry#Dy*' + k@@Q- -rk0@BZY_ + r@@@< .*V9#8e\` + ,B@@E .y#@@* + .g@@Q- `=TZ##MY!` + e@@#< _ud##Dy*' + v@@@u xDy*' + <#@@m + -Q@@8. + -lwl'") +end function + +BytePrice = function() + print("4 btc = 8 Bytes +40 btc = 80 Bytes +60 btc = 150 Bytes") +end function +//End private functions + + + +TC={} + + +TC.Bytes = function() + clear_screen + ByteLogo() + BytePrice() +end function + + +TC.get = function(item) + if not PW or not typeof(PW) then callPW + item_folder = PW.host_computer.File("/server/.PirateWay/textItems").get_files + for items in item_folder + if items.name == item then return PW.host_computer.File(items.path).get_content + end for + return "File not found." +end function + +TC.register = function(user) + if not PW or not typeof(PW) then callPW + if not user then user=user_input("Register username: ") + if PW.host_computer.File("/server/.PirateWay/users/"+user) then exit("Username already taken") + Rpass = user_input("Register password: ",1) + Cpass = user_input("Confirm password: ",1) + if not Cpass == Rpass then exit("Password is not the same as the first one") + print("[%]Creating account: "+user) + PW.host_computer.create_folder("/server/.PirateWay/users",user) + PW.host_computer.touch("/server/.PirateWay/users/"+user,"passwd.enc") + PW.host_computer.touch("/server/.PirateWay/users/"+user,"bytes") + PW.host_computer.touch("/server/.PirateWay/users/"+user,"PW.Skey") + PW.host_computer.File("/server/.PirateWay/users/"+user).chmod("o-wrx",1) + PW.host_computer.File("/server/.PirateWay/users/"+user).chmod("u-wrx",1) + PW.host_computer.File("/server/.PirateWay/users/"+user).chmod("g-wrx",1) + PW.host_computer.File("/server/.PirateWay/users/"+user+"/passwd.enc").set_content(Encrypt(Cpass)) + PW.host_computer.File("/server/.PirateWay/users/"+user+"/bytes").set_content("0") + PW.host_computer.File("/server/.PirateWay/users/"+user+"/PW.Skey").set_content(GenKey) + print("[+]User "+user+" added.") +end function + +TC.login = function(user,pass) + if user and pass then + if not callPW.host_computer.File("/server/.PirateWay/users/"+user) then exit("User does not exist") + if Encrypt(pass) == callPW.host_computer.File("/server/.PirateWay/users/"+user+"/passwd.enc").get_content then login = user + ":" + pass + if not Encrypt(pass) == callPW.host_computer.File("/server/.PirateWay/users/"+user+"/passwd.enc").get_content then login = "False" + end if + + if login == "False" then exit("Password incorrect.") + login = login.split(":") + print(info(login[0],login[1])) +end function \ No newline at end of file diff --git a/theInternet/byteClient.src b/theInternet/byteClient.src new file mode 100644 index 0000000..1608675 --- /dev/null +++ b/theInternet/byteClient.src @@ -0,0 +1,1035 @@ +//Bytes private functions +//cob.r=@remove +security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") +end function +security +globals.remove("security") + +ver="2.2.0" +func=0 +approvedNames=["Bytes"] +if approvedNames.indexOf(program_path.split("/")[-1]) == null then func=1 +if (not globals.hasIndex("BTC") and globals.len != 4) or (globals.hasIndex("BTC") and globals.len > 10) then exit("Please import Bytes at the start of your code!") + +BytKonfidential=function(AccessKode) + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + if typeof(@AccessKode) != "string" then return 0 + if str(@AccessKode) != "xo1L629hYD0J1eaalZPGxEI9jNJEufwLBQZ4P6tRkEGvBIam" then return 0 + Byt={} + + Byt.callBytesServersFunc=function(silent=0) + out={} + out.bool=1 + if not silent then print("-=-=-={ CONNECTING TO BYTES }=-=-=-") + web=get_shell.connect_service + if typeof(web) != "shell" then + out.bool=0 + return out + end if + if not silent then print("") + if not silent then print("[][][][]Connected successfully[][][][]") + out.out=web + return out + end function + + Byt.Sha256=function(string=null) + if not string then return + string=str(string) + + Blocks = [[0]] + i=0 + e=0 + while i < string.len + e=4 + while e > 0 and string.hasIndex(i) + e=e-1 + Blocks[-1][-1] = Blocks[-1][-1] + code(string[i])*256^e + i=i+1 + end while + if e == 0 then + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] else Blocks[-1] = Blocks[-1] + [0] + end if + end while + + if e > 0 then + Blocks[-1][-1] = Blocks[-1][-1] + (2147483648/256^(4-e)) + else + Blocks[-1][-1] = 2147483648 + end if + + if Blocks[-1].len == 16 then Blocks = Blocks + [[0]] + while Blocks[-1].len != 15 + Blocks[-1] = Blocks[-1] + [0] + end while + + Blocks[-1] = Blocks[-1] + [string.len*8] + + add = function(a, b) + return (a + b) % 4294967296 + end function + + XOR = function(a, b) + return bitwise("^", floor(a/65536), floor(b/65536))*65536+bitwise("^", a%65536, b%65536) + end function + + AND = function(a, b) + return bitwise("&", floor(a/65536), floor(b/65536))*65536+bitwise("&", a%65536, b%65536) + end function + + OR = function(a, b) + return bitwise("|", floor(a/65536), floor(b/65536))*65536+bitwise("|", a%65536, b%65536) + end function + + NOT = function(n) + return 4294967295-n + end function + + Ch = function(x, y, z) + return OR(AND(x, y), AND(NOT(x), z)) + end function + + Maj = function(x, y, z) + return OR(OR(AND(x, y), AND(x, z)), AND(y, z)) + end function + + shr = function(n, shifts) + return floor(n/2^shifts) + end function + + rotr = function(n, rots) + rots = 2^rots + return (n % rots) * (4294967296/rots) + floor(n/rots) + end function + + sigma0 = function(n) + return XOR(XOR(rotr(n, 7), rotr(n, 18)), shr(n, 3)) + end function + + sigma1 = function(n) + return XOR(XOR(rotr(n, 17), rotr(n, 19)), shr(n, 10)) + end function + + SIGMA0 = function(n) + return XOR(XOR(rotr(n, 2), rotr(n, 13)), rotr(n, 22)) + end function + + SIGMA1 = function(n) + return XOR(XOR(rotr(n, 6), rotr(n, 11)), rotr(n, 25)) + end function + + K = [] + K = K + [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221] + K = K + [3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580] + K = K + [3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986] + K = K + [2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895] + K = K + [666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037] + K = K + [2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344] + K = K + [430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779] + K = K + [1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298] + + H = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225] + + for Block in Blocks + W = Block[0:] + + for i in range(16, 63) + W = W + [add(add(add(sigma1(W[i-2]), W[i-7]), sigma0(W[i-15])), W[i-16])] + end for + + a = H[0] + b = H[1] + c = H[2] + d = H[3] + e = H[4] + f = H[5] + g = H[6] + h = H[7] + + for i in range(0, 63) + T1 = add(add(add(add(SIGMA1(e), Ch(e, f, g)), h), K[i]), W[i]) + T2 = add(SIGMA0(a), Maj(a, b, c)) + h = g + g = f + f = e + e = add(d, T1) + d = c + c = b + b = a + a = add(T1, T2) + end for + H[0] = add(a, H[0]) + H[1] = add(b, H[1]) + H[2] = add(c, H[2]) + H[3] = add(d, H[3]) + H[4] = add(e, H[4]) + H[5] = add(f, H[5]) + H[6] = add(g, H[6]) + H[7] = add(h, H[7]) + end for + + hexTable = "0123456789abcdef" + output = "" + for i in H.indexes + for j in range(7) + output = output + hexTable[floor(H[i]/16^j) % 16] + end for + end for + return output + end function + + Byt.BytesLogin=function(sub=null,key=null) + out={} + out.bool=1 + if not sub then + out.bool=0 + out.err="No user account sent over" + return out + end if + if key then + if key != sub.get_info then + out.bool=0 + out.err="Invalid key" + end if + return out + end if + print("-=-= User Protection =-=-") + print("-=-= If these aren't right, chances are you are using an impostor Bytes client!") + print("Confirm your:") + compCol=md5(sub.get_user+sub.get_info)[:6] + print("Balance: ["+sub.get_balance+" Bytes]") + lt=sub.last_transaction + if not lt then + print("Last transaction: [ Nothing! ]") + else + print("Last transaction: [ ["+(["+","-"][lt[-1]])+"] "+str(lt[1])+" ["+(["<",">"][lt[-1]])+"] "+lt[0]+"]") + end if + print("Computer color: [###]") + print + pass="" + salt="" + while not sub.check_password(salt) or pass.len < 1 + pass=user_input("Password: ",1) + salt=Byt.Sha256(pass+sub.get_user+sub.get_info) + if not sub.check_password(salt) or pass.len < 1 then print("Invalid password") + end while + return out + end function + + return Byt +end function + +Bytes={} + +Bytes.login=function(user=null,silent=0) + out={} + out.bool=1 + if (@silent != null and typeof(@silent) != "number") or (@user != null and typeof(@user) != "string") then + out.bool=0 + out.err="Unexpected error" + return out + end if + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + Byt=BytKonfidential("xo1L629hYD0J1eaalZPGxEI9jNJEufwLBQZ4P6tRkEGvBIam") + if not Byt then + out.bool=0 + out.err="Unknown error" + return out + end if + if not Byt.hasIndex("callBytesServersFunc") or not Byt.hasIndex("Sha256") or not Byt.hasIndex("BytesLogin") then + out.bool=0 + out.err="Unknown error" + return out + end if + if not user then user=user_input("Subwallet: ") + if user.len == 0 then + out.bool=0 + out.err="Subwallet does not exist" + return out + end if + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + sub=coin.get_subwallet(user) + if typeof(sub) == "string" then + out.bool=0 + out.err="Subwallet does not exist" + return out + end if + attempt=Byt.BytesLogin(sub) + if not attempt.bool then + out.bool=0 + out.err=attempt.err + return out + end if + if not silent then + print("Hello, "+user+"!") + compCol=md5(user+sub.get_info)[:6] + print("Balance: ["+sub.get_balance+" Bytes]") + lt=sub.last_transaction + if not lt then + print("Last transaction: [ Nothing! ]") + else + print("Last transaction: [ ["+(["+","-"][lt[-1]])+"] "+str(lt[1])+" ["+(["<",">"][lt[-1]])+"] "+lt[0]+"]") + end if + print("Computer color: [###]") + print("\nDO NOT SHARE YOUR SECRET TRANSFER KEY!!!") + print("IT IS USED FOR AUTOMATED TRANSFERS WITHOUT LOGIN") + print("Secret Transfer Key: "+sub.get_info+"") + end if + out.out="Logging out :)" + return out +end function + +Bytes.register=function() + out={} + out.bool=1 + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + Byt=BytKonfidential("xo1L629hYD0J1eaalZPGxEI9jNJEufwLBQZ4P6tRkEGvBIam") + if not Byt then + out.bool=0 + out.err="Unknown error" + return out + end if + if not Byt.hasIndex("callBytesServersFunc") or not Byt.hasIndex("Sha256") or not Byt.hasIndex("BytesLogin") then + out.bool=0 + out.err="Unknown error" + return out + end if + call=Byt.callBytesServersFunc + if call.bool then + web=call.out + else + out.bool=0 + out.err="Could not connect to Bytes webservice" + return out + end if + + + genRandomString=function(length) + alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + alphaLen=alpha.len + newString="" + while newString.len != length + newString=newString+alpha[floor(rnd*alphaLen)] + end while + return newString + end function + + allowedChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + user=user_input("Register username: ") + if user.len > 20 then + out.bool=0 + out.err="Username too long" + return out + end if + for chr in user + if allowedChars.indexOf(chr) == null then + out.bool=0 + out.err="Illegal characters used in username" + return out + end if + end for + print("Remember that we cannot change your password if you lose it or get hacked!") + Rpass=user_input("Register password: ",1) + Cpass=user_input("Confirm password: ",1) + if Cpass != Rpass then + out.bool=0 + out.err="Passwords do not match" + return out + end if + if Cpass.len < 10 then + out.bool=0 + out.err="Password must be longer than 10 characters" + return out + end if + print("Get your wallet username & pin from the wallet program, found in shops.") + wall=user_input("Wallet username: ",1) + if not wall.len then + out.bool=0 + out.err="Wallet does not exist" + return out + end if + pin=user_input("Wallet pin: ",1) + print("Please wait as we set up a user account for you!") + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + if typeof(coin.get_subwallet(user)) != "string" then + out.bool=0 + out.err="User exists" + return out + end if + usrnum=coin.get_subwallets.len+1 + key=Byt.Sha256(genRandomString(48)+Cpass+user+str(usrnum)) + salt=Byt.Sha256(Cpass+user+key) + t=coin.create_subwallet(wall,pin,user,salt) + if typeof(t) == "string" then + out.bool=0 + out.err=t + return out + end if + sub=coin.get_subwallet(user) + sub.set_info(key) + newUsers=web.host_computer.File("/Public/htdocs/template.html").get_content + newUsers=newUsers.replace("%Users%",str(usrnum)) + web.host_computer.File("/Public/htdocs/website.html").set_content(newUsers) + out.out="User "+user+" registered successfully!" + return out +end function + +Bytes.delete=function(user=null) + out={} + out.bool=1 + if (@user != null and typeof(@user) != "string") then + out.bool=0 + out.err="Unexpected error" + return out + end if + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + Byt=BytKonfidential("xo1L629hYD0J1eaalZPGxEI9jNJEufwLBQZ4P6tRkEGvBIam") + if not Byt then + out.bool=0 + out.err="Unknown error" + return out + end if + if not Byt.hasIndex("callBytesServersFunc") or not Byt.hasIndex("Sha256") or not Byt.hasIndex("BytesLogin") then + out.bool=0 + out.err="Unknown error" + return out + end if + call=Byt.callBytesServersFunc + if call.bool then + web=call.out + else + out.bool=0 + out.err="Could not connect to Bytes webservice" + return out + end if + if not user then user=user_input("Username: ") + if user.len == 0 then + out.bool=0 + out.err="User does not exist" + return out + end if + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + sub=coin.get_subwallet(user) + if typeof(sub) == "string" then + out.bool=0 + out.err="Subwallet does not exist" + return out + end if + attempt=Byt.BytesLogin(sub) + if not attempt.bool then + out.bool=0 + out.err=attempt.err + return out + end if + print("-=-= { ACOUNT DELETION } =-=-") + print("WARNING: You will not keep any of your Bytes! Continue?") + conf=user_input("[y/N]$ ").lower + if conf != "y" then + out.out="User not deleted" + return out + end if + t=sub.delete + if not t or typeof(t) == "string" then + out.bool=0 + out.err=t + return out + end if + newUsers=web.host_computer.File("/Public/htdocs/template.html").get_content + newUsers=newUsers.replace("%Users%",str(coin.get_subwallets.len)) + web.host_computer.File("/Public/htdocs/website.html").set_content(newUsers) + out.out="User deleted" + return out +end function + +Bytes.transfer=function(rec=null,quant=null,user=null,key=null) + out={} + out.bool=1 + if (@rec != null and typeof(@rec) != "string") or (@quant != null and typeof(@quant) != "string") or (@key != null and typeof(@key) != "string") or (@user != null and typeof(@user) != "string") then + out.bool=0 + out.err="Unexpected error" + return out + end if + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + Byt=BytKonfidential("xo1L629hYD0J1eaalZPGxEI9jNJEufwLBQZ4P6tRkEGvBIam") + if not Byt then + out.bool=0 + out.err="Unknown error" + return out + end if + if not Byt.hasIndex("callBytesServersFunc") or not Byt.hasIndex("Sha256") or not Byt.hasIndex("BytesLogin") then + out.bool=0 + out.err="Unknown error" + return out + end if + if not user then user=user_input("Username: ") + if user.len == 0 then + out.bool=0 + out.err="User does not exist" + return out + end if + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + sub=coin.get_subwallet(user) + if typeof(sub) == "string" then + out.bool=0 + out.err="Subwallet does not exist" + return out + end if + attempt=Byt.BytesLogin(sub,key) + if not attempt.bool then + out.bool=0 + out.err=attempt.err + return out + end if + if not rec then rec=user_input("Recipient: ") + if rec.len == 0 then + out.bool=0 + out.err="User does not exist" + return out + end if + rec=coin.get_subwallet(rec) + if typeof(rec) == "string" then + out.bool=0 + out.err="User does not exist" + return out + end if + if not quant then quant=user_input("Bytes: ") + if typeof(quant) == "string" then quant=quant.to_int + if typeof(quant) != "number" then + out.bool=0 + out.err="Invalid number" + return out + end if + if quant <= 0 then + out.bool=0 + out.err="Invalid transaction amount" + return out + end if + if typeof(sub.get_balance) == "string" or sub.get_balance < quant then + out.bool=0 + out.err="Insufficient funds" + return out + end if + if rec.get_user != sub.get_user then + if not key then + print("Confirm transfer of "+quant+" Bytes?") + conf=user_input("[y/N]$ ").lower + if conf != "y" then + out.bool=0 + out.err="Transaction cancelled" + return out + end if + end if + trans=coin.transaction(sub.get_user,rec.get_user,quant) + if typeof(trans) == "string" then + out.bool=0 + out.err="Unknown error" + return out + end if + end if + out.out="Transaction successful" + return out +end function + +Bytes.mine=function(user=null) + out={} + out.bool=1 + if (@user != null and typeof(@user) != "string") then + out.bool=0 + out.err="Unexpected error" + return out + end if + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + //if not user_mail_address then + // out.bool=0 + // out.err="Cannot run Bytes mining on a server" + // return out + //end if + Byt=BytKonfidential("xo1L629hYD0J1eaalZPGxEI9jNJEufwLBQZ4P6tRkEGvBIam") + if not Byt then + out.bool=0 + out.err="Unknown error" + return out + end if + if not Byt.hasIndex("callBytesServersFunc") or not Byt.hasIndex("Sha256") or not Byt.hasIndex("BytesLogin") then + out.bool=0 + out.err="Unknown error" + return out + end if + if not user then user=user_input("Username: ") + if user.len == 0 then + out.bool=0 + out.err="User does not exist" + return out + end if + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + sub=coin.get_subwallet(user) + if typeof(sub) == "string" then + out.bool=0 + out.err="Subwallet does not exist" + return out + end if + attempt=Byt.BytesLogin(sub) + if not attempt.bool then + out.bool=0 + out.err=attempt.err + return out + end if + + hints=["Check out the list of approved programs! www.raveleflei.org", "Check out FoxTrot! placeholder", "Check out Weasel Penetration Security for secure services! www.yondeljf.net"] + + + while 1 + if coin.get_mined_coins >= 15000000 then + out.bool=0 + out.err="Sorry! All available coins have been mined." + return out + end if + clear_screen + print("["+hints[floor(rnd*hints.len)]+"]") + print("[Mining as user: "+user+"]") + print("[Balance: "+sub.get_balance+" Bytes]") + sub.mining + if func then break + end while + return out +end function + +Bytes.total=function() + out={} + out.bool=1 + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + out.out=coin.get_mined_coins + return out +end function + +Bytes.bal=function(user=null) + out={} + out.bool=1 + if (@user != null and typeof(@user) != "string") then + out.bool=0 + out.err="Unexpected error" + return out + end if + security=function() + if @map.remove != @locals.remove then + map.remove=@locals.remove + map.remove("remove") + end if + if @map.hasIndex != @locals.hasIndex then map.remove("hasIndex") + if @map.indexOf != @locals.indexOf then map.remove("indexOf") + if @globals.remove != @locals.remove then + globals.remove=@locals.remove + globals.remove("remove") + end if + if @globals.hasIndex != @locals.hasIndex then globals.remove("hasIndex") + if @globals.indexOf != @locals.indexOf then globals.remove("indexOf") + if globals.hasIndex("include_lib") then globals.remove("include_lib") + if globals.hasIndex("get_shell") then globals.remove("get_shell") + if globals.hasIndex("print") then globals.remove("print") + if globals.hasIndex("user_input") then globals.remove("user_input") + if globals.hasIndex("str") then globals.remove("str") + if globals.hasIndex("exit") then globals.remove("exit") + if globals.hasIndex("typeof") then globals.remove("typeof") + end function + security + if not user then user=user_input("Username: ") + if user.len == 0 then + out.bool=0 + out.err="User does not exist" + return out + end if + bc=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "blockchainLib" and not bc then bc=test + end while + if not bc then + out.bool=0 + out.err="blockchain.so does not exist in the system" + return out + end if + coin=bc.get_coin + if typeof(coin) == "string" then + out.bool=0 + out.err="Unknown error obtaining coin" + return out + end if + sub=coin.get_subwallet(user) + if typeof(sub) == "string" then + out.bool=0 + out.err="Subwallet does not exist" + return out + end if + out.out=sub.get_balance + return out +end function + +if not func then + apt=null + root=get_shell.host_computer.File("/").get_folders+get_shell.host_computer.File("/").get_files + while root.len + currFile=root.pull + if currFile.is_folder then root=currFile.get_folders+currFile.get_files+root + test=include_lib(currFile.path) + if typeof(test) == "aptclientLib" and not apt then apt=test + end while + if apt then + if get_shell.host_computer.File("/etc/apt/sources.txt") then + inSource=apt.show("122.14.7.249") + if inSource == "122.14.7.249 repository not found" then + print("Adding Bytes repository...") + apt.add_repo("122.14.7.249",1542) + apt.update + end if + if apt.check_upgrade(program_path) then + print("Updating...\n") + apt.install(program_path.split("/")[-1],parent_path(program_path)) + exit("Please re-launch Bytes client") + end if + end if + end if + if params.len >= 1 then + out=null + if params[0].lower == "register" then + if params.len == 2 then out=Bytes.register(params[1]) else out=Bytes.register + else if params[0].lower == "login" then + if params.len == 2 then out=Bytes.login(params[1]) else out=Bytes.login + else if params[0].lower == "delete" then + if params.len == 2 then out=Bytes.delete(params[1]) else out=Bytes.delete + else if params[0].lower == "transfer" then + user=null + rec=null + quant=null + if params.len >= 2 then user=params[1] + if params.len >= 3 then rec=params[2] + if params.len == 4 then quant=params[3] + out=Bytes.transfer(rec,quant,user) + else if params[0].lower == "mine" then + if params.len == 2 then out=Bytes.mine(params[1]) else out=Bytes.mine + else if params[0].lower == "bal" then + if params.len == 2 then out=Bytes.bal(params[1]) else out=Bytes.bal + else if params[0].lower == "total" then + out=Bytes.total + else + exit + end if + + if out then + if out.bool then exit(""+out.out+"") else exit(""+out.err+"") + end if + end if + while 1 + print("Bytes Crypto Client") + print("v."+ver+"") + print("Usage: Bytes [function] [(opt) username] [(transfer);(opt) recipient] [(transfer);(opt) amount]") + print("Available functions") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("/>{REGISTER} {LOGIN} {DELETE} {MINE} {TRANSFER} {TOTAL} {BAL}//") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + opt=user_input("\FUNC> ").lower + + if opt == "login" then + out=Bytes.login + else if opt == "register" then + out=Bytes.register + else if opt == "delete" then + out=Bytes.delete + else if opt == "transfer" then + out=Bytes.transfer + else if opt == "total" then + out=Bytes.total + else if opt == "mine" then + out=Bytes.mine + else if opt == "bal" then + out=Bytes.bal + else + continue + end if + if out.bool then exit(""+out.out+"") else exit(""+out.err+"") + end while +end if + +m={} +for i in globals.indexes + i=@i + i=str(i) + if i == "m" then continue + if i == "BytKonfidential" then continue + if i == "ver" or i == "func" or i == "approvedNames" then continue + m[i]=@globals[i] +end for +globals.classID=m \ No newline at end of file diff --git a/theInternet/primBrowser.src b/theInternet/primBrowser.src new file mode 100644 index 0000000..15db229 --- /dev/null +++ b/theInternet/primBrowser.src @@ -0,0 +1,189 @@ +//primBrowser private functions +ver="0.0.1" + +callINET=function() + globals.inet=get_shell.connect_service + if not inet then exit("could not connect to the Internet") +end function + +Encrypt=function(password) + o=[] + for ch in password + k=ch.code*10 + a=k*4 + s=a+100*10 + t=s+1000*10*2000+10000000000 + o.push("ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©"+"ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©"+bitwise("^",t,7777)+"ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©"+"ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©") + end for + return o.join("ДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийлДЖЁЙЛбд¶жёийл©") +end function + +GenKey=function() + setchar="INET" + setchar=setchar+"-"+floor(rnd*10000)+"-"+floor(rnd*10000)+"-"+floor(rnd*10000) + return setchar +end function + +info=function(user,pass) + bytes=inet.host_computer.File("/server/.theInternet/users/"+user+"/bytes").get_content + key=inet.host_computer.File("/server/.theInternet/users/"+user+"/IN.Skey") + return "Hello "+user+char(10)+"Bytes: "+bytes+char(10)+"Secret key: "+key +end function + +ByteLogo = function() + print(" :#@@d` ") + print(" ` -Q@@8. ") + print(" `:]qBy W@@#= ") + print(" -xGB@8s|- L@@@} ") + print(" =uO##Gx:` *@@@z ") + print(" :@@#m: _B@@$` ") + print(" ,v3Q#6V^` Z@@#! ") + print(" `rk$@#ZT, *@@@* ") + print(" -rz$l_Q@@K' ") + print(" `Z@@Ry#Dy*' ") + print(" k@@Q- -rk0@BZY_ ") + print(" r@@@< .*V9#8e\` ") + print(" ,B@@E .y#@@* ") + print(" .g@@Q- `=TZ##MY!` ") + print(" e@@#< _ud##Dy*' ") + print(" v@@@u xDy*' ") + print(" <#@@m ") + print(" -Q@@8. ") + print(" -lwl'") +end function + +BytePrice = function() + print("4 btc = 8 Bytes") + print("40 btc = 80 Bytes") + print("60 btc = 150 Bytes") +end function + +login=function() + user=user_input("Username: ") + if not inet.host_computer.File("/server/.theInternet/users/"+user) then return "null_user" + pass=user_input("Password: ") + if not Encrypt(pass) == inet.host_computer.File("/server/.theInternet/users/"+user+"/passwd.enc").get_content then return "inc_pass" + return user+":"+pass +end function + +register=function() + user=user_input("Register username: ") + if inet.host_computer.File("/server/.theInternet/users/"+user) then return "exist_user" + Rpass=user_input("Register password: ",1) + Cpass=user_input("Confirm password: ",1) + if not Cpass == Rpass then return "pass_mismatch" + print("[%]Creating account: "+user) + inet.host_computer.create_folder("/server/.theInternet/users",user) + inet.host_computer.touch("/server/.theInternet/users/"+user,"passwd.enc") + inet.host_computer.touch("/server/.theInternet/users/"+user,"bytes") + inet.host_computer.touch("/server/.theInternet/users/"+user,"IN.Skey") + inet.host_computer.File("/server/.theInternet/users/"+user).chmod("o-wrx",1) + inet.host_computer.File("/server/.theInternet/users/"+user).chmod("u-wrx",1) + inet.host_computer.File("/server/.theInternet/users/"+user).chmod("g-wrx",1) + inet.host_computer.File("/server/.theInternet/users/"+user+"/passwd.enc").set_content(Encrypt(Cpass)) + inet.host_computer.File("/server/.theInternet/users/"+user+"/bytes").set_content("0") + inet.host_computer.File("/server/.theInternet/users/"+user+"/IN.Skey").set_content(GenKey) + print("[+]Created user: "+user) + return user+":"+Cpass +end function + +browse=function(anon) + sites=inet.host_computer.File("/server/.theInternet/sites").get_folders + trustsites=inet.host_computer.File("/server/.theInternet/tsites").get_folders + //sites == user generated sites, trustsites == verified sites + //5 sites per page + //add more code later + //site structure: + //.theInternet/sites/[sitename] + //->site.conf, tells if main page, if other pages, how to navigate to other pages + //->site, actual website data (ie: display) + //.theInternet/sites/[sitename]/[subsite] + //->site.conf, practically the same as main page's site.conf + //->site, same as main page's site file + //.theInternet/sites/[sitename]/[subsite]/[subsite] + //you can have 1 extra subsite in a subsite + //you can have 3 subsites in a main site + //.theInternet/sites/[sitename]/downloads + //add in site.conf if downloads + //.theInternet/sites/[sitename]/[subsite]/downloads + //can have downloads in subsite too + //10000 Byte site creation fee? + //3 site per user max? + //if anon, no Byte purchases can be made +end function + +globe=function() + print(" ___.....___") + print(" ,..-.=--.-. "".") + print(" .{_.. ` ,. .") + print(" .' \ / | ,'.\`.") + print(" / : ;' `____> \") + print(" : `. ( / :") + print(" | `>\_ \ r|") + print(" | / \ `._ |") + print(" | | ` ; |") + print(" : \ / ` ;") + print(" \ \. ' ` /") + print(" `. | / .'") + print(" ` `/ . '") + print(" `---'.....---''") + print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-") + print("primBrowser: Access theInternet!") + print("Current version: "+ver+"") + print("By: Sparki and Darkness") +end function +//end primBrowser private functions + +anon=true +if anon then + clear_screen + globe() + print("[0] - Browse") + print("[1] - Login") + print("[2] - Register") + opt=null + while typeof(opt) != "number" or opt > 2 + opt=user_input("Selection> ").to_int + end while + + if opt == 1 then + print("Login to theInternet") + out=login() + if out == "null_user" then exit("User does not exist") + if out == "inc_pass" then exit("Incorrect password") + logged=out.split(":") + print(info(logged[0],logged[1])) + anon=false + end if + + if opt == 2 then + print("Register account for theInternet") + out=register() + if out == "exist_user" then exit("User already exists") + if out == "pass_mismatch" then exit("Passwords do not match") + logged=out.split(":") + print(info(logged[0],logged[1])) + anon=false + end if +end if +if not anon then + clear_screen + printinet() + print("[0] - Browse") + print("[1] - Account settings") + print("[2] - Website management") + opt=null + while typeof(opt) != "number" or opt > 2 + opt=user_input("Selection> ").to_int + end while + if opt == 1 then + end if + + if opt == 2 then + end if +end if + +if opt == 0 then // browse + browse(anon) +end if + diff --git a/theInternet/sites_help.txt b/theInternet/sites_help.txt new file mode 100644 index 0000000..c2717fe --- /dev/null +++ b/theInternet/sites_help.txt @@ -0,0 +1,16 @@ +//site.conf +site.downloads=false +site.subsite1="/[subsite]" +site.subsite2=false +site.subsite3=false +site.priv=true +site.users{ +"[username]" +"[username]" +} +//site.conf end + +//site +//each line = 1 line of content, 30 lines max? 30 characters max? + +//site end diff --git a/theInternet/the_byte.txt b/theInternet/the_byte.txt new file mode 100644 index 0000000..aed5d44 --- /dev/null +++ b/theInternet/the_byte.txt @@ -0,0 +1,20 @@ + ^m3j- + :#@@d` + ` -Q@@8. + `:]qBy W@@#= + -xGB@8s|- L@@@} + =uO##Gx:` *@@@z + :@@#m: _B@@$` + ,v3Q#6V^` Z@@#! + `rk$@#ZT, *@@@* + -rz$l_Q@@K' + `Z@@Ry#Dy*' + k@@Q- -rk0@BZY_ + r@@@< .*V9#8e\` + ,B@@E .y#@@* + .g@@Q- `=TZ##MY!` + e@@#< _ud##Dy*' + v@@@u xDy*' + <#@@m + -Q@@8. + -lwl" \ No newline at end of file diff --git a/tracelib.src b/tracelib.src new file mode 100644 index 0000000..549aea1 --- /dev/null +++ b/tracelib.src @@ -0,0 +1,16 @@ +//traceLib for ctf +TraceLib={} +TraceLib.storedHash=null + + +TraceLib.analyze=function(shell,file) + print("Analyzing file...") + shell.launch(file.path,"ANALYZE") + TraceLib.storedHash=shell.host_computer.File(file.path+".alz").get_content +end function + + +TraceLib.decompile=function(shell,file) + print(" + genRandomString=function(cont) +end function \ No newline at end of file diff --git a/tree.src b/tree.src new file mode 100644 index 0000000..979acad --- /dev/null +++ b/tree.src @@ -0,0 +1,38 @@ +root=comp.File("/") +safeFiles=[] +newFile={} +newFile.path=root.path +newFile.indent=0 +newFile.perms=root.permissions +newFile.own=root.owner +newFile.grp=root.group +newFile.size=root.size +safeFiles.push(newFile) + +newFiles=[] +newFiles=newFiles+root.get_folders+root.get_files +while newFiles.len + alreadyIn=0 + currFile=newFiles.pull + for i in safeFiles + if i.path == currFile.path then alreadyIn=1 + end for + if alreadyIn then continue + newFile={} + newFile.path=currFile.path + newFile.indent=currFile.path.split("/")[1:].len + newFile.perms=currFile.permissions + newFile.own=currFile.owner + newFile.grp=currFile.group + newFile.size=currFile.size + safeFiles.push(newFile) + if currFile.is_folder then + newFiles=currFile.get_folders+currFile.get_files+newFiles + end if +end while + +for file in safeFiles + indent=" "*file.indent + string=indent+"["+file.own+"/"+file.grp+"/"+file.size+"/"+file.perms+"] "+file.path + print(string) +end for \ No newline at end of file diff --git a/weaselhtml.html b/weaselhtml.html new file mode 100644 index 0000000..3d53c17 --- /dev/null +++ b/weaselhtml.html @@ -0,0 +1,209 @@ + +Weasel Penetration Security ~={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=+={W}=+={P}=+={S}=~ + + + +

Weasel

+
+ +
+
+
+
+
+
+

Welcome to the Weasel Penetration Security website, we are a White Hat security organization that provides you with the tools needed to secure and defend yourself, at no cost

+

We also provide a WPS Grading service where a Weasel Security representative tests the security of your system, and you get a fancy official Weasel Penetration Security (WPS) Grading Certificate for your webpage

+

Looking to join us? Find our official Discord Server at discord.gg/wsgCjCE2Eh!

+

Now with 100% less logging!

+
+ +
+
+
+
+
+

The WPS Grading Service weighs all the pros and cons of any specific service

+

Factors weighed during grading include Service (and by extension, the owner's) Trustworthiness and general Penetration Protection

+

WPS Grading is NOT FREE, Contact a Weasel Representative for more info

+

WPS Grading list is to help players know whether a service is safe or not, not decide if a service is good.

+

Official graded site list:

+

search.com % 100/100 for obvious reasons

+

+ www.reliancen.org [191.54.109.115] +
Service Evaluation: Makes risky claims for their users that their services are unhackable. +
Pentest Evaluation: Safe against low-level exploits. +
+

+

+ www.raveleflei.org [122.14.7.249] +
Service Evaluation: Just a basic cryptocurrency, no radical claims, it just works. +
Pentest Evaluation: Safe against low-level exploits. Bytes API is very vulnerable but not released publically yet. +
+

+
+
+
+
+

Weasel Penetration Security is a White Hat hacking organization

+

Alan, add more details later

+
+
+
+

This is the player watchlist. All untrusted hackers or hacker IPs are listed here.

+
+
+ + + \ No newline at end of file diff --git a/wificrack.src b/wificrack.src new file mode 100644 index 0000000..f8478f4 --- /dev/null +++ b/wificrack.src @@ -0,0 +1,35 @@ +cp=include_lib("/lib/crypto.so") +if not cp then cp = include_lib(current_path+"/crypto.so") +if not cp then exit("no crypto.so") +if params.len < 2 then +info="# BSSID POWER ESSID" +num=0 +sel=null +comp = get_shell.host_computer +nd=comp.network_devices +wifi=false +cp.airmon("start","wlan0") +wifis=comp.wifi_networks("wlan0") +for wifi in wifis + info=info+"\n"+num+" "+wifi + num=num+1 +end for +print(info) +while typeof(sel) != "number" or sel > wifis.len or sel < 0 + sel=user_input("#> ").to_int +end while +wifi=wifis[sel].split(" ") +pwr=wifi[1] +pwr=pwr[:pwr.len-1].to_int +bssid=wifi[0] +essid=wifi[2] +maxacks=300000/pwr +else if params.len == 2 then + bssid=params[0] + essid=params[1] + maxacks=300000 +else + exit("invalid parameters") +end if +cp.aireplay(bssid,essid,maxacks) +print("PASSWORD: "+cp.aircrack(current_path+"/file.cap")) \ No newline at end of file