Author: mind
Author Website:

Version: 0.9.0.1

Short description: Arma Server Control Tool can be used to execute SQF scripts on server directly, by using standalone server side application.

Date: 2017-04-03 08:33


Comments: (0)
Rating:



 



ASCT – Server managing tool for admins

by
mind


Description:
Arma Server Control Tool can be used to execute SQF scripts on server directly, by using standalone server side application. Idea behind this project is to solve the problem that, in many cases it is hard or straight impossible for server administrator to execute certain scripts on server, also it most likely involves joining server with game client. A lot of times server admins are not able to quickly react to some event on server due to absence of a PC with installed arma nearby.

With ASCT all you need to do is to login to your server with remote Desktop or TeamViewer, right click on script.sqf and select ASCT Execute.

NOTICE!
This application REQUIRE root access to server, you MUST be able to connect to server with remote desktop or TeamViewer. If you have only web access this application is NOT usable.

Target audience
This tool supposed to be used only on server side. it is made for server admins and developers. Currently this program can be used only on windows platform.


Installation:
Armaholic note:
.dll files can harm your PC! Before running this you should make sure you understand the risks!
Armaholic and its staff can never be held responsible when any file you download from our website causes any damages, disruption in services or anything else in any way! Downloading and installing these files is totally at your own risk!
We have run anti-virus tools on the included files and found no issues but this is no guarantee!

1) Copy paste @asct folder to root of your server alongside with other addons
2) Change your server startup parameters by adding -serverMod="@asct;"
3) Copy paste “asct_console†anywhere you like.
At this point you are basically done, you can now use asct.exe as console app. However there are few optional steps to make your life simpler.

4) Optional. If you are running several arma servers on single machine, you should set "instanceID" in order to distinguish arma servers. To do that execute following expression on server init
asct_instanceID = “your_idâ€;
Select something descriptive as “your_id†but use only a-z,0-9 and _ characters.
5) Optional. When directory for asct.exe selected, run Add_ASCT_to_context_menu.bat, that should be found in same directory. Remember to run it as administrator. This will add “ASCT Execute†option to windows explorer context menu. In case you have several servers on same machine, open Add_ASCT_to_context_menu_instance_yourID.bat file and edit 3rd line. instead of "yourID" type in same instanceID you used in step 4. Save .bat file and execute it as administrator.
6) Optional. For notepad++ users. Copy paste asct.dll from “Notepad++ plugin†folder to “C:\...\Notepad++\plugins\â€


Usage:
For usage instructions and information of how to use ASCT please refer to the included documentation and/or example mission.

Use as console application
There are several ways to use app. They all have some pros and cons, choose one you like more. For sake of clear examples let`s assume you put asct.exe in C:\asct_console\ folder.
As most console apps, this require user to provide parameters. Only one parameter can be used at once.

1) Execute script from file
-f <filename>
Example: C:\>asct_console\asct.exe -f "C:\my scripts folder\script.sqf"
This is simplest method, nothing much to say here, app will read whole file and execute it`s contents. It is also possible to pass only filename, in such case file must be in same folder as asct.exe. This method allow file to have both single line comments // and multiline comments /* */. However, preprocessor directives are NOT allowed (#include, #define, __MACRO__, etc…). SQF files should be encoded as UTF-8.

2) Execute expression
-e <expression>
Example: C:\>asct_console\asct.exe -e "diag_log \"hello from RPT\";"
This method is very straightforward, thus can be useful for only very simple commands. As you can see it require to escape inner quotes and some other technical characters like %, it does not support any comments and must have whole expression in single line. However, it might be useful if you like to use asct in conjuration with some batch, PowerShell, VBS or whatever else scripting methods you like.

3) Execute base64 encoded expression
-b <base64code>
Example: C:\>asct_console\asct.exe -b ZGlhZ19sb2cgImhlbGxvIGZyb20gUlBUIjs=
This one accepts script expression in form of UTF-8 string encoded as base64. What you see in example is basically “literal†representation of bytes of UTF-8 string diag_log "hello from RPT"; This method combine ability to have whole expression in one line, allowing single and multiline comments and accept expression of any complexity. Encode/Decode algorithm borrowed from here http://www.adp-gmbh.ch/cpp/common/base64.html. You can use online services to encode script as base64, google for it.

Optionaly, if you have several instances of arma servers, there is also one additional parameter to tell on which server script must be executed. It can be used in conjuration with other parameters.
-id <instanceID>
Example: C:\>asct_console\asct.exe -f "C:\my scripts folder\script.sqf" -id your_ID
You can use this parameter before or after expression parameter. In this way script will be executed on server with given instanceID.

NOTE! In windows, applications have limits on length of parameters. At max it is 32768 characters, but command prompt has own limitation of 8191 character. However, there is no limitation for size of script inside SQF file, so first method can be used on very long scripts.

Use as notepad++ plugin
If you are using Notepad++, you can install asct plugin for it. It will allow you to execute scripts directly from notepad++. After plugin is installed (see Install. step 4) you must specify full path to asct.exe. To do that, on toolbar press Plugins->ASCT->Settings. There you will see input box, write full path to ASCT and press OK. When you have your script ready, press Plugins->ASCT->Execute to run it. Notepad++ allow to have several documents opened at same time, but only content from currently active document, will be read and executed.

if you have several instances of arma servers, you should add their instanceIDs to a list in settings menu, once it is done, you will be able to select target server with "Execute at..." pressed. It is also possible to select certain server as default target by selecting instanceID from list and pressing "make default" button, after that, selected instanceID will be used in Execute funciton. By pressing "make default" button with no selected server, instanceID will be "unset".

Use as windows explorer context menu
You can also execute scripts directly from windows explorer by using right-click context menu. Follow step 5 from installation to get “ASCT Execute†option in context menu. Now navigate to folder with your script.sqf file, right click it and select “ASCT Executeâ€. As with other methods, here you can have direct execution on each of your server instances.


Notes:
Security & Battleye
This application does not use any “cheating†methods to do it`s job, no memory reading/writing, no dll injections or anything else like this. All it does is using callExtension command to communicate with asct_ext.dll from which receive and call compile expressions. This application is not meant to be used on client, thus it will be immediately blocked by battleye which is totally intended behavior. On server side, on the other hand, battleye have much less limitations (if any) and allow use any extensions. If you like to use application on client for development/testing feel free to do so with disabled battleye.Similarly, asct.pbo is not signed as it should NEVER be required mod, nor used on clients in actual game. In current implementation, there should be no way for cheaters to exploit application in any way, unless they have root access to server.

Web interface
Allowing to have asct available in browser on remote PC is something that I am very interested in doing. I realize many server owners have no root access, only some sort of web control panel with limited functionality. It would be amazing to allow use of asct for them as well. However, such a thing would require A LOT of safety considerations, it is direct control of server execution from internet after all. Does not seems to be very SAFE idea. Nonetheless I will consider implementing this as experiment. If you feel like helping me out with ssl and web development, send me a PM.

Current version and goals
Current version of application is 0.9.0.1. Next version will have bug fixing that hopefully will be found in the course on few next weeks. Once all bugs sorted out there will be final version 1.0. There probably will be no new functionality available in final version.


License / Disclaimer:
This application is released under GNU GENERAL PUBLIC LICENSE version 3.
If you redistribute this application, please mention author and give link to this forum page.


Changelog:
v0.9.0.1
Here you go, x64 update. Only one file added "asct_ext_x64.dll" everything else (plugin, exe, bats...) stay same.

v0.9.0.1
allow executing only portion of text from currently opened file. As with "Execute" command, "Execute segment" will use default instanceID.

v0.9.0.1
- Added support for multiply servers
- Additional logging

v0.9.0.0
- initial release


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: Admin,   Client,   Program,   Server