Jump to content




[Password] unbreackable, unhackable,


  • You cannot reply to this topic
9 replies to this topic

#1 crackroach

  • Members
  • 62 posts
  • LocationSomewhere over the rainbow

Posted 17 November 2012 - 09:33 AM

Here's a program i made for my server room

--PASSWORD VARIABLE function
local user, userCorrect = "", "admin"
local pass, passCorrect = "", "admin"
i1 = 0

--PASSWORD FUNCTION
function os.pullEvent()
    local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
    if event == "terminate" then
  term.clear()
  term.setCursorPos(12, 9)
  print("Sorry Ctrl+t is disabled")
	    sleep(2)
  denied()
 end
    return event, p1, p2, p3, p4, p5
end
 
function granted()
 
 term.clear()
 term.setCursorPos(17, 9)
 textutils.slowPrint("Access Granted")
 sleep(1)
 term.clear()
 term.setCursorPos(17, 9)
 
 for i = 1, 2 do
  
  textutils.slowPrint("Initializing...")
  sleep(0.5)
  
  term.setCursorPos(17, 9)
  term.clearLine()
  
 end
 
 textutils.slowPrint("Program is loaded")
 sleep(1)
 term.setCursorPos(1, 3)
 term.clearLine()
 term.setCursorPos(1, 3)
 term.clear()
 
end
function denied()
 term.clear()
 term.setCursorPos(18, 9)
 textutils.slowPrint("Access Denied")
 term.setCursorPos(5, 10)
 textutils.slowPrint("System in PROTECTION MODE for 600 seconds")
 term.setCursorBlink(false)
 sleep(60)
 os.reboot()
end 
  
function passCall()
 
 term.setCursorPos(12, 5)
 
 
 while pass ~= "admin" or i1 == 3 do 
  
  pass = read("*")
  
  if pass == "admin" then
   granted()
   shell.run("disk/reactor")
  
  elseif i1 == 3 then
   denied()
  
  else
   term.setCursorPos(4, 6)
   print("Wrong Password")
   i1 = i1 + 1
   sleep(1)
   term.setCursorPos(1, 5)
   term.clearLine()
   print("Password :")
   term.setCursorPos(1, 6)
   term.clearLine()
   term.setCursorPos(12, 5)
  end
 end
end
 
function userCall()
 
 while user ~= "admin" do
  user = read()
  
  if user == "admin" then
   passCall()
  
  else
   term.setCursorPos(5, 6)
   print("Username Invalid")
   sleep(1)
   term.setCursorPos(11, 4)
   term.clearLine()
   term.setCursorPos(1, 4)
   print("Username :")
   term.setCursorPos(1, 6)
   term.clearLine()
   term.setCursorPos(12, 4)
  end
 end
end
--LOADING SCREEN 
term.clear()
term.setCursorPos(12, 1)
textutils.slowPrint("Welcome to the server") --Change it for what you like
term.setCursorPos(13, 2)
textutils.slowPrint("maintenance room")

 term.setCursorPos(1, 4)
 print("Username :")
 term.setCursorPos(1, 5)
 print("Password :")
 term.setCursorPos(12, 4)
 userCall()

It's been a while i made it so i don't recall where to change the password and the name. It is set to admin.

#2 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 17 November 2012 - 09:50 AM

This is not very protected. The first thing that will happen if the user uses ctrl t is it will error out. Functions have to be declared before calling them. denied() is only declared after the os.pullEvent() function.

#3 Jarle212

  • Members
  • 198 posts
  • LocationNorway

Posted 17 November 2012 - 10:05 AM

Players can place a disk drive next to your computer and have a program on a disk that deletes/renames the startupfile on your drive when the computer restarts

#4 crackroach

  • Members
  • 62 posts
  • LocationSomewhere over the rainbow

Posted 17 November 2012 - 10:05 AM

View PostCranium, on 17 November 2012 - 09:50 AM, said:

This is not very protected. The first thing that will happen if the user uses ctrl t is it will error out. Functions have to be declared before calling them. denied() is only declared after the os.pullEvent() function.
Well, actually it works fine... but i'm always willing to learn, what do you propose?

#5 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 17 November 2012 - 10:33 AM

View PostCranium, on 17 November 2012 - 09:50 AM, said:

This is not very protected. The first thing that will happen if the user uses ctrl t is it will error out. Functions have to be declared before calling them. denied() is only declared after the os.pullEvent() function.

Actually it won't. Look again, everything before --LOADING SCREEN is a function, it's just a bit hard to tell unless you look closely since he's overriding os.pullEvent().
I don't blame you though, I only noticed upon second glance.

#6 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 17 November 2012 - 10:36 AM

View Postcrackroach, on 17 November 2012 - 09:33 AM, said:

textutils.slowPrint("System in PROTECTION MODE for 600 seconds")
sleep(60)
Bit of a misalignment.

#7 crackroach

  • Members
  • 62 posts
  • LocationSomewhere over the rainbow

Posted 17 November 2012 - 06:08 PM

View Posttiin57, on 17 November 2012 - 10:36 AM, said:

View Postcrackroach, on 17 November 2012 - 09:33 AM, said:

textutils.slowPrint("System in PROTECTION MODE for 600 seconds")
sleep(60)
Bit of a misalignment.
that was just for the purpose of saying " you tryed now it won't work" and not to punish myself for cheater :)/>

#8 rhyleymaster

  • Members
  • 186 posts
  • LocationCanada

Posted 17 November 2012 - 07:06 PM

You should add to the VERY top of the line, this code:
os.pullEvent = os.pullEventRaw
to stop ctrl - T

#9 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 18 November 2012 - 12:40 AM

View Postrhyleymaster, on 17 November 2012 - 07:06 PM, said:

You should add to the VERY top of the line, this code:
os.pullEvent = os.pullEventRaw
to stop ctrl - T
He did allready override os.pullEvent(). Ctrl+T shouldn't work with his code.

Cranium, os.pullEvent() will not be called before denied() has been defined, so there shouldn't be a problem.

#10 TheVarmari

  • Members
  • 70 posts
  • LocationFinland

Posted 18 November 2012 - 12:54 AM

I can override this by pressing CTRL+T for exactly 0.9 seconds and then opening the computer. The table declaration will take a tiny bit of time, but if I time it exactly right I can override it and delete startup.
Also, disk drive.
And pickaxe. Pickaxes are nice.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users