Posted 17 April 2013 - 10:54 AM
Hello everyone,
This is my first release of my Credit Card System.
So, not all is finished or it's buggy but I think you can handle it ^_^/>/>
The Programs:
Creator:
Where's the code?
http://pastebin.com/QD2Jc0D0
Thx to superxander
Code:
Functions:
Plans for the future:
This is my first release of my Credit Card System.
So, not all is finished or it's buggy but I think you can handle it ^_^/>/>
The Programs:
Creator:
Spoiler
What does it?Spoiler
It allows you to create a Credit CardWhere's the code?
Spoiler
Pastebin:http://pastebin.com/QD2Jc0D0
Thx to superxander
Code:
Spoiler
term.clear()
local Data = {}
--Functions
function header()
print(textutils.centerprint("+-------------------+", 1)) print(textutils.centerprint("|Credit Card Creator|", 2))
print(textutils.centerprinr("|
print(textutils.centerprint("+-------------------", 4)) end
function no_card()
while not fs.exists("disk") do
print(textutils.centerprint("------------------------+", 8))
print(textutils.centerprint("|Please insert Credit Card |", 9))
print(textutils.centerprint("+-------------------------+", 10))
sleep(2)
end
end
function card_isPresent_but_not_prepared() function load()
fs.makeDir("disk/reditcards/")
sleep(1)
file = fs.open("disk/creditcards/card1.acc", "w") file.close()
sleep(1) r
eturn true
end
function screen()
while true do
print(textutils.centerprint("
print(textutils.centerprint("
print(textutils.centerprint("
print(textutils.centerprint("+--------------------------+", 8))
print(textutils.centerprint("|
print(textutils.centerprint("+--------------------------+", 10))
sleep(1)
end
end
parallel.waitForAny(load, screen)
print(textutils.centerprint("
print(textutils.centerprint("
print(textutils.centerprint("
print(textutils.centerprint("+--------------------------+", 8))
print(textutils.centerprint("|
print(textutils.centerprint("+--------------------------+", 10))
sleep(3)
end
function asking_for_data()
print(textutils.centerprint("
print(textutils.centerprint("
print(textutils.centerprint("
tem.setCursorPos(20,6)
print("+-------------------+")
term.setCursorPos(20,7)
print("|
term.setCursorPos(20,8)
print("+-------------------+")
term.setCursorPos(20,10)
print("+-------------------+")
term.setCursorPos(20,11)
print("|
term.setCursorPos(20,12)
print("---------------------+")
term.setCursorPos(10,7)
write("Username:)
term.setCursrPos(10,1)
write("Password:")
sleep(0.5)
term.setCursorPos(21,7)
username = read()
term.setCursorPos(21,11)
password = read("*")
end
function checking()
if not username == nil and not password == nil then
table.insert("Data", username)
random_ID = (math.random(1000, 9999)
table.insert("Data", random_ID)
table.insert("Data", 0) -- This is the start money end
end
function create_file()
pass_file = fs.open("disk/creditcards/pass1.pass", "w")
pass_file.writeLine(StrUtils.SHA1(password)) pass_file.close()
h = fs.open("disk/creditcards/card1.acc", "w") local serialized = (textutils.serialize(Data)) encrypted = StrUtils.encrypt(serialized, password) h.writeLine(encrypted)
h.close()
--Function Calling
header()
if not fs.exists("disk/creditcards/card1.acc") then card_isPresent_but_not_prepared()
end
if fs.exists("disk/creditcards/card1.acc") then asking_for_data()
end
checking()
create_file()
Functions:
Spoiler
-Create a card
-Hashing
Plans for the future:
Spoiler
-Fully mysql service (via http api)
-Login Page
-Service works unbounded to 1 SSP/SMP cuz I have 5 - 10 Databases for servers, all can be used.
For example: On one server you can get money easily and on another server you can pay cool things, so you have one account for some servers :D/>