This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
RunasSudo-AWOLindefinitely's profile picture

CC-Bank with ATM, EFTPOS, Auth. Server

Started by RunasSudo-AWOLindefinitely, 24 December 2012 - 02:03 PM
RunasSudo-AWOLindefinitely #1
Posted 24 December 2012 - 03:03 PM
EFTPOS functionality not available in 0.2.0.

I was bored, and it's the holidays, and so like all normal people, I coded a bank system. Introducing! [fanfare]
CC-Bank

It does everything that a normal ATM does, like:
  • Ability to either manually enter account number or read from keycard (floppy disk)
  • Server-side PIN check
  • Balance check
  • Withdrawal
  • Transfer between accounts
So, without further ado, the screenshots:
Spoiler











Downloads:
v0.2.0: Dropbox
v0.1 (formerly 1.0): Dropbox

Installation (will clean up later):
  1. Download the required zip file from above and extract it somewhere.
  2. Set up your ATM (with withdrawal turtle) and server computers. See screenshots.
  3. Get the "client", "gui" and "crypt" files onto the root directory of your ATM computer.
  4. Modify the "serverId", "diskSide", "modemSide" and "withdrawId" values accordingly.
  5. SpoilerserverId: ID of the server computer
    withdrawId: ID of the withdrawal turtle
    diskSide: side the disk drive is on
    modemSide: side the modem is on
  6. Get the "withdraw" file onto the root directory of your withdrawal turtle.
  7. Modify the "clientId" value accordingly.
  8. SpoilerclientId: ID of the associated ATM terminal
  9. Get the "server" and "crypt" files onto the root directory of your server computer.
  10. Modify the "modemSide" value accordingly.
  11. Create the "acc" folder in the root directory of your server computer.
  12. Create an account file (eg, "12345.txt" where "12345" is the account number) in the acc directory of the server. Format:
  13. PIN Number
    Balance
  14. Launch the "server" program on the server, the "client" program on the ATM and the "withdraw" program on the withdrawal turtle.
A keycard can be made by getting a blank floppy disk and setting its label to the account number.

Known Issues:
  • EFTPOS machines don't exist in 0.2.0!!!
  • Ctrl-T can terminate the ATM.
  • Performing a ridiculously large amount of transactions in one go will stack overflow the ATM. Fixed in 0.2.0
  • Receiving an incorrect packet will crash the ATM. Fixed in 0.2.0
  • Not receiving a packet in time will crash the ATM. Sort-of fixed in 0.2.0
  • Passwords are sent in plaintext. Fixed in 0.2.0
  • Withdrawal just transfers money to account "0". Fixed in 0.2.0
Changelog and plans:
Spoilerv0.3.0 (Upcoming):
  • Receipt printer?
  • Management console?
v0.2.1 (Upcoming):
  • Add back EFTPOS
  • Possible Immibis's Peripherals support
v0.2.0:
  • Major rewrite
  • Added GUI
  • Added SHA-1 hashing (transmission only)
  • Changed function of "ENTER" key at startup
  • Removed dependency on RedPower
  • Temporarily removed EFTPOS functionality - still needs to be rewritten
Edited on 31 December 2012 - 11:42 PM
anonimo182 #2
Posted 24 December 2012 - 04:40 PM
Nice program, specially for servers. Try adding
 os.pullEvent = os.pullEventRaw 
at the top of your code
hippejustin #3
Posted 25 December 2012 - 01:33 AM
I like this program.
But I get a error with the program "eftpos":
"eftpos:63: bad argument: string expected, got nil"
Can you help me?

Sorry if I have a bad English, I'm Dutch. :)/>
RunasSudo-AWOLindefinitely #4
Posted 25 December 2012 - 09:34 PM
I like this program.
But I get a error with the program "eftpos":
"eftpos:63: bad argument: string expected, got nil"
Can you help me?

Sorry if I have a bad English, I'm Dutch. :)/>
Yes, I didn't have time to explain the EFTPOS setup. You must first set up an account for the storekeeper, eg "999999.txt"
Then, run the eftpos client with "eftpos 999999" or whatever. I'll go put that in the description right away!
Sammich Lord #5
Posted 25 December 2012 - 09:42 PM
You can use turtles instead of RP2 tubes.
RunasSudo-AWOLindefinitely #6
Posted 25 December 2012 - 11:48 PM
You can use turtles instead of RP2 tubes.
What would be the best way to send a message to the turtle? Redstone, wireless rednet, bundled-cable rednet, elaborate rube goldberg machine?
Sammich Lord #7
Posted 26 December 2012 - 12:08 AM
You can use turtles instead of RP2 tubes.
What would be the best way to send a message to the turtle? Redstone, wireless rednet, bundled-cable rednet, elaborate rube goldberg machine?
Use rednet. It is instant and direct communication.
RunasSudo-AWOLindefinitely #8
Posted 26 December 2012 - 03:45 PM
Preview of upcoming 0.2 rewrite

Changes will include:
  • Umm… Nothing big, just a GUI!!!
  • Salted SHA-1 hashing for passwords
  • Maybe a management console for the server
gngz #9
Posted 28 December 2012 - 09:58 AM
Make compatible with Immbis mode cards.
HotGirlEAN #10
Posted 28 December 2012 - 02:47 PM
This is neat! Never seen a program like this before!
:)/> Colors? And also pastebin code please!
RunasSudo-AWOLindefinitely #11
Posted 28 December 2012 - 11:15 PM
0.2.0 Rewrite is Out!
v0.2.0 is incompatible with previous versions

Updates include:
  • A.. umm… GUI!! With colours!! (Now requires an adv. computer)
  • Removed dependency on RedPower tubes (Now uses a turtle 'round the back)
  • Lots of bug fixes (Or rather, I didn't re-implement the bugs during the rewrite)
  • Passwords are now salted-SHA1 hashed to prevent interception
  • Added version tag to rednet packets (Each packet now begins with "CC-Bank-0.2.0-Compatible"
  • Temporary removal of EFTPOS terminals. Will be added back in 0.2.1.
Download: http://bit.ly/RVQTQi
More details will be added to main post.
RunasSudo-AWOLindefinitely #12
Posted 28 December 2012 - 11:48 PM
Sorry for double-posting, but I wanted the update announcement as a separate post.

Make compatible with Immbis mode cards.
Maybe. I'll have to look into that peripheral a bit more first.

:)/>/>/> Colors? And also pastebin code please!
Colors is in the latest update.
There are too many files for me to upload to pastebin. Plus I have a grudge against it. No reason :)/>/>
HotGirlEAN #13
Posted 29 December 2012 - 08:38 AM
:)/> Well I mean, don't upload ALL the files to pastebin, just have one file on pastebin with the capability to download all the main ones from where-ever you keep your files.
RunasSudo-AWOLindefinitely #14
Posted 29 December 2012 - 01:55 PM
:)/>/> Well I mean, don't upload ALL the files to pastebin, just have one file on pastebin with the capability to download all the main ones from where-ever you keep your files.
Meh, can't be bothered. (That's a bad excuse but whatever. I'm the developer :D/>)
Plus, not all people have http enabled, so I'd have to include a .zip download anyway (because I'm not that ignorant).
Plus, it's not that difficult to Control-C, Control-V. Or just unzip if you have access to the .minecraft directory.
HotGirlEAN #15
Posted 29 December 2012 - 02:09 PM
It really isn't being "ignorant" nonetheless, for people to see this post in the first place they need internet, so enabling the HTTP api for them wouldn't be too much trouble.
RunasSudo-AWOLindefinitely #16
Posted 29 December 2012 - 11:04 PM
It really isn't being "ignorant" nonetheless, for people to see this post in the first place they need internet, so enabling the HTTP api for them wouldn't be too much trouble.
Security issues? I dunno. I might make a downloader if I have the time.
killie01 #17
Posted 31 December 2012 - 11:45 AM
Awesome, i am definetly going to use this for a shop on my server :)/>
RunasSudo-AWOLindefinitely #18
Posted 31 December 2012 - 02:44 PM
Awesome, i am definetly going to use this for a shop on my server :)/>
Glad you like it. You might want to wait until I re-implement EFTPOS though (or use an older version)

EDIT: I'm a Script Kiddie now! YAY!
Heracles421 #19
Posted 01 January 2013 - 07:01 PM
Heh, I was working on something similar today, untill I discovered your post.. Well the program is cool, I like it
Jojo.bacon #20
Posted 04 January 2013 - 05:51 AM
If you could use something besides turtles for withdrawal, that would be nice. :)/>
Love the GUI!
RunasSudo-AWOLindefinitely #21
Posted 04 January 2013 - 02:48 PM
If you could use something besides turtles for withdrawal, that would be nice. :)/>/>
Love the GUI!
Any suggestions? The original version used RP2 tubes, but that wouldn't be "vanilla" CC.
sithlordtom2 #22
Posted 05 January 2013 - 04:14 PM
I was just wondering if there was anyway to change the name of the bank. It would be a nice feature so you could have multiple accounts from different banks.
ShadowZenoX #23
Posted 05 January 2013 - 05:30 PM
:)/>/> Well I mean, don't upload ALL the files to pastebin, just have one file on pastebin with the capability to download all the main ones from where-ever you keep your files.
Meh, can't be bothered. (That's a bad excuse but whatever. I'm the developer :D/>)
Plus, not all people have http enabled, so I'd have to include a .zip download anyway (because I'm not that ignorant).
Plus, it's not that difficult to Control-C, Control-V. Or just unzip if you have access to the .minecraft directory.
Can you upload to pastbin, the tekkit server i play on has pastebin surport so i can upload files to the server for cc with pastebin but i cant with this one becuase there is no pastebin link =(
RunasSudo-AWOLindefinitely #24
Posted 06 January 2013 - 01:21 AM
I was just wondering if there was anyway to change the name of the bank. It would be a nice feature so you could have multiple accounts from different banks.
Yep, just modify the 'drawHeader' function in the 'gui' file!
Deathcon3 #25
Posted 14 January 2013 - 08:39 PM
hey, great program and all although on the bank server i get 'request denied', can anyone tell me why this is???
RunasSudo-AWOLindefinitely #26
Posted 14 January 2013 - 08:41 PM
hey, great program and all although on the bank server i get 'request denied', can anyone tell me why this is???
More information please!
What were you trying to do?
What error did you get on the ATM?
Did you set everything up correctly?
Deathcon3 #27
Posted 15 January 2013 - 06:56 AM
hey, great program and all although on the bank server i get 'request denied', can anyone tell me why this is???
More information please!
What were you trying to do?
What error did you get on the ATM?
Did you set everything up correctly?
the error on the ATM said, "transaction error!" and it occurs when ever I try and do anything, i get the feeling i've set this up wrong somewhere but idk where?
Thanks for your help so far
dmitchell94 #28
Posted 17 January 2013 - 09:35 AM
Love this and am setting it up on my server that runs Direwolf20s mod pack from the FTB launcher. But we also run some bukkit plugins like Iconomy. is there anyway to link this into Iconomy? and deposits dont work?

Also would be nice if the server allowed you to monitor the transactions
RunasSudo-AWOLindefinitely #29
Posted 17 January 2013 - 01:29 PM
the error on the ATM said, "transaction error!" and it occurs when ever I try and do anything, i get the feeling i've set this up wrong somewhere but idk where?
Do you get an error message on the server. Also, post some screenshots of your setup (in Minecraft as well as all your folders on the server) so I can verify everything's set up correctly.

Love this and am setting it up on my server that runs Direwolf20s mod pack from the FTB launcher. But we also run some bukkit plugins like Iconomy. is there anyway to link this into Iconomy? and deposits dont work?

Also would be nice if the server allowed you to monitor the transactions
Nope. I don't think there's any way to integrate this with iConomy. And yes, deposits aren't implemented yet (damn turtle.suck not taking any arguments…)
I believe the server allows you to monitor transactions. It tells you what stuff's going on and… stuff….
NeverCast #30
Posted 17 January 2013 - 02:43 PM

rednet.open("right")
serverID = 20
serverVersion = "CC-Bank-0.2.0-Compatible"
while true do
  rednet.send(serverID, serverVersion .. "{}")
  sleep(0)
end


Try run your Server :P/>
I know, I'm a horrible person

You should do a #bits < 3 check
and some or "" after your bits[n]. Maybe some more nil checks here and there :)/>

Nice work btw, I really like it.
RunasSudo-AWOLindefinitely #31
Posted 17 January 2013 - 03:55 PM

rednet.open("right")
serverID = 20
serverVersion = "CC-Bank-0.2.0-Compatible"
while true do
  rednet.send(serverID, serverVersion .. "{}")
  sleep(0)
end


Try run your Server :P/>
I know, I'm a horrible person

You should do a #bits < 3 check
and some or "" after your bits[n]. Maybe some more nil checks here and there :)/>

Nice work btw, I really like it.
I could implement security features, but I can't be bothered (maybe if I can find some spare time). Try making a program to transfer all of someone else's cash into your account, and maybe I'll patch it.
NeverCast #32
Posted 18 January 2013 - 02:51 PM
I couldn't :'(
dmitchell94 #33
Posted 19 January 2013 - 04:17 PM
Love this and am setting it up on my server that runs Direwolf20s mod pack from the FTB launcher. But we also run some bukkit plugins like Iconomy. is there anyway to link this into Iconomy? and deposits dont work?

Also would be nice if the server allowed you to monitor the transactions
Nope. I don't think there's any way to integrate this with iConomy. And yes, deposits aren't implemented yet (damn turtle.suck not taking any arguments…)
I believe the server allows you to monitor transactions. It tells you what stuff's going on and… stuff….

Well it would be nice to be able to integrate it with a economy plugin. give this plugin more use i think.

as for deposits cant wait for them to be implemented!

and never saw the server say anything so i didnt think it did anything but im the only one on the server right now so i guess it makes some sence.


But what would be nice is a system for a seperate computer to add accounts so you dont have to add the account via file editing
RunasSudo-AWOLindefinitely #34
Posted 19 January 2013 - 04:31 PM
But what would be nice is a system for a seperate computer to add accounts so you dont have to add the account via file editing
A management console is on the way. I'm sort-of taking a break from CC and brushing up on my assembly (for RPC) but that's on the list of priorities.
bbqroast #35
Posted 23 January 2013 - 09:24 AM
Damn, I was working on the same thing. (A bit different from what you've done, but the same purpose). Oh well.

In the meantime this is pretty cool. The turtle ATM is definitely a good idea (I have 3 computers per ATM machine and it takes up the space of a small house).
armytricks #36
Posted 30 January 2013 - 09:56 AM
I suggest you add my video on to this topic, I did a small review and guide on how to use this program.
URL: http://www.youtube.com/watch?v=9UhcUgBhdek
Thanks for your awesome programs by the way, it's really clever and cool. :D/>
zhivotnoya #37
Posted 30 January 2013 - 11:13 AM
Looks cool. I'll take a look at it tonight. Just a thought, but if you have MiscPeripherals loaded…try using the Player Detector instead of bank cards. It will send an event to the computer it's next to with the person's name, then just it read a file for the balance and pin code. Shouldn't be too hard to implement.
Skullblade #38
Posted 30 January 2013 - 11:33 AM
Its a cool idea but i think that you should only use the PIN numbers since allowing people to put in key cards would make it easier to hack
Mackan90096 #39
Posted 26 February 2013 - 06:41 AM
The deposit function doesent work
TheEvilSocks #40
Posted 28 February 2013 - 07:17 AM
The deposit button doesn't do anything, just to let you know :)/>
wilcomega #41
Posted 28 February 2013 - 07:45 AM
very nice. i love the gui.
darkrising #42
Posted 03 March 2013 - 01:25 PM
I was working on something like this too but cool program, I really like the gui!

By the way, you could use github and make an installer in pastebin, might make your life a bit easier.

Edit: Also you could use pcall on the atm to stop [ctrl] + T
wilcomega #43
Posted 03 March 2013 - 11:36 PM
or replace os.pullEvent with os.pullEventRaw
TheEvilSocks #44
Posted 16 March 2013 - 09:41 AM
The owner of this programs hasn't logged in for a while:
Last Active Jan 23 2013 08:29 AM
bluexephos500 #45
Posted 23 March 2013 - 11:31 AM
Someone i cannot do this please make a tutorial for me i just dont understand the .txt thingy on the server
rambo191 #46
Posted 28 March 2013 - 09:41 AM
what should i do for this problem i need help its kiling me gui :25: attempt to call nil on the atm, please respond as soon as possible
dmitchell94 #47
Posted 15 April 2013 - 06:32 PM
Would like to see this updated to include the managment console and the EFTPOS! if author wont anyone willing to update this and continue the development?
bpat #48
Posted 04 May 2013 - 04:23 PM
I have a question on the format do you put in the balance for the balance and in PIN number is the number part a number you make up if so how many digits
bpat #49
Posted 04 May 2013 - 04:24 PM
and when I try to do something the server gets a error on line 43
kikass1997 #50
Posted 06 May 2013 - 07:47 AM
is that a santa hat on top of the turtle on the atm?
theoriginalbit #51
Posted 06 May 2013 - 07:54 AM
is that a santa hat on top of the turtle on the atm?
It is, and it is a present on its back… It was a christmas special…
dmitchell94 #52
Posted 09 May 2013 - 10:04 AM
This program was never completed and has several big bugs. deposits and withdraws still dont work and some items were never coded.
tonkku107 #53
Posted 09 May 2013 - 10:24 AM
Saw this on youtube. Awesome gui
TorakTu #54
Posted 13 May 2013 - 04:33 PM
I am looking forward to future updates.
Cranium #55
Posted 14 May 2013 - 10:41 AM
No more necro. I believe the OP is no longer with this community, considering he made a post saying so a while back. I'm just going to lock this for now.