Jump to content


bbqroast's Content

There have been 75 items by bbqroast (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#122381 Authenticate two computers against each other

Posted by bbqroast on 31 May 2013 - 04:22 PM in Ask a Pro

View PostBomb Bloke, on 31 May 2013 - 06:47 AM, said:

View Postbbqroast, on 31 May 2013 - 01:18 AM, said:

Also, I'm not really understanding the documentation right now but I believe that the Rednet API uses port numbers for send function. This would mean that an attacker can simply listen in on "private" communications using the send() function by listening to the correct port number.
The modem API uses channels (or port numbers) for its transmissions. It's rather like a radio-frequency based transmission system - anything that "tunes in" can send/receive to anything else that's on that channel, but has to put up with the "noise" from anything else on that channel...

The Rednet API doesn't have any concept of port numbers that I can see, but does have an "open port" detection system in rednet.send that could be misleading you - the documentation is rather ambiguous as to what it actually does, but if I'm reading it correctly, it'll block the program and auto-resend until the receiving computer is actually trying to receive a message before halting transmission (rather then "just sending it", and potentially having the message lost because the receiver was doing something else at the time). I'd have to test it to be sure.
I've used Rednet.send a few updates ago, and that basically sends the message once, but only the specified computer can receive it.

The issue is that I think Rednet.send uses port numbers to achieve the computer to computer comms, but now the modem API is open someone can listen into rednet.send.



#122185 Authenticate two computers against each other

Posted by bbqroast on 31 May 2013 - 01:18 AM in Ask a Pro

View PostCalimore, on 30 May 2013 - 04:12 AM, said:

Hi bbqroast,

thanks for your reply. This is great... In general I know how this works but I never tried to implement something like this. I am more of a tech guy than a coder... :rolleyes:

There's something I don't get right away... The above link is for an AES implementation which is a symmetric crypto cipher (so the same key is used for en/decryption). In your post above you claim that the API "provides public/private key auth". What am I missing...?
Complete fail on my behalf sorry, I'll try and find a asymmetric encryption addon/API. This: http://pastebin.com/8T1Vh18R appears to have support for asymmetrical encryption. (my bad, apart from the version checks and stuff it seems completely incomplete).

The main issue with the use of computer IDs as authentication is that you're trying to build a watertight wrapper, as opposed to a waterproof package. If you build a waterproof package (so to speak) then you can transport information with as much negligence as you want (even letting it fly through enemy systems) and it will remain safe and secure. More importantly, if you're using Computer IDs you can't get the message over long distances (admittedly, a node based send only "secure" system was something I have been thinking of).

Also, I'm not really understanding the documentation right now but I believe that the Rednet API uses port numbers for send function. This would mean that an attacker can simply listen in on "private" communications using the send() function by listening to the correct port number.



#121920 Authenticate two computers against each other

Posted by bbqroast on 30 May 2013 - 03:45 AM in Ask a Pro

http://www.computerc...ft-crypto-rev1/

That's an API that provides public/private key authentication. It's quite useful, public private key encryption creates two seperate keys, one for encrypting and one for decryption.

If you want to "authenticate" a computer (ie know it is who it says it is).
You first need to create a key pair, give the decryption key to any computer you wish to talk to (ie the public key) and keep the encryption key (ie the private key).
When the computer wants to send a message it encrypts it first, and the receiving computers who decrypt the message know it was sent by the computer because it was encrypted using your encryption key, which is kept private. The public key (decryption key) in this case is often called a certificate.
To expand on this, you can provide all computers with the decryption key of a master server, when they want to connect to another computer the master server (after authenticating with them) provides them with the decryption key of the other computer, that way you can have a large network of computers that can expand dynamically (as long as they all trust the central master server).

If you want to send a message securely the receiver (after being notified of the incoming message) simply creates a key pair, sends the encryption key over plain text to the sender who then encrypts the message and sends it back. The main risk here is an attacker can pretend to be the receiver, to secure against this do two things: quickly share a "secret" using the encrypted line so the receiver can verify any further communications (this way the attacker can't wait for the sender to send some valuable information (eg a password), the attacker can't get the number but it can send some spoofed information (for example a command that requires the password to be entered). If they have a shared secret then the receiving computer knows that it is the same computer talking), however this does not prevent an attacker from starting the conversation from the start (and pretending to be the server) so using a "certificate" (as outlined above) is a good measure.



#106902 [WIP] Web inteface for uploading and downloading scripts to servers

Posted by bbqroast on 06 April 2013 - 03:19 PM in Media

View Postsuperaxander, on 28 March 2013 - 09:05 AM, said:

Is there any protection involved in here for not putting stuff on a computer that isn't yours
Yes, pretty basic. You need to place a file in the root directory of the computer with a password in it, you can then use said password to upload/download files. Not amazing, but it gets the job done and it was the best thing I could think of within the limitations of the current system.



#106900 hey guys im gonna start making vids of mc and more

Posted by bbqroast on 06 April 2013 - 03:14 PM in Media

Ok, firstly, I'd recommend coming back when you've got some ComputerCraft related videos up so we can provide feedback. Don't link to a Harlem shake video.
Secondly, don't plagiarize, ever. Most of the videos on your account seem to be relatively low quality copies of other people's content. Don't reupload other people's stuff and if you use music in your videos make sure the composer allows it to be shared and make sure you credit them.



#106879 hey guys im gonna start making vids of mc and more

Posted by bbqroast on 06 April 2013 - 01:29 PM in Media

View Postromotoma, on 29 March 2013 - 07:40 AM, said:

-_- jerk.....

View PostCranium, on 29 March 2013 - 07:38 AM, said:

View Postromotoma, on 29 March 2013 - 06:48 AM, said:

well im gonna do things noone has done like go around servers trolling ppl lol make tutorials on how to download and install hacks and plugins how to port forward and its not only gonna be minecraft vids its gonna be slender im gonna put my webcam and record also counterstrike and halo 4 assassins creed and a bunch of stuffies. lol hey guys btw check out my youtube channels forums i made forums for all games its related to my youtube acc so here descensionx.forumotion.com there are forums on almost all games so take ur pic and start posting ty all.
Have you ever heard of the words, 'punctuation', 'capitalization', 'spell-check', and 'grammar'? I don't know about others, but I, for one, would not like to watch the videos of someone who can't be bothered to format his/her sentences properly. You might want to take some extra lessons to improve those insufficient grammar skills, my friend.
-_- jerk hole, I dont really care about how i type when im in a hurry.
Why should we waste our time watching your videos if you're not willing to spend sometime on us? Robbaz is a somewhat popular Youtuber, he spends hours composing each video (I imagine some he has done over many days) yet many of them are less than 30 minutes long. Movies take years to produce, yet they're rarely more than 2 hours long.

If you're not even willing to spend a few seconds extra adding basic punctuation what makes me thing that you will make half decent videos?



#106441 Tips and snipplets for Operating System creators!

Posted by bbqroast on 05 April 2013 - 11:54 AM in General

View PostCloudy, on 02 April 2013 - 01:37 PM, said:

error("Custom OS's are mostly useless and not deserving of the name")

This snippet should be in all OS's.
^This. 10/12 programs posted here are "OSes" can't something cool happen?



#106437 Are Turtles Entities?

Posted by bbqroast on 05 April 2013 - 11:48 AM in General

Surely D20's mod pack has some mod that has chunk loaders?



#101280 [WIP] Web inteface for uploading and downloading scripts to servers

Posted by bbqroast on 24 March 2013 - 04:00 PM in Media

View PostKillaVanilla, on 03 February 2013 - 04:18 PM, said:

What I would do: Use HTTP, or one of the many copy/paste programs around.
Still though, nice work. I'm assuming it's server-sided.
The reason I coded this is because most public servers don't want to have HTTP enabled. It's a security risk and could land the admins in some hot water as well. I've seen a program to rapidly type in your program but I thought this may be a cleaner solution.

View PostSimon, on 24 March 2013 - 10:01 AM, said:

Sorry for my noobeness ,but how does one use this?
It's for server admins (well players would use it, but your server admin needs to install it), you just put the included scripts in your web folder (requires PHP) and edit the DIR variable. You may also need to configure your webserver/php installation to allow access to your Minecraft world's "computer" directory.



#84573 AI program

Posted by bbqroast on 06 February 2013 - 07:44 PM in Programs

View Postrhyleymaster, on 06 February 2013 - 12:22 PM, said:

This is a VI. Not an AI. AI is self thinking. Their is no true AI.
Just thinking, is this thing just copying other people? Is that not what babies do? Have you ever wondered why the first things children often say is "juice", "no" and et cetera? It's because these words are commonly spoke around the child. After a while the child starts building up a database of knowledge of these words and begins to string together coherent sentences, copying the people around it. Children however have far more senses than this computer. They can see, hear, smell, taste and more. Using this the human brain builds up links between things (so if a parent makes lots of comments with the word "bee" around that weird flying black/yellow thing then the brain links the two together), brains are especially powerful becsause of the way neurons are linked together (computer parts are normally linked to a handful of other components, neurons can be linked to hundreds of other neurons). When computers catch up they could possibly have artificial intelligence of their own.



#81601 FTB CC Railcraft Switching

Posted by bbqroast on 29 January 2013 - 04:08 PM in Media

View Postredeye83, on 28 January 2013 - 07:19 PM, said:

This all seems very complicated lol.
The system I thought of using was this:
A player picks the station they want to get off at from a computer. That computer tells the track that the next train is going to stop at x station and all the switchs change to make the train go there. then you get on the train and go. wouldnt it be easyer to work out the routes yourself rather than get a computer to do it?
The point of my system is it can navigate through multiple intersections. So there could be 100s intersections in a cart "network" that connects to my house and my friends house, but the computer finds the quickest way through all these intersections to my friends house.



#80356 [WIP] Web inteface for uploading and downloading scripts to servers

Posted by bbqroast on 25 January 2013 - 01:56 PM in Media

View PostDlcruz129, on 25 January 2013 - 12:51 PM, said:

Nice job!
Thank you.



#80268 FTB CC Railcraft Switching

Posted by bbqroast on 25 January 2013 - 11:05 AM in Media

View PostOrwell, on 25 January 2013 - 08:51 AM, said:

Dijkstra didn't put all his effort into a path finding algorithm for nothing :P : https://en.wikipedia.org/wiki/Dijkstra's_algorithm
Dijkstra's algorithm is more efficient than what you're describing there (if I understand you right).
Also check out A*, it's more efficient than Dijkstra through the use of heuristics.
I believe his algorithm is more or less the same as mine (actually, it looks exactly the same).
A* looks really clever in the way it solves things.



#80267 [WIP] Web inteface for uploading and downloading scripts to servers

Posted by bbqroast on 25 January 2013 - 11:01 AM in Media

So you've got that 5000 line program written and ready to go. Now you just need to get it onto your server... damn, oh well, time to pull an all nighter I guess. 2 months later, the server side version of the code is nothing like the original, now spanning 10,000 lines it's a purely amazing piece of work. Then the admin says he's shutting down the server, and tells everyone to start copying down the programs that they want to keep. Who will come to your rescue?

Web Turtle
[insert theme tune here]

WebTurtle is a web inteface that allows you to upload and download files from your in game computers. It's simple and easy, and is secure (note: you're responsible for the security of your ingame computers). You simply place a passkey on your computer and then use the web inteface to upload and download scripts. It's pretty basic right now (you still can't upload files to subdirectories of root for example (I haven't worked out how to do this without letting users access files outside of the computer) but it's enough to work (hopefully).

Here's an album showing off the project so far:
http://www.imgur.com/a/RQKQg

Download:
http://www.mediafire...2g26oq3ogp9oych
Simply change the $dir variable (open the PHP scripts with and standard plain text editor) in the top of "download.php" and "upload.php" to the path to your computer file (within the world folder, this should work fine for Linux, note that warnings/notices should be disabled otherwise PHP will put in some ugly headers when you do something wrong (the code has error feedback so the user should now what they've done wrong, PHP's errors are meant for developing)).



#80072 HTTP Requests sent from client (on a multiplayer server)

Posted by bbqroast on 24 January 2013 - 08:50 PM in Suggestions

Also, it becomes a security risk (not that servers where people who would do risky things are on should have HTTP enabled in the first place).



#80071 FTB CC Railcraft Switching

Posted by bbqroast on 24 January 2013 - 08:37 PM in Media

View Postredeye83, on 23 January 2013 - 07:39 AM, said:

So how would this "node" system work in a practical sense? I've created a rail tracking system that whos if a train is on a part of the track or at a station. I use multi line as I'm basing mine on my local train network.
I'm working on a big project and there could be a need for a subway system and this might be useful for that.
Came up with it a while ago:

Quote

Start at node A, move to all the nodes connected to node A via a spoke. At each new node store the following values:
The path traveled (example A-C), and the distance traveled.
Repeat from each node, adding the new node's identifier to the end of the string (eg A-C-G) and counting up the distance. If you hit a node that has already been explored, compare your distance with the distance that the previous path had traveled. In the previous path was shorter, stop if not delete it from the node and continue.
You cannot visit the same node twice from the same path. A path is finished when it cannot find nodes (with longer travel distances) to move to. When all paths are finished, compare them and find the shortest one that goes to your destination. You should have a string giving you all the nodes you must travel through, eg:
A-G-H-V.
It's basically the underlying code behind any pathfinding algorithm as it happens.



#79323 CC-Bank with ATM, EFTPOS, Auth. Server

Posted by bbqroast on 23 January 2013 - 09:24 AM in Programs

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).



#79173 FTB CC Railcraft Switching

Posted by bbqroast on 23 January 2013 - 05:47 AM in Media

View Postsoccerboy5411, on 12 January 2013 - 04:19 PM, said:

Similar to the way a computer network routes packets? That would make expandsion very easy, but would require a lot of initial setup and programming. That would be awesome to see the multiple carts traveling in the different directions
Yeah. I actually wrote a node network system, it worked surprisingly well (very little code, pretty fast) but I never got it ready for release. The idea would be to use that to setup a large network, then the Minecart system could use it. For example, you could have an automated system:
I use an app on my computer to request some fuel.
The nodes pass around the message, eventually it reaches the fuel server.
The fuel server fills a railcraft tank cart and sends it to the nearest Minecart station. As it does this it gives the central Minecart server (over the node network) a "rail plan" (basically saying the destination of the cart along with its ID). Then the server works out the best route and tells all the stations along that route (once again, over the network) which way to send the cart when it arrives.



#74720 Top Level Coroutine Override

Posted by bbqroast on 15 January 2013 - 08:56 AM in Programs

The amount of control we get over the upper level stuff in CC has always saddened me. I can't work it out, but does it require a change to any of the ROM files?



#72981 FTB CC Railcraft Switching

Posted by bbqroast on 12 January 2013 - 08:51 AM in Media

I wrote an algorithm (pseudo code, but I imagine it wouldn't be to hard to implement in LUA) to map out the quickest route through a series of dots connected by lines (it would count the varying length of the lines). Swap dots for CC controlled railway stations and lines for railways (and the length of them for travel times) and you have a working mesh type rail network. It would be pretty cool, with all the computers talking to each other. Ideally, a central server would hold a binder of all the routes. A "client" computer determins the best route using the algorithm (fetching an array of dots and spokes from the server) and sends it to the server. The server would then notify the controlling computers for each dot the cart will pass.

This would ideally use chunkloading, relay stations, railcraft and my Cart Manager mod/plugin (lets you get the ID of a cart, so the hubs can identify said cart).



#72848 eMeter - count your energy Business

Posted by bbqroast on 12 January 2013 - 03:33 AM in Programs

Well, I'd say you need to input the EU/t and then it monitors for when the EU is running. I'm going to try and make a system to maintain a solid EU/t value. Probably 32EU/t.



#58364 Minecraft Joules Calculator for buildcraft pipes

Posted by bbqroast on 10 December 2012 - 06:56 PM in Ask a Pro

Posting on the computer craft forums about a buildcraft thing with a screenshot including the IC2 energy meter. Facepalm.

This would be impossible, unless BC has an API for this, I guess you could check every engine and see if it is on and then count up the MJ. But I believe engines can work at a variable pace.



#58362 Load chunk on modem.

Posted by bbqroast on 10 December 2012 - 06:54 PM in Suggestions

View PostSebra, on 10 December 2012 - 07:15 AM, said:

Have seen it. It keep chunk always loaded. And non peripheral chunkloaders too. But I want it loaded on demand.
Why? That will only slow things down even more. When things are being loaded on demand your computer keeps having to read from a disk which would cause lots of lag. By using chunkloaders you atleast stop Minecraft constantly hogging disk IO.



#58223 copy:13: Access denied

Posted by bbqroast on 10 December 2012 - 09:38 AM in Ask a Pro

Can you not just copy the "list" program to a folder outside of the rom? cp /rom/programs/list /list ?



#56039 What can cause a peripheral to disconnect?

Posted by bbqroast on 02 December 2012 - 05:29 PM in Peripheral Help and Discussion

I'm wrting my own peripheral, and for some reason instead of giving me back useful data it just spams the console with "peripheralleft" "peripheralleft_disconnect"!?! So, what can cause a peripheral to disconnect? BTW I'm using a looped os.pullEvent() to try and catch the data my peripheral should be sending.