Jump to content




Dark programs: Base security / Remote login / Keycards / Server & multiple clients


78 replies to this topic

#1 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 22 September 2012 - 03:15 AM

My programs are on github!

Mostly updated to computercraft 1.6+ , there may be a few bugs!

Darkprograms are a collection of programs written for base security. Features include keycards and remote passwords (for now!)
I recently did a major rewrite of all the programs but this functionality is implemented.

Features / Recent Changes:
  • All programs use stealth updates
  • Cardgen program is now built into the server!
  • Server has a more refined gui
  • Encryption is available for bundled cables (and rednet! - Encryption is always one
  • Communication is now done with tables rather than splits and joins (a lot more efficient)
Latest changes:
  • Security of communications has been improved
  • Disk ID gui now is security level filtered
  • Security levels now cascade with level 1 being the highest. (Meaning anyone with security level 1 clearance can open any level below them, 2,3,4,5,6,7,8 etc etc)
  • Client now has a much improved installer interface
  • Server has had a few changes too, pressing "l" (as in Lama) will bring up the security level switching interface for easy security level switching!
  • The client is now security enforced again, no more [Ctrl] + T
  • Various bug fixes and additions
How this works
A basic setup consists of a server and client computer
first you add the client computers id to the servers pc whitelist so that they can communicate, you then add a user to the servers user list
Type the user and password into the client computer and it will send to the information to the server for inspection, granting or denying access

How to download!
There is actually 2 ways of doing this, either grab my installer from pastebin just type: pastebin get Cf3NtVMi installer
Or you can grab my more up to date package downloader: pastebin get N22T449A dr
And then run the installer by typing: installer or dr

Note: dr stands for Dark Retriever, my more advanced package download system.

Tutorial
Spoiler

Screenshots
Spoiler

Edited by darkrising, 20 April 2014 - 03:22 PM.


#2 Pwrocks5648

  • New Members
  • 26 posts

Posted 29 September 2012 - 12:11 AM

Um Sorry im not very good at coding so this may seem like a noob question but i set it up but no matter what i do the computer just pops the card out with my sounds even though i tried every programname and program text i can think of, Please Help
Edit: oh wait sorry i was silly and didnt see the cardgen program
Edit2: sorry to bother you again but when i tried using cardgen to genorate a card then after it says "creating card....." then it says "bios:219:File not found" without the "" ofc but i think you missed some of the cardgen files in the download
Edit3: sorry i didnt read that the cardgen wasnt finished sorry, but what do you put on the card for the program to accept though? thats what i wounder and i cant find which lines check the disk for authentication
Edit4:still regarding the stuff in edit3 but also do i have to use a relay before the computers can connect?

#3 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 03 October 2012 - 07:01 PM

 Pwrocks5648, on 29 September 2012 - 12:11 AM, said:

Um Sorry im not very good at coding so this may seem like a noob question but i set it up but no matter what i do the computer just pops the card out with my sounds even though i tried every programname and program text i can think of, Please Help
Edit: oh wait sorry i was silly and didnt see the cardgen program
Edit2: sorry to bother you again but when i tried using cardgen to genorate a card then after it says "creating card....." then it says "bios:219:File not found" without the "" ofc but i think you missed some of the cardgen files in the download
Edit3: sorry i didnt read that the cardgen wasnt finished sorry, but what do you put on the card for the program to accept though? thats what i wounder and i cant find which lines check the disk for authentication
Edit4:still regarding the stuff in edit3 but also do i have to use a relay before the computers can connect?

Hi there :(/> the cardgen program is a bit of a work in progress so all it does at the moment is write a file to the disk called "card" with a number ID. (At the moment it just writes "1" "2" "3" etc)

The part that writes the file is:
function idsend(level)
  dofile("store")
  local numbea = numbea + 1
  levelchooser(level, numbea)
  local file = io.open("store", "w")
		file:write("numbea = "..numbea)
		file:close()
  return numbea
end
If it is throwing the error "file not found" just create a file on the computer called "store" as a temporary fix.
This is where the number that is put onto the disk is stored. I'm currently trying to work on a better system for the cardgen as "1, 2, 3, 4, 5" etc is not the most secure :D/>

Regarding the relay, you only need one if the client computer is too far from the server to communicate, its like a bridge between them as rednet only has a limited range.

Edit: I forgot to add, the client program (the one that waits for the disk) sends the id of the card from the file "card" on the disk to the server which then checks its ID array (sort of acting as a database) for the ID of the card, so all the cardgen program does is send a request to the server which then adds the ID to an array and stores it.
So if you add an ID to the server, say for example "djhannz" (it doesn't have to be a number) on the keycard inside a file called "card" you would have "djhannz" (without quotes)
I hope this explains it a bit better.

If you require anymore assistance don't hesitate to ask B)/>

Edit: information here may not apply to new programs

#4 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 17 October 2012 - 10:27 PM

Edit: Added up there :P/>

#5 esteves25565

  • Members
  • 6 posts

Posted 19 October 2012 - 03:34 PM

HI! My cardgen has a problem. when it ask the security level i put A.
when he ask a name, i put my name
but when i insert the disk and press enter the computer sad: bios:219: File not found
Please HELP!!!

#6 esteves25565

  • Members
  • 6 posts

Posted 19 October 2012 - 03:36 PM

 esteves25565, on 19 October 2012 - 03:34 PM, said:

HI! My cardgen has a problem. when it ask the security level i put A.
when he ask a name, i put my name
but when i insert the disk and press enter the computer sad: bios:219: File not found
Please HELP!!!
Forgot :P/>

#7 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 19 October 2012 - 06:52 PM

 esteves25565, on 19 October 2012 - 03:36 PM, said:

 esteves25565, on 19 October 2012 - 03:34 PM, said:

HI! My cardgen has a problem. when it ask the security level i put A.
when he ask a name, i put my name
but when i insert the disk and press enter the computer sad: bios:219: File not found
Please HELP!!!
Forgot :P/>

Yeah, i'm currently rewriting all of the programs, there will be a better cardgen program soon :)/>

#8 Pwrocks5648

  • New Members
  • 26 posts

Posted 25 October 2012 - 08:59 AM

Hey dose this version opnly work of 1.45?

#9 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 25 October 2012 - 01:09 PM

 Pwrocks5648, on 25 October 2012 - 08:59 AM, said:

Hey dose this version opnly work of 1.45?

It was made using 1.43 but should be back compatible as far back as when rednet was added.

#10 Juul

  • New Members
  • 2 posts

Posted 25 October 2012 - 06:37 PM

I'm getting an error:
cardgen:75: attempt to call nil
I've installed the cardgen correctly and when running the super PC I inserted a floppy disk, then it gave this error.
I've done everything needed, added the correct ID of my server, added the SPC as an SPC on the server, but it doesn't really feel like working.
Can you help with this or is this a bug which you are fixing?

#11 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 25 October 2012 - 09:31 PM

 Juul, on 25 October 2012 - 06:37 PM, said:

I'm getting an error:
cardgen:75: attempt to call nil
I've installed the cardgen correctly and when running the super PC I inserted a floppy disk, then it gave this error.
I've done everything needed, added the correct ID of my server, added the SPC as an SPC on the server, but it doesn't really feel like working.
Can you help with this or is this a bug which you are fixing?

Okay, thats odd, I'll look into it.

Edit: I have been unable to recreate the problem

Lines 74 and 75 are:
event, DiskSide = os.pullEvent("disk")
ID = tostring(disk.getDiskID(DiskSide)) 

It basically just fetches the disk's id when placed in the disk drive.

Can you tell me the version of computercraft you are running?

#12 Pwrocks5648

  • New Members
  • 26 posts

Posted 26 October 2012 - 06:46 AM

Hey dark what ever happened to the teir thing? or are you gonna add it in in a later version? also what about an autoupdating system for people with http api enabled?

#13 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 26 October 2012 - 12:53 PM

 Pwrocks5648, on 26 October 2012 - 06:46 AM, said:

Hey dark what ever happened to the teir thing? or are you gonna add it in in a later version? also what about an autoupdating system for people with http api enabled?

Yes I'm working on a "one server" solution for security levels, the server program is getting more and more complex each day it seems :D/> For now you could just have n amount of servers with clients to each server, for example server A, B, C, D :)/>

Regarding an auto updating system, I'm also working on that too, I'm wondering if i should build it directly into the programs or just have a update disk. I have a few ideas for that :D/>

Edit: All programs now have an inbuilt auto update feature using pastebin!

#14 Juul

  • New Members
  • 2 posts

Posted 26 October 2012 - 08:59 PM

 darkrising, on 25 October 2012 - 09:31 PM, said:

 Juul, on 25 October 2012 - 06:37 PM, said:

I'm getting an error:
cardgen:75: attempt to call nil
I've installed the cardgen correctly and when running the super PC I inserted a floppy disk, then it gave this error.
I've done everything needed, added the correct ID of my server, added the SPC as an SPC on the server, but it doesn't really feel like working.
Can you help with this or is this a bug which you are fixing?

Okay, thats odd, I'll look into it.

Edit: I have been unable to recreate the problem

Lines 74 and 75 are:
event, DiskSide = os.pullEvent("disk")
ID = tostring(disk.getDiskID(DiskSide))

It basically just fetches the disk's id when placed in the disk drive.

Can you tell me the version of computercraft you are running?

I'm running it on Tekkit which should auto update it, but I see now that it runs version 1.3.3, which is pretty old i think. I guess thats where the problem comes from. I'll have to wait for tekkit to upgrade then.

#15 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 26 October 2012 - 09:28 PM

Edit: Quoteception!
Spoiler

Aha I see, disk.getID() was added in cc 1.4, if you want I could change a few things so that it would work for cc 1.3.3

edit: just spent 10 mins changing the cardgen and client so they read a file instead of the disk id, as i don't have cc 1.3.3 I cant test it but I'm sure it will work :D/>

Cardgen for cc 1.3.3
Spoiler

Client for cc 1.3.3
Spoiler


#16 ibitmyeye3

  • New Members
  • 5 posts

Posted 31 October 2012 - 01:05 AM

I'm getting a no response from server while trying to log in with my client. I've added myself to the users...

#17 DMACNZ

  • New Members
  • 6 posts

Posted 31 October 2012 - 05:25 AM

could you maybe do a tutorial please

#18 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 01 November 2012 - 01:23 AM

 ibitmyeye3, on 31 October 2012 - 01:05 AM, said:

I'm getting a no response from server while trying to log in with my client. I've added myself to the users...

Have you tried updating the server? I release minor bug fixes quite frequently so you might have a bugged version.
Edit: i just re-read that, have you added the computer id to the server's pc whitelist?

 DMACNZ, on 31 October 2012 - 05:25 AM, said:

could you maybe do a tutorial please

Yes, I'm planning on writing one to explain everything, I would do a youtube video but my upload speed is terrible.

Edit: I wrote a tutorial, its in a spoiler half way down the post

#19 darkrising

  • Members
  • 234 posts
  • LocationScotland

Posted 01 December 2012 - 11:10 AM

I have updated the server file to version 3.0 this includes my new api that will download automagicly if the http api is enabled.

Not much has changed front end but I'm planning a lot more features for the server / client / cardgen programs.

The update feature has been changed slightly to allow for a more diverse system, the new server program uses the new update system!

more updates soon :)

#20 BeastCoder123

  • New Members
  • 1 posts

Posted 04 December 2012 - 05:01 AM

Is it possible to use this just like a login database?

I want to use your program, but i cant really figure out why the client keeps resseting! (Back to the login screen)

I tried for 6 hours to figure it out with a friend of mine and we couldnt. :(

Please help





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users