Jump to content




ServerShark (Server farm/Rednet program)

peripheral utility wireless

3 replies to this topic

#1 zxci

  • Members
  • 17 posts

Posted 09 February 2016 - 08:39 AM

Overview:
So a while back I made a tool suite called Modemshark which was solely aimed around being an easy-to-use rednet sniffing and scanning program. It had one major drawback being that it was limited by the Modem API to only 128 channels. Out of boredom, I made a new program that works with a server farm for full spectrum listening. It is nowhere near polished, but it's complete, it's easy to use, and it's also got additional utilities, so I'm posting it here. It is capable of both indiscriminate and discriminate execution, and by that I mean you can have the entire farm execute the same command, or you can selectively choose which computers in the farm do so. This makes tasks such as full spectrum rednet sniffing a breeze. Do with it what you want, just know that while it's not inherently harmful or malicious, it's kind of like a sword: you've gotta be careful with it (more on that later).

Note: I'm not updating this anymore nor have I since making it. Any changes you want you'll have to do.

Installation:
This pastebin file is for the controller, the master computer that will control the farm.
pastebin get GuqCXD34 (filename)
I saved it as startup, but you may save it as what you wish.

This pastebin file is for the farm computers, the slave computers that can discriminately execute commands.
pastebin get KMS7A8uR startup
I save this as startup so it always runs, else, there is little point in them being in a farm.

This pastebin file is optional if you do not want my rednet sniffer, but the master computer already has a bit of code based around it, so there's really no drawback to getting this anyway. This should also be installed on the slaves.
pastebin get mYMsCJqN serverShark
This needs to be saved as serverShark unless you want to edit the master's call.

To make installation faster, I recommend installing the master software, then creating a startup file on a floppy disk, and placing it in a network attatched disk drive (make sure all network modems are connected), then using the master's software to force a reboot for the entire farm. Then the startup disk you made should be having each computer call the pastebin downloads. You can easily install every computer at once this way.

How to use:
Using the software is relatively easy once installed. I never really intended for it to be used for anything other than full spectrum sniffing, so I didn't implement an easy way to input commands, but it's still easy to do so. Edit the master file if you wish. Here's how you call commands, from within the code:

IMPORTANT - The slaves assume their wired modem is on the back, and the master assumes it is on the top. You should always use a wired modem for this server farm utility.

Call FarmSWA(command) - this stands for SoftWare All. This command will tell the portions of the code on every slave computer's software what to do. It will execute this as a shell.run command.

Call FarmSW(command, computerID) - This calls almost the same function, however, each slave computer will only execute the command if it has the computerID specified in the message. Hence discriminatory command execution.

Call FarmFW(command) - This stands for FirmWare. It will tell each slave computer to execute the command that exists in the computer's firmware, or essentially ROM. So, for example, shutdown will shutdown the entire farm. Reboot will reboot it. You should allow for fairly long sleep durations between startup and command execution, as on slower servers, a farm of a hundred will take quite some time to start.

The fourth command available is strictly servershark related and will be listed below.
Those 3 commands should be all you need to control your farm, but if you want more feel free to code them in on your own.

ServerShark
Assuming you have opted to install servershark, this is how you should go about using it.

Call Chans(min, max) - This calls the function that initializes the entire process. Min is the lower channel, and max is the upper channel. For the entire spectrum that's 1, 65535. It will let you know if you do not have enough computers. With how i intended for this to be configured, it's roughly 250 computers.You don't have to specifiy a max value if you only want to listen in on one channel, but you shouldn't be wasting a farm on that anyway. I didn't care for efficiency. It's not hard to make that in survival.

ServerShark assumes you will have computers oriented in that the wired modem is on the back, and your wireless modems are on the left and right sides of the computer. Once you call the Chans function, they will begin sniffing automatically and the master computer will begin printing out messages on its screen. Typing "Stop" should automatically kill the process and shut down the farm.

Unlike modemshark there is no GUI and no logfile capabilities but you should be able to make them if you want.

Important
There are two major things you should consider before you use this software.
1. Servers can hit pastebin limits and sometimes be blocked from downloading more pastes for the day. Consider this when you are attempting to install software to every computer. I would recommend downloading the file once and copying it rather than downloading it repeatedly.

2. Unable to create a new native thread - This error will sometimes be triggered if there are too many active computers in Computercraft. I don't remember the exact computer count required to trigger this, but on the server I played on for some time, it happened quite often in the spawn town due to people having massive computer networks. Additionally, some 500 computers did the job in single player for me. You should always be considerate of others when you are using programs like this.

I dont consider this in any way malicious because one could just as easily place 500 computers and go around clicking each one on their own to do the same. Be responsible.

#2 Anavrins

  • Members
  • 775 posts

Posted 09 February 2016 - 05:11 PM

I remember posting my version of this a while back and being warned about it.
You could be using roughly 103 computers instead of 250 simply by having 5 wireless and 1 wired modems on each, that will make the production of the farm much easier :P

#3 zxci

  • Members
  • 17 posts

Posted 10 February 2016 - 07:57 AM

 Anavrins, on 09 February 2016 - 05:11 PM, said:

I remember posting my version of this a while back and being warned about it.
You could be using roughly 103 computers instead of 250 simply by having 5 wireless and 1 wired modems on each, that will make the production of the farm much easier :P

I am aware of this. When I made it I made it with the aesthetics of the farm in mind over the cost of it. Like I said, it's still very cheap to make. If someone wants to do it with five modems on each computer, they're more than welcome to :P

Edited by zxci, 10 February 2016 - 07:57 AM.


#4 X3ME

  • Members
  • 82 posts
  • LocationBeing the stereotypical kid in forums.

Posted 28 February 2016 - 10:05 PM

Great, great program!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users