173 posts
Location
The hall of 1000 monkeys and only 1 typewriter
Posted 25 July 2015 - 02:15 PM
I have run into a problem during coding this hacking disk I am creating. My password lock on my computer is immune to it, because of
it's reset method of doing shell.run
I would go into more detail but typing this took about 10 mins because the website kept on ignoring my com's keyboard.
I am playing on tekkit latest
Edited on 25 July 2015 - 08:32 PM
8543 posts
Posted 25 July 2015 - 04:59 PM
We're going to need more detail and all of the code involved in order to provide useful help.
173 posts
Location
The hall of 1000 monkeys and only 1 typewriter
Posted 25 July 2015 - 09:44 PM
ok, well. the code for the password is this:
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(1,1)
print"Hydro Security 2.0"
print"Username:Username"
write"Password:"
input = read(*)
if input == "Password" then
term.clear()
term.setCursorPos(1,1)
print"Welcome…"
sleep(2)
term.clear()
term.setCursorPos(1,1)
print"CraftOS 1.5"
else
print"Incorrect Password"
sleep(2)
shell.run("startup")
end
and the 3 programs used for the hacking disk is as follows:
[disk/startup]
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(1,1)
print"Hydro Hax 1.5"
print" "
print"Decode Password And Break In?"
write " "
input = io.read()
if input == "Yes" then
shell.run("disk/A")
elseif input == "No" then
print"Thank you for buying Hydro Hax!"
sleep(1)
shell.run("startup")
else
print"That is neither Yes or No (CaSe SeNsItIvE)
sleep(2)
os.reboot()
end
[disk/A]
term.clear()
term.setCursorPos(1,1)
print"Decoding"
sleep(5)
fs.delete("startup")
fs.copy("disk/B","startup")
print"Decoded!"
sleep(1)
os.reboot()
[disk/B]
rs.setOutput("front", true)
rs.setOutput("back", true)
rs.setOutput("left", true)
rs.setOutput("right", true)
rs.setOutput("top", true)
rs.setOutput("bottom", true)
term.clear()
term.setCursorPos(1,1)
print"CraftOS 1.5"
Also, another thing, the whole thing is basically just how to activate the program by detecting the shell.run command (I just figured out a better way to word this question XD)
Edited on 25 July 2015 - 08:07 PM
81 posts
Posted 26 July 2015 - 12:31 AM
Let's see if I get this right, you have a password lock that runs automatically on a computer, and you want to use a disk with a startup file to replace the original lock with your file instead?
Logic seems okay, assuming the door lock program does not use is.pullEventRaw which would stop you from ever running your malicious disk.
So what is it doing or not doing that you need help with?
173 posts
Location
The hall of 1000 monkeys and only 1 typewriter
Posted 26 July 2015 - 03:21 PM
the pullEventRaw bit doesn't affect my disk on normal password codes that use os.shutdown() or os.reboot(), except this one uses shell.run("startup") which is not allowing my disk to work. I need help activating the disk during the code's restart.
3057 posts
Location
United States of America
Posted 27 July 2015 - 12:29 AM
Well, the problem I think you are running into is simple: The startup programs on your disk don't run unless the computer reboots.
Simply unloading and reloading the chunk will force the computer to reboot.
Alternatively, you could manually hack that code by hitting enter a lot. It will eventually crash.
53 posts
Location
Minecraft
Posted 27 July 2015 - 06:48 AM
If you insert a floppy with a startup-file, wont the computer execute this startup instead of the startup installed on the computer?
Edited on 27 July 2015 - 04:49 AM
656 posts
Posted 27 July 2015 - 09:15 AM
If you insert a floppy with a startup-file, wont the computer execute this startup instead of the startup installed on the computer?
Yes, if the computer actually reboots. It won't terminate a program because a disk was inserted.
You can hold ctrl+R to force-reboot the computer.
173 posts
Location
The hall of 1000 monkeys and only 1 typewriter
Posted 18 August 2015 - 12:42 PM
]
Yes, if the computer actually reboots. It won't terminate a program because a disk was inserted.
You can hold ctrl+R to force-reboot the computer.
Thx, I believe that is just the basic solution :P/> thx!