892 posts
Location
Where you'd least expect it.
Posted 17 December 2012 - 11:24 AM
FakeConsole 1.4 (Advanced Computers)
Added config file!
Please post ANY way you can notice a graphical difference between this and CraftOS!
Hello all! FakeConsole is a program I have written that locks your computer until you type in your set passcode(default "fakeexit")! But here's the catch: There is no graphical differences with this and the normal CraftOS! This program, whenever you type ANYTHING other than the set passcode, shows the error "No such program"! This program can be used to fool hackers, noobs, and trolls! Currently the only way to bypass this is placing a diskdrive with a startup disk in it and [Ctrl+R]ing.
Screenshots:
[attachment=784:2012-12-16_15.03.46.png] [attachment=785:2012-12-16_15.04.06.png]
Download:
Enable HTTP Api in your minecraft/config/ComputerCraft.cfg, and type the following into the console:
pastebin get 6yDBrDb4 disk/startup(Make sure you have a disk inserted!)
Code at:
Credits:
GravityScore for helping me with the Up/Down Arrow Functionality!
Upcoming features:
- Auto-Updating:
Working on right now! Implemented! Unimplemented for un-userfriendlyness. Just run the install disk again! :)/> Config file: Need to learn more about string reading. XP Finished in 1.4!- Anything you suggest! (within reason)
Please leave more suggestions in the comments!
This was my first released program, so constructive criticism is welcome! Sorry for the microscopic screenshots. :P/>
[left]
Thanks,[/left]
[left]
Mudkip[/left]
278 posts
Posted 17 December 2012 - 11:38 AM
This is an interesting take on the typical "locker" program. Nice work.
892 posts
Location
Where you'd least expect it.
Posted 17 December 2012 - 11:38 AM
This is an interesting take on the typical "locker" program. Nice work.
Thank you! :)/>
Edit: And would their be any way to implement the UPARROW key doing last command? That's why the title is called An ALMOST unnoticeable fake console.
302 posts
Posted 17 December 2012 - 11:40 AM
This is an extremely good idea!!!
Until better security is provided against booting by disk / console access , every ruse is worth!
Maybe it can even be expanded to fool people even better…e.g. running them as different users…but then again the idea is to stop them using a computer…
892 posts
Location
Where you'd least expect it.
Posted 17 December 2012 - 11:42 AM
snip
Thanks! This is my first program, So it's not gona be perfect. ;)/>
302 posts
Posted 17 December 2012 - 11:46 AM
snip
Oh, that was me just thinking out loud.
892 posts
Location
Where you'd least expect it.
Posted 17 December 2012 - 12:14 PM
That's ok. :)/>
892 posts
Location
Where you'd least expect it.
Posted 17 December 2012 - 12:26 PM
Would there be anyone that would like to include this in their OS? If so, PM me.
892 posts
Location
Where you'd least expect it.
Posted 17 December 2012 - 12:30 PM
Updated with new snippet on MY pastebin account, not a guest. XP
1619 posts
Posted 17 December 2012 - 01:59 PM
This is an interesting take on the typical "locker" program. Nice work.
Thank you! :)/>
Edit: And would their be any way to implement the UPARROW key doing last command? That's why the title is called An ALMOST unnoticeable fake console.
Of course its possible! Someone had to program it for the default shell. Poke around rom/programs/shell and see if you can figure it out yourself. Ask us if you need help.
892 posts
Location
Where you'd least expect it.
Posted 18 December 2012 - 05:14 AM
This is an interesting take on the typical "locker" program. Nice work.
Thank you! :)/>
Edit: And would their be any way to implement the UPARROW key doing last command? That's why the title is called An ALMOST unnoticeable fake console.
Of course its possible! Someone had to program it for the default shell. Poke around rom/programs/shell and see if you can figure it out yourself. Ask us if you need help.
But I'm out of luck if it's in bios.lua…. :(/>
892 posts
Location
Where you'd least expect it.
Posted 18 December 2012 - 05:23 AM
Update: Well I found a snippet of code in bios.lua which lists how they use the keys….. Time to ask a pro about it. XD
Edit: Here's the code:
while true do
local sEvent, param = os.pullEvent()
if sEvent == "char" then
sLine = string.sub( sLine, 1, nPos ) .. param .. string.sub( sLine, nPos + 1 )
nPos = nPos + 1
redraw()
elseif sEvent == "key" then
if param == keys.enter then
-- Enter
break
elseif param == keys.left then
-- Left
if nPos > 0 then
nPos = nPos - 1
redraw()
end
elseif param == keys.right then
-- Right
if nPos < string.len(sLine) then
nPos = nPos + 1
redraw()
end
elseif param == keys.up or param == keys.down then
-- Up or down
if _tHistory then
redraw(" ");
if param == keys.up then
-- Up
if nHistoryPos == nil then
if #_tHistory > 0 then
nHistoryPos = #_tHistory
end
elseif nHistoryPos > 1 then
nHistoryPos = nHistoryPos - 1
end
else
-- Down
if nHistoryPos == #_tHistory then
nHistoryPos = nil
elseif nHistoryPos ~= nil then
nHistoryPos = nHistoryPos + 1
end
end
if nHistoryPos then
sLine = _tHistory[nHistoryPos]
nPos = string.len( sLine )
else
sLine = ""
nPos = 0
end
redraw()
end
elseif param == keys.backspace then
-- Backspace
if nPos > 0 then
redraw(" ");
sLine = string.sub( sLine, 1, nPos - 1 ) .. string.sub( sLine, nPos + 1 )
nPos = nPos - 1
redraw()
end
elseif param == keys.home then
-- Home
nPos = 0
redraw()
elseif param == keys.delete then
if nPos < string.len(sLine) then
redraw(" ");
sLine = string.sub( sLine, 1, nPos ) .. string.sub( sLine, nPos + 2 )
redraw()
end
elseif param == keys["end"] then
-- End
nPos = string.len(sLine)
redraw()
end
end
end
term.setCursorBlink( false )
term.setCursorPos( w + 1, sy )
print()
return sLine
end
892 posts
Location
Where you'd least expect it.
Posted 18 December 2012 - 05:53 AM
Here's the link to the Ask A Pro article incase anyone wants to check it out!
http://www.computerc...ypress-section/ Thanks GravityScore for helping! :D/>
892 posts
Location
Where you'd least expect it.
Posted 18 December 2012 - 09:18 AM
FakeConsole 1.2 is out!!!!New features:- Explained code!
- New Up/Down Arrow Functionality! Thanks to GravityScore! :D/>
Auto-Updating! Removed for non-userfriendlyness. Config file with updater coming soon.
718 posts
Location
Hawaii
Posted 19 December 2012 - 04:26 PM
On line 9
if fs.exists("fakeconsole") = true then
You forgot to put ==, it needs to look like this
if fs.exists("fakeconsole") == true then
Otherwise, nice program :D/>
21 posts
Posted 19 December 2012 - 05:48 PM
On line 9
if fs.exists("fakeconsole") = true then
You forgot to put ==, it needs to look like this
if fs.exists("fakeconsole") == true then
Otherwise, nice program :D/>
It shouldn't even need " == true" at all…
1619 posts
Posted 19 December 2012 - 06:15 PM
Suggestion:
When you terminate the default console, it shuts down the computer. Do something like this:
event = os.pullEvent()
if event == "terminate" then
term.setTextColor(colors.red)
write("Terminated")
term.setTextColor(colors.white)
print("Press any key to continue")
event = os.pullEvent()
if event == "key" then
os.shutdown()
end
end
892 posts
Location
Where you'd least expect it.
Posted 24 December 2012 - 07:47 AM
Thanks for all of your replies!!! I am adding the terminate feature right after I type this, and I fixed the bug ComputerCraftFan11 posted!
Thanks,
Mudkip
Edit: Problem. In order to terminate, you need to press Control then T. But if you press Control even just a split second before T, instead of simultaneously, it bypasses that function and just goes on to the readLine. AND you can ACTUALLY terminate it then. What am I going to do….. :unsure:/>
Here's the beta code:
Spoiler
–Written by MudkipTheEpic
–If you would like to include this in your OS, that's fine, just keep these lines and credit me.
event = os.pullEvent()
historyTable = {}
term.clear()
term.setCursorPos(1,1) –[Clears screen]
term.setTextColor(16)
print("CraftOS 1.4")
term.setTextColor(1) –[Imitates CraftOS]
while true do –[Loop, prevents {Hold down enter to exit}]
event = os.pullEvent()
if event == "terminate" then
term.setTextColor(colors.red)
write("Terminated")
term.setTextColor(colors.white)
print("Press any key to continue")
event = os.pullEvent()
if event == "key" then
shell.run("fakeconsole")
end
end
term.setTextColor(16)
write("> ") –[Imitates CraftOS]
term.setTextColor(1)
if event == "terminate" then
term.setTextColor(colors.red)
write("Terminated")
term.setTextColor(colors.white)
print("Press any key to continue")
event = os.pullEvent()
if event == "key" then
shell.run("fakeconsole")
end
end
readLine = read(nil, historyTable) –[Adds Up/Downarrow function! Thank GravityScore for this!
table.insert(historyTable, readLine)
exit = ("fakeexit")
if readLine == exit then
term.setTextColor(2^math.random(1,14))
print("Exiting FakeConsole…") –[Exit FakeConsole]
sleep(2)
term.clear()
term.setCursorPos(1,1) –[Clears screen]
break –[Ends loop]
elseif readLine ~= ("") then –[If the input isn't blank or fakeexit then,]
term.setTextColor(16384)
print("No such program") –[Imitates No Program error]
term.setTextColor(1)
else
end –[Keep looping if input is blank]
end –[End program]
892 posts
Location
Where you'd least expect it.
Posted 25 December 2012 - 02:08 PM
1.4 is out!
Added config file!!!!! Just change configfc/password to whatever you want the password to be!