- ComputerCraft | Programmable Computers for Minecraft
- → boudragon's Content
boudragon's Content
There have been 107 items by boudragon (Search limited from 10-February 22)
#161689 BouTech Login System
Posted by
boudragon
on 23 January 2014 - 12:56 PM
in
Programs
Filename = Username
Line 1 = password
Line 2 = access level (either "a" for admin or "u" for user without quotes)
Hope this helps
#150075 BouTech Login System
Posted by
boudragon
on 23 October 2013 - 06:10 AM
in
Programs
#149600 BouTech Login System
Posted by
boudragon
on 19 October 2013 - 09:15 PM
in
Programs
pastebin get [Pastebin Code] [File Name]
Make sure your HTTP is enabled otherwise it won't work.
You don't really HAVE to make a startup file to use it... but it makes sense that you would want this login program to pop up right away.
#149558 BouTech Login System
Posted by
boudragon
on 19 October 2013 - 04:03 PM
in
Programs
#149554 BouTech Login System
Posted by
boudragon
on 19 October 2013 - 03:46 PM
in
Programs
#149514 BouTech Login System
Posted by
boudragon
on 19 October 2013 - 09:16 AM
in
Programs
Once the System manager is complete any admin will be able to go in and approve pending or locked files and change user access levels. Right now the only way to do so is manually either prior to running the login system or using the adminovrride login name which I LOVE the access password for that ;-) basically it generates a 3 digit number which you then must know the proper algorithm to get the password. in case you didn't find it... its (RND+11)*83 = password. RND is the override code it generates. Check it out when you get a chance
#149465 BouTech Login System
Posted by
boudragon
on 18 October 2013 - 09:54 PM
in
Programs
#149461 BouTech Login System
Posted by
boudragon
on 18 October 2013 - 09:24 PM
in
Programs
#149119 Server Side (in-game Computer) File Access?
Posted by
boudragon
on 16 October 2013 - 05:15 AM
in
Ask a Pro
::EDIT::
Ok so after fooling around with it for about 5 minutes I am VERY impressed with this! I think this is exactly what I need! I will let you know with further testing! If it works how I need it to I will be sure to give credit where it's due my friend thank you!
#149083 Server Side (in-game Computer) File Access?
Posted by
boudragon
on 15 October 2013 - 06:58 PM
in
Ask a Pro
Lyqyd, on 15 October 2013 - 06:47 PM, said:
I will DEF. look into that when I have a bit more time. And how did I know this post might grab your attention? :-p
#149077 Server Side (in-game Computer) File Access?
Posted by
boudragon
on 15 October 2013 - 06:12 PM
in
Ask a Pro
#149010 Server Side (in-game Computer) File Access?
Posted by
boudragon
on 15 October 2013 - 05:26 AM
in
Ask a Pro
I managed to test on how to have one computer tell another to open a program which in turn displays some text or even a simple question but aside from that I am completely lost! Any help would be greatly appreciated! I will post my login program as an example to base your answers by. Please keep in mind that though the login DOES work it may be a little sloppy.
local function readN(len, replaceChar)
len = len or 12
local input=""
local key = 0
term.setCursorBlink(true)
repeat
local e,p1 = os.pullEvent()
if e=="char" then
if #input < len then
input = input .. p1
term.write(replaceChar or p1)
end
elseif e=="key" and p1==keys.backspace and #input > 0 then
input = input:sub(1,#input-1)
local x,y = term.getCursorPos()
term.setCursorPos(x-1,y)
term.write(" ")
term.setCursorPos(x-1,y)
end
until p1==keys.enter
term.setCursorBlink(false)
return input
end
sid = 0
lockdown = 0
actc = ""
actpw = ""
actpc = ""
userlog = ""
userpas = ""
puselog = ""
prog = 0
function clear()
term.clear()
term.setCursorPos(1,1)
end
function menu(id, text)
if sid == id then
write">> "
else
write" "
end
print(text)
end
if not fs.exists("pending") then
shell.run("mkdir pending")
if not fs.exists("users") then
shell.run("mkdir users")
else
end
elseif not fs.exists("users") then
shell.run("mkdir users")
end
clear()
while prog == 0 do
--os.pullEvent = os.pullEventRaw
rep1 = 0
rep2 = 0
rep3 = 0
rep4 = 0
rep5 = 0
rep6 = 0
ioerror = 0
term.setCursorPos(1, 12)
term.clearLine()
term.setCursorPos(1, 13)
term.clearLine()
term.setCursorPos(1, 14)
term.clearLine()
term.setCursorPos(1, 15)
term.clearLine()
term.setCursorPos(1, 16)
term.clearLine()
term.setCursorPos(1, 17)
term.clearLine()
term.setCursorPos(1,1)
print("|################################################|")
print("| BOUTECH SYSTEM LOGIN |")
print("| OS Version : 1.3 |")
print("|################################################|")
term.setCursorPos(13,7)
print("|------------------------|")
term.setCursorPos(13,8)
print("| |")
term.setCursorPos(13,9)
print("| |")
term.setCursorPos(13,10)
print("| |")
term.setCursorPos(13,11)
print("|------------------------|")
term.setCursorPos(16,8)
menu(0, "Login")
term.setCursorPos(16,9)
menu(1, "Create Account")
term.setCursorPos(16,10)
menu(2, "Shutdown")
event, key = os.pullEvent("key")
if key == 200 then
if sid == 0 then
sid = sid+2
elseif sid == 1 then
sid = sid-1
elseif sid == 2 then
sid = sid-1
end
elseif key == 208 then
if sid == 2 then
sid = sid-2
elseif sid == 1 then
sid = sid+1
elseif sid == 0 then
sid = sid+1
end
elseif key == 28 then
if sid == 0 then
term.setCursorPos(13, 12)
print("| Enter Credentials. |")
term.setCursorPos(13, 13)
print("| |")
term.setCursorPos(13, 14)
print("| |")
term.setCursorPos(13, 15)
print("| |")
term.setCursorPos(13, 16)
print("| |")
term.setCursorPos(13, 17)
print("|------------------------|")
while rep5 == 0 do
term.setCursorPos(1, 14)
term.clearLine()
term.setCursorPos(1, 16)
term.clearLine()
term.setCursorPos(13, 16)
print("| |")
term.setCursorPos(13, 14)
print("| |")
term.setCursorPos(15, 14)
write("Username: ")
userlog = readN()
if userlog == "adminovrride" then
rnd = math.random(100, 500)
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos (17, 18)
print("Override Code: ".. rnd)
apass = tostring((rnd + 11) * 83)
term.setCursorPos(1, 16)
term.clearLine()
term.setCursorPos(13, 16)
print("| |")
term.setCursorPos(15, 16)
write("Password: ")
ovrpass = readN(12, "*")
if ovrpass == apass then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print("Override Successful...")
sleep(3)
term.clear()
term.setCursorPos(1, 1)
rep5 = rep5+1
rep6 = rep6+1
prog = prog+1
else
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print(" Override Failed...")
sleep(1)
rep5 = rep5+1
rep6 = rep6+1
sid = 0
end
else
if userlog == "" then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(18, 18)
print("Invalid Username")
sleep(1)
ioerror = ioerror+1
if ioerror == 3 then
rep5 = rep5+1
rep6 = rep6+1
sid = 0
else
end
else
ioerror = 0
ulog = fs.exists("users/".. userlog)
if ulog == true then
term.setCursorPos(1, 16)
term.clearLine()
term.setCursorPos(13, 16)
print("| |")
term.setCursorPos(15, 16)
write("Password: ")
userpas = readN(12, "*")
if userpas == "" then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print("Invalid Password Entry")
sleep(1)
ioerror = ioerror+1
term.setCursorPos(1, 18)
term.clearLine()
if ioerror == 3 then
rep5 = rep5+1
sid = 0
else
end
else
ulog = io.open("users/".. userlog, "r") or nil
pass = ulog and ulog:read()
ulog:close()
if (pass and pass==userpas) then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(16, 18)
print(" Login Success...")
currentw = fs.open("current", "w")
accessr = fs.open("users/".. userlog, "r")
accessl = accessr.readLine() and accessr.readLine()
currentw.writeLine(userlog)
currentw.writeLine(accessl)
currentw.close()
accessr.close()
rep5 = rep5+1
rep6 = rep6+1
prog = prog+1
sid = 0
sleep(2)
shell.run("system")
else
if lockdown < 2 then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(16, 18)
print(" Wrong Password")
sleep(1)
if userlog == puselog then
lockdown = lockdown+1
else
lockdown = 0
puselog = userlog
lockdown = lockdown+1
end
else
while rep6 == 0 do
term.setCursorPos(15, 18)
rnd = tostring(math.random(101, 999))
if not fs.exists("pending/".. rnd) then
fs.move("users/".. userlog, "pending/".. rnd)
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print(" Lockdown Ref #: "..rnd)
sleep(1)
ulog = fs.open("pending/".. rnd, "a")
ulog.writeLine("Username: ".. userlog)
ulog.close()
rep6 = rep6+1
rep5 = rep5+1
sid = 0
else
end
end
end
end
end
else
term.setCursorPos(14, 18)
print(" Bad/Unknown Username")
sleep(1)
end
end
end
end
elseif sid == 1 then
term.setCursorPos(13, 12)
print("| Submit Account Info. |")
term.setCursorPos(13, 13)
print("| |")
term.setCursorPos(13, 14)
print("| |")
term.setCursorPos(13, 15)
print("| |")
term.setCursorPos(13, 16)
print("| |")
term.setCursorPos(13, 17)
print("|------------------------|")
while rep1 == 0 do
term.setCursorPos(1, 14)
term.clearLine()
term.setCursorPos(13, 14)
print("| |")
term.setCursorPos(15, 14)
write("Username: ")
input = readN()
actc = input
actex = fs.exists("users/".. actc)
if input == "adminovrride" then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(18, 18)
print("Invalid Username")
sleep(1)
ioerror = ioerror+1
if ioerror == 3 then
rep1 = 1
rep2 = 1
rep3 = 1
sid = 0
else
end
else
if input == "" then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(18, 18)
print("Invalid Username")
sleep(1)
ioerror = ioerror+1
if ioerror == 3 then
rep1 = 1
rep2 = 1
rep3 = 1
sid = 0
else
end
elseif actex == true then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print (" Username Unavailable")
sleep(1)
else
ioerror = 0
rep1 = 1
end
end
end
while rep2 == 0 do
while rep3 == 0 do
term.setCursorPos(15, 15)
write("Password: ")
input = readN(12, "*")
if input == "" then
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print("Invalid Password Entry")
sleep(1)
ioerror = ioerror+1
if ioerror == 3 then
rep1 = 1
rep2 = 1
rep3 = 1
else
end
else
ioerror = 0
actpw = input
rep3 = 1
rep2 = 1
end
end
term.setCursorPos(13, 16)
print("| |")
term.setCursorPos(15, 16)
write("Confirm : ")
input = readN(12, "*")
actpc = input
if (actpc) == (actpw) then
while rep4 == 0 do
rnd = tostring(math.random(1011, 9999))
if not fs.exists("pending/".. rnd) then
file = fs.open("pending/".. rnd, "w")
file.writeLine(actc)
file.writeLine(actpw)
file.close()
rep4 = rep4+1
else
end
end
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(13, 18)
print(" Pending... Ref #: ", rnd)
sleep(1)
ioerror = 0
rep2 = 1
sid = 0
else
term.setCursorPos(1, 18)
term.clearLine()
term.setCursorPos(15, 18)
print("Password Doesn't Match")
sleep(1)
rep2 = 0
ioerror = ioerror+1
if ioerror == 3 then
rep1 = 1
rep2 = 1
rep3 = 1
else
end
end
end
elseif sid == 2 then
term.setCursorPos(13,14)
print("|########################|")
term.setCursorPos(13,15)
print("# SYSTEM SHUTTING DOWN!! #")
term.setCursorPos(13,16)
print("|########################|")
sleep(3)
os.shutdown()
end
end
end
Thank you in advance!
::EDIT::
Just to clarify the files need to be on the server, run from the clients and displayed on the client side systems rather than the server.
#148290 Formatting / System Restore
Posted by
boudragon
on 08 October 2013 - 05:28 AM
in
Ask a Pro
0099, on 07 October 2013 - 11:10 PM, said:
That almost sounds like you want a system to have partition with a system restore on it like a Dell or other pre-built system is that correct? If this is the case it sounds like a decent plan for the future, however the reason I didn't do it like that this time is because it boils down to this... all it takes is an act of griefing and regardless of what is on the system they pop your computer and everything is gone anyways. With an external system restore file at least you can download the restore or have a backup disk somewhere and setup any computer in seconds.
#147439 BouTech Login System
Posted by
boudragon
on 30 September 2013 - 10:12 PM
in
Programs
willwac (NewCoolPC), on 30 September 2013 - 06:01 PM, said:
I'd like to help you make this.
As far as the login aside from maybe cleaning it up and what not it works perfect. The rest is a bit sketchy as far as implementing it into an actual OS or other program because everyone's needs are different. But I am open to ideas just inbox me!
#147345 Boutech System Restore
Posted by
boudragon
on 30 September 2013 - 07:16 AM
in
Programs
#147337 Boutech System Restore
Posted by
boudragon
on 30 September 2013 - 07:03 AM
in
Programs
The only valid argument that I see is instead of using shell.run to use fs.makeDIR() and even then they both do the same thing. The program runs fine and nothing seems to break so what's the difference?
So take it easy on me Nit-Pick Mcgee!
PS - Thank you for the formatting feature BTW MKlegoman357
#147296 Boutech System Restore
Posted by
boudragon
on 29 September 2013 - 10:43 PM
in
Programs
FEATURES
- After running the program it will verify that you want to continue to avoid accidental erasure of your files. Default option is set to "NO" for this purpose.
- Program will format the system and remove all files and folders that are not read only protected.
- The System Restore program will ignore the disk drive all together as the program itself must reside on a disk to function properly. (Have not tested if it works while on the system itself yet.)
- After formatting the system it will add folders designated by the program.
- Recovers files designated in the program directly from Pastebin.
- Once completed the system will reboot and your system should be restored according to the files and folders designated.
- Ctrl-T is disallowed once the the process has begun to avoid damaging the system.
- Easy to modify to suit your needs. Easy to manipulate functions at the beginning of the program allow you to add, modify or remove files or folders.
- Clean GUI to make this program easy to use for any level of user.
- Integration into an overall OS where the system boots and does a system check. (memory, file structure etc.) If the check fails it will initiate a system restore sequence from disk to restore the system to it's previous state including any back-up files saved.
- Clean up program and add any additional fail safes to prevent program crashes or failures in file downloading.
term.clear()
term.setCursorPos(1,1)
sid = 0
rep = 0
rep2 = 0
pbfile = 0
function mkdir()
shell.run("mkdir /pending")
shell.run("mkdir /users")
end
function sysrest()
while rep2 <= 3 do
if pbfile == 0 then
sCode = "tK3ikweu"
sFile = "login"
elseif pbfile == 1 then
sCode = "daTg13eG"
sFile = "pb"
elseif pbfile == 2 then
sCode = "tt4xZhjX"
sFile = "system"
elseif pbfile == 3 then
sCode = "mciJr52F"
sFile = "startup"
end
local sPath = ("/".. sFile)
local response = http.get("http://pastebin.com/raw.php?i="..textutils.urlEncode(sCode))
if response then
local sResponse = response.readAll()
response.close()
local file = fs.open(sPath, "w")
file.write(sResponse)
file.close()
pbfile = pbfile+1
rep2 = rep2+1
else
rep2 = 4
end
end
end
function format()
for _, f in pairs(fs.list("/")) do
if not fs.isReadOnly(f) then
fs.delete(f)
end
end
end
function timer()
sleep(0.2) write(".")
sleep(0.2) write(".")
sleep(0.2) write(".")
sleep(0.3) write(" DONE!")
sleep(0.3)
end
function clear()
term.clear()
term.setCursorPos(1,1)
end
function menu(id, text)
if sid == id then
write(">> ")
else
write(" ")
end
print(text)
end
while rep == 0 do
clear()
print("|=================================================|")
print("| BouTech System Restore v1.3 |")
print("|=================================================|")
term.setCursorPos(19,5)
print(":: WARNING! ::")
print(" This action will erase ALL data currently on this ")
print(" system and restore files for the ")
print(" BouTech Managment System ")
print("")
print(" Continue with system restore? ")
term.setCursorPos(16,11)
menu(0, "NO")
term.setCursorPos(29,11)
menu(1, "YES")
event, key = os.pullEvent("key")
if key == 205 then
if sid == 0 then
sid = 1
elseif sid == 1 then
sid = 0
end
elseif key == 203 then
if sid == 0 then
sid = 1
elseif sid == 1 then
sid = 0
end
elseif key == 28 then
if sid == 1 then
if not http then
term.setCursorPos(1,14)
print("|=================================================|")
print("| HTTP API must be enabled to restore system. |")
print("| Set enableAPI_http to true in ComputerCraft.cfg |")
print("| System will now reboot. |")
print("|=================================================|")
sleep(3)
return
end
clear()
os.pullEvent = os.pullEventRaw
print("|=================================================|")
print("| BouTech System Restore v1.3 |")
print("|=================================================|")
term.setCursorPos(10,5)
print(":: SYSTEM RESTORE IN PROGRESS! ::")
sleep(0.5)
term.setCursorPos(17,7)
write("Formatting")
timer()
format()
term.setCursorPos(15,8)
write("Adding Folders")
timer()
mkdir()
term.setCursorPos(14,9)
write("Recovering Files")
timer()
sysrest()
term.setCursorPos(9,10)
write("Installing Files To System")
timer()
sleep(1)
term.setCursorPos(1,17)
write("|=================================================|")
write("| Restore complete. System will now reboot. |")
write("|=================================================|")
sleep(2)
rep = 1
clear()
os.reboot()
elseif sid == 0 then
term.setCursorPos(1, 17)
print("|=================================================|")
print("| Restore canceled. System will now reboot. |")
print("|=================================================|")
sleep(2)
rep = 1
clear()
os.reboot()
end
end
end
PASTEBIN
- Pastebin get 8sbPWVgA or go to Pastebin.
No screenshots yet as I do not feel they are necessary but if you feel you need some post here and request some.
- ComputerCraft | Programmable Computers for Minecraft
- → boudragon's Content


