From e82e44199a6f598f78af42500915ac36487665ec Mon Sep 17 00:00:00 2001 From: cloverrfoxx <96365159+cloverrfoxx@users.noreply.github.com> Date: Wed, 30 Aug 2023 09:27:32 -0700 Subject: [PATCH] Delete nexus.src i had the nexus on here?? at least it was an older version --- nexus.src | 228 ------------------------------------------------------ 1 file changed, 228 deletions(-) delete mode 100644 nexus.src diff --git a/nexus.src b/nexus.src deleted file mode 100644 index 48d7f42..0000000 --- a/nexus.src +++ /dev/null @@ -1,228 +0,0 @@ -//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