PDA

View Full Version : SBox / NewCS Control Script v1.4b



me1960
07-01-10, 16:48
SBox / NewCS Control Script v1.4b

'' I have a friend, it seems that the R180 is to constantly NewCS, I made a script to check if there for, if you do a restart.

The script goes for SBox or NewCS, they manage EMU like CCcam one seconds.



These are the new environment variables:



# Variables de entorno
__SET_TIME_DREAM="1" # If your dream does not have antenna enable this function to make it on time: 0=OFF | 1=ON
__FOLDER_BIN="/var/bin" # Folder where the files are Bin: /usr/bin | /var/bin
__TIME_TEST="20" # Seconds it takes to return to see if the EMU / CardReader is working
__FILE_EMU="sbox" # Bin file name we want to control
__SET_START_EMU2="1" # If you need to use EMU2: 0=OFF | 1=ON | 2=Reboot EMU2 On Bug
__FILE_EMU2="cccam" # Bin file name we want to control, second EMU
__FILE_LOG="/tmp/sbox.log" # Log file name you wish to test
__FILE_LOG_MAX_SIZE="8000000" # Maximum file size log: 100000=100kb | 1000000=1Mb
__SET_LIST_HOSTS="google.es google.com" # Server to check whether we have internet: google.com
__SET_TEST_WAN="1" # If we control our internet connection: 0=OFF | 1=ON
__SET_TEST_WAN_TIME_SLEEP="60" # If no Internet, we expect 8 seconds before rechecking.
__SET_MAX_SPACE_USED="90" # Limit max space: 90% Used


__SET_TIME_DREAM
This option is useful when our dream is not connected the antenna cable.

One may think that take time and with the correct date, it is nonsense when antenna is not used, because this dream is just a server.

Well, usually the servers, aunq autoreinicia are CCcam that alone, for cool to restart once a day, usually 06:30 am, if you get up with piles screwed!.

What happens if you have no time setting the dream ... it may not work the autoreinicio using crond, linux watch, and something so simple can become an inferno.

The problem with this, is that the dream does not have a watch battery to ensure that the date and time are saved on every restart or if the power goes out.

Well, if you activate this option, the dream automatically every time the restart or autoreinicie daily configured at boot time and date automatically, the latter may not be accurate, but not important.



__FOLDER_BIN
Here we tell if our dream uses

* /var/bin
* /usr/bin

If you want to use Linux, Ubuntu or Debian, this is where we must put the address NewCS bin file if you use it SBox SBox.



__TIME_TEST
Variable to control the refresh of the script, by default we have tested in 18 seconds, 18 seconds does it take to see if NewCS still online.

If we lower the 18 seconds, which can occur, esq NewCS detects that the script stopped working when it is not, and restarting NewCS happen, or SBox, which uses.

Anyway, it is interesting to check it out yourself, maybe your network is more quiet and if you go down to 15 or 10.



__FILE_EMU
This is where we put the bin file name we use. If your bin is called: Newcs_1.67

We must put that name in the variable: __FILE_EMU="Newcs_1.67"

If we use SBox: SBox_0.0.5

For as: __FILE_EMU="SBox_0.0.5"



__SET_START_EMU2
Normally if you use CCcam or NewCS use MBox also because this variable we activate our second EMU.

It has 3 positions:

0. Second EMU OFF -> Does not start the second EMU
1. Second EMU ON -> Start the second EMU at the beginning of Script
2. Second EMU ON -> EMU starts the second to start the script and besides, EMU2 restarts each time the operating EMU1, this is interesting for people who say they lost NewCS Reshare to restart, in my case I have never seen that happen, but if people I will say something.


__FILE_EMU2
This is where we put the bin file name we use for the EMU2. If your bin is called: CCcam_2.1.4

We must put that name in the variable: __FILE_EMU="CCcam_2.1.4"

If you want to use MBox: MBox_0.6

For as: __FILE_EMU="MBox_0.6"



__FILE_LOG
Here's where this LOG file that we will control.

The LOG file you must create and manage EMU1, in this case SBox NewCS or, later will explain how to enable and configure.

This script looks complicated but is actually very simple and basic, if NewCS was a not a CardReader EMU as it otherwise might do something more sophisticated, the problem is not an EMU esq, is just a CardReader.

For SBox is very interesting as it is a CardReader / EMUServer, this means that you can get their hands on many sites using Enigma global variables, these variables could be used to determine whether still working or exploited, and all this without using a log file.



__FILE_LOG_MAX_SIZE
This variable is the maximum size of the log file, so our dream will not stay free space.

We are testing in a DreamBox 500 +, this has much more memory, defaults have left 8Megas.



__SET_TEST_WAN
This helps control our dreambox has the internet if the modem or router is restarted or burned, the script stops and enters an infinite loop where every 30s if we double check the internet.

Until we have the internet the script will do nothing more than that.

When the Internet becomes, the script exits the loop and continues on his way.



__SET_LIST_HOSTS
This variable contains the list of hosts that we use to test the internet connection, in this case I'm using google it is the fastest for my network, if you have a host can use it faster.

Typically, use 2 if you want to add a third no problem, you can use as many as you like, always remembering that each host will make the script more late in making its findings.



__SET_TEST_WAN_TIME_SLEEP
This is the time in seconds, to wait before returning to check if we have internet, so this setting only applies in the case of not having internet, when the Host is give an error when the script stops until recheck Internet.



__SET_MAX_SPACE_USED
New variable to control the free space on our Dreambox, is a percentage value, defaults to 90%, remember that only write the number without the % sign.




You need to activate or SBox NewCS LOG

SBox: sbox.cfg



[main]
server_only=1 # 0=emu+newcamd server 1=only newcamd server
log=1 # 0=no log 1=log to /tmp/sbox.log
NewCS: newcs.xml





<debug>

<password>newcs</password>
<level>normal</level>
<type>ecm</type>
<output>console,tcp,file</output>
<logfile>/tmp/newcs.log</logfile>
<console_options>normal,init</console_options>
<tcp_port>1001</tcp_port>
<tcp_options>normal,init</tcp_options>
</debug> ''

download :

http://rapidshare.de/files/48957238/SBox_Control_Script_v1.4b_2_.rar.html