Automatic Router Scripting Engine

A.R.S.E. Logo/Icon in glorious 256 pixel size!

aka. A.R.S.E.

This is A.R.S.E., the 'Automatic Router Scripting Engine'.

A.R.S.E. is a program which automatically sends command scripts (rules) to your router (or NAS, Managed Switch, IP Camera, Access Point, or whatever). Essentially, it does automated, scriptable telnet. You can setup or tweak your device with a click! Although originally designed to configure Voyager and compatible routers, A.R.S.E. now works with ALL devices that support telnet.

I have found the Automatic Router Scripting Engine invaluable when tweaking my broadband router for maximum download speeds. Doubling your DSL Line Rate is possible (my operator expects me to get no more than 4000 kbps, right now we're sitting happily at 9826 kbps!), but not without a lot of trial-and-error!

Wouldn't it be great to be able to quickly try out new configurations, and crucially, switch back to the old setup when our tests fail? Enter A.R.S.E., which makes tinkering simple and quick.

Setup..

When you first launch A.R.S.E. it creates a folder in your user data folder, and creates another folder inside that for a default device (as well as its default ini file with global settings)..

C:\Users\<YOUR-USER-NAME>\AppData\Roaming\corz\ARSE\ARSE.ini
C:\Users\<YOUR-USER-NAME>\AppData\Roaming\corz\ARSE\default\device.ini

Here are the currently available (ARSE.ini) preferences.
Coloured entries cannot be set from the GUI, so if you want to alter those, hack your ini file..

[ARSE]
current_device=DSL-2680
autosave_prefs=true
autoupdate_list=true
update_frequency=5
permanent_delete=false
sleep_time=300		(time to wait between sending commands to device, in milliseconds default = 300)
log_level=2			(if you want to see output (next pref), leave this set to 2 - the default**)
show_output=true
confirm_drop=true	(confirmation of drag-and-drops scripts)
do_debug=false		(set to true to have a debug file left in the working dir)
log_file=			(this is best left blank - logs will be created in <data folder>\<device>\logs)
editor=notepad.exe	(enter the path to your own favourite text editor - for logs and ini files)
associate_files=true

** 0 = no logging, 1 = log authentication/login only, 2 = log all responses (the default).

Inside the default device folder, is a device.ini file, with settings and presets for that specific device. You can rename "default" to whatever you like, and create other folders next to it, for other devices, e.g..

C:\Users\<YOUR-USER-NAME>\AppData\Roaming\corz\ARSE\DD-WRT v24\
C:\Users\<YOUR-USER-NAME>\AppData\Roaming\corz\ARSE\Voyager 205\
C:\Users\<YOUR-USER-NAME>\AppData\Roaming\corz\ARSE\DSL-2680\

These devices are then available from a drop-down menu.

You can switch devices from the drop-down menu, and ARSE will re-launch itself with the new device's scripts. A.R.S.E. Main GUI showing available scripts

ARSE remembers window settings for each individual device (including the progress dialog and log output window). You can run multiple copies, each set just-so, remembering their own window sizes and positions.

Inside device.ini (the device settings) you can have four sections. A main [ARSE] section where you can override certain global prefs (those which make sense to be device-specific - changing these in the GUI will set these for the device), as well as three other sections.

Easier to give you an example - this is for a D-Link DSL-2680:


[ARSE]
log_level=2
show_output=true
sleep_time=400
log_file=
autosave_prefs=true

[device]
ip=modem
user=
password=MyPa55word
reboot_string=""	(optional: enter whatever command reboots the device - for scripts that require reboot)
auth_checkstring="Password:"	(optional - ARSE will look for this before sending the password)
login_chunks=2		(default is 8 - which is the number of 1KiB blocks to retrieve for login responses)
max_response=300 	(maximum amount of data blocks to retrieve in a single response, in KiB. Default is 300 - plenty!)
line_feed=LF		(what type of Line Breaks to use, default is CRLF. You can also use LF or CR)

[view]
width=375
height=247
x=1242
y=197
prog_x=518
prog_y=8
show_log_x=1258
show_log_y=45
show_log_w=664
show_log_h=999

[selected]
DIAGNOSTICS=True

Automatic Tasks..

an image of the ARSE interface with Voyager scripts showing

As well as its simple graphic interface, A.R.S.E. can operate command-line mode, so you can click a script anywhere and have it sent directly to the router. You can also drag-and-drop scripts directly onto A.R.S.E. - or a shortcut to it - and they will be sent immediately to the router via background telnet.

You can open your scripts folder from the A.R.S.E. scripts context menu (right-click any script in the list), though as you can add and delete scripts from right from within A.R.S.E., there shouldn't be much need to interact with the folder manually.

Command-line mode..

A.R.S.E. Document Icon arrow icon, pointing right A.R.S.E. Application Icon arrow icon, pointing right Router Icon

A.R.S.E. accepts script on the command line, which means you can drag-and-drop scripts onto the A.R.S.E. icon and A.R.S.E. will telnet them immediately to your router (and then exit). Or you can simply click a script anywhere in Windows Explorer and it will be sent to your router (so long as you have .arse files associated with A.R.S.E - you can do that from the A.R.S.E. system tray menu).

In a similar way, you can schedule script to be run at any time with, perhaps the Windows® built-in "Scheduled Tasks", or some other scheduling/macro software. There's no need to leave A.R.S.E. running, but if you do, it uses very little resources, and can be toggled by its tray icon (left-click).

The currently available scripts are also available for running from A.R.S.E's system tray menu.

Note: in command-line mode, you will not be asked for any login preferences - unless the device.ini file is missing, i.e.. the first time you run A.R.S.E..

or GUI..

ARSE main window+context menu If A.R.S.E. is launched without any scripts (i.e.. you click the application, or a shortcut on your desktop, Start Menu item, etc.),

it will present you with its simple graphic user interface and your current script collection. I put more controls into this as I go along, so check back often for the latest version.

In GUI mode, you can drag and drop scripts into the list, to add them to your collection (one at a time), and also delete scripts from your collection, as well as do a few more things; right-click the list.

It's okay to run scripts from the command-line or schedule while the A.R.S.E. GUI is running, they won't interfere with each other.

ARSE Preferences Pane - telnet login, etc.. Scripts are available for all sorts of things, mainly port-forwarding rules for p2p applications, ftp servers and the like, though technically, any valid telnet command can be placed in an A.R.S.E. script. Feel free to mail me your own pet scripts, and I'll chuck them here for all to use.

For scripters..

As mentioned, A.R.S.E. scripts are simply lists of valid telnet commands, the exact same commands one would enter in a telnet session with your device. A.R.S.E. scripts can also contain comments. Any line beginning with semicolon ";" or hash "#" is considered a comment.

The line format can be PC (CRLF - "\r\n") or UNIX (LF - "\n") line breaks, but NOT Mac (CR - "\r") sorree! - if your script jumps immediately to 100% progress, check your line-breaks.

Get More Scripts Here!

Image of A.R.S.E system tray menu

Progress..

You can also embed "progress directives" in your scripts, like this..

[I am a progress directive]

which will be used as the text under the progress bar while the script runs. So, if you have a big script, you can keep users informed about what section is currently being processed. Peek inside "Basic-Voyager-205-setup.arse" with any decent text editor for example usage.

Note: If your script requires that the router do a reboot at the end of you script, add reboot at the end of your script (after commit, for Voyager routers). Don't worry about multiple scripts sending multiple reboot (or commit) commands (and the long wait that entails); A.R.S.E. stores these commands and performs them only once, right at the end. If a reboot is required, A.R.S.E. will warn you first, and give you the option to defer that, if needed.

Exit codes..

If you are running scripts via Explorer, the command-line, a scheduled task or similar mechanism, you can grab A.R.S.E's exit code, so you know exactly what happened.

There are only a few of these, for now. As follows..


	 0	=	Normal Exit. OK.

	-2	=	Ini file not found.
	-3	=	Device not defined inside ini (prefs) file.

	-15	=	Login details incorrect.
	-16	=	Login aborted.
	

Download..

Download and use A.R.S.E., for free..

click to see zip archive contents

LIVE MD5+SHA1 Multi-Hashes..
# made with checksum.. point-and-click hashing for windows (64-bit edition). # from corz.org.. http://corz.org/windows/software/checksum/ # #md5#ARSE.zip#2014.10.30@11.57:35 8ee1335b5f537f31867a1f0bf2addb09 *ARSE.zip #sha1#ARSE.zip#2014.10.30@11.57:35 f4e0f5ee66b0b0f081c3875d9bc051b016125a6a *ARSE.zip
download

ARSE x64

click to see zip archive contents

LIVE MD5+SHA1 Multi-Hashes..
# made with checksum.. point-and-click hashing for windows (64-bit edition). # from corz.org.. http://corz.org/windows/software/checksum/ # #md5#ARSE_x64.zip#2014.10.30@11.57:44 f1619b466f5fff43b905422b6160cff5 *ARSE_x64.zip #sha1#ARSE_x64.zip#2014.10.30@11.57:44 840c94be5748f80d4a41656759cd318857a197a9 *ARSE_x64.zip

And finally..

All this work is free as in beer, so help yourself!

And when you save yourself some precious hours, days and weeks, maybe you could buy me a beer!

Changes (aka. "itstory")..
Embedded fresh from..

https://corz.org/engine?section=beta/windows/ARSE&source=version.nfo
    #####    ###     ##  ### ########             ###     ##  ###    ###TM
  #######  #######   ####### ########           #######   #######  #######
 ###      ###   ###  ###         ###           ###   ###  ###     ###   ##
 ###      ###   ###  ##       ###              ###   ###  ##      ###   ##
  #######  #######   ##      ########    ###    #######   ##        ######
    #####    ###     ##      ########    ###      ###     ##           ###
                                                                     ####

  Automatic Router Scripting Engine
  Automated, scriptable telnet for your network devices..

  http://corz.org/windows/software/Automatic-Router-Scripting-Engine/

  (c) corz.org

  itstory.. aka 'version history'.. aka 'changes'..
  [known bugs at the bottom]


  Key..

      *    Fixes
      ~    Changes
      +    New stuff
      ++   Requested New stuff



v2.5.6
        Added ability to alter font and font size for log output. It now
        defaults to a monospaced font, which improves readablility.


v2.5.5

    *   Fixed a couple of prefs which were being read/written in the wrong scope
        and/or section, namely; autosave_prefs and line_feed which will now work
        as expected.

    +   Automatic ini updating. In case I add any new features to the ini
        (prefs), this ensures you have the latest version. As usual (for my
        apps), your current preferences will remain intact.


v2.5.4

    +   New icons all round, namely application icon, document icon and
        alternative document icon (if you like to hack such things, you can get
        a blue document icon by using 5 instead of 4 for the icon index. If you
        don't know what that means, forget about it!)

    +   Added portable operation. As usual with my apps, if there is an ini file
        next to the program, it switches automatically to portable mode. Done.

    +   Improved automation of initial and subsequent device creation. You can
        create new devices by simply creating a folder in the ARSE data
        directory (as ever) or setting current_device=whatever-you-like in your
        ini file OR by simply right-clicking the device's drop-down menu and
        selecting the "Create New Device" option - by far the easiest method.

    +   Added option to delete a device from the devices drop-down context menu.

    ~   The current_router preference and [router] preference section have been
        renamed to current_device and [device], respectively. Your old prefs
        will be updated automatically (at least for the next few versions). This
        is just FYI.

    ~   Lots of GUI/input/text tweaks for clarity and aesthetics.

    ~   The A.R.S.E. web page is now up-to-date with no trace of v1 information!


v2.5.2

    +   Added tray menu options for editing preferences (ini file) and also for
        editing the log file.

    +   A.R.S.E will now automatically check its file associations and repair
        if necessary.

    +   You can now easily associate and disassociate .arse files from A.R.S.E's
        system tray menu. As well as the usual "Run this script" entry (which
        does exactly that), an edit entry is also created, using whatever editor
        you have set for your A.R.S.E ini/log editor (editor=something.exe).

    *   Fixed the sleep_time preference so it now overrides correctly on a per-
        device basis.



v2.5

    ++  A.R.S.E Now works with ALL devices that support telnet, which is most
        routers, IP Cameras, managed switches, etc., etc. Enjoy!

        Too many changes to list.

        See main page for updated documentation.


        NOTE: There is now no installer. A.R.S.E. can setup its own associations
        and such.


  *** End of the line for A.R.S.E v1. v2 will bring ALL device capability! ***



1.8.1
fixed the major bug with new installs. if you were upgrading, everything was
fine. if it was your first install, sorree!

fixed the minor bug where the resolved IP address label slightly overlapped
the Ping indicator, making it tricky to click (you can click the icon to
retry the ping, you know).

added a preference for 'permanent delete'. check this and when you delete
scripts from your collection, they will be permanently deleted from your
scripts folder, as opposed to sent to the recycle bin (the default). If you
had manually set this to true (as per earlier tip), either change it to "1"
(no quotes) in your ini, or check the preference in the prefs tab (a better
idea!)


1.8
ARSE now sports a new tabbed interface. the second tab is for preferences,
I have more tabs in mind, if time permits.

When hidden (left-click on tray icon) ARSE no longer pops up a "Success!!!"
dialog for you to click at the end of a script run, but instead puts
"success!!!" in the progress bar for a moment, and then promptly disappears.
(the dialog times out after a few seconds, but still, a background task should
be that)

This also applies to scripts run from the command-line.

I've begun adding tool tips to the controls, I finally found the function!

    GUICtrlSetTip()    <- whoever named this function needs a kicking!

In the address preference, if you enter a "name", it will be automatically
resolved to its IP address, which will be displayed on the right hand side
of the input (as soon as you leave that input). it is still saved as a name,
this is simply for your information. While ARSE is running, you could use
this facility to get the IP address of any internet name (enter the name,
then click on the octet readout, it will update and ping the host for you -
if you use autosave, remember to put back your router's address afterwards!)

Added a cute "tick" or "cross" icon for the DNS check. This was more trouble
than it was worth! Looks neat, though. (while it's checking a "?" is displayed)
All these icons are stored inside arse.dll, ensure you either run the installer
(do a reinstall with your new download) or else copy over the new arse.dll if
you are doing things manually.

you can click on the centre of the icon to ping the host again

you can right-click on the resolved IP address for an option to copy it to
the clipboard


If your login fails, ARSE will pop up the login details dialog boxes for you
to correct it. If you are running a script from the command-line, ARSE will
also try a second time to send your commands.


[installer]
Fixed the bug where the icon refresher icon in the Start Menu wasn't being
deleted.


1.7.5.1
fixed the bug where the address (stored internally as an octet) would be
displayed as an octet in the login preferences, even when you had previously
saved it as a "name". (mine is "router", which resolves to my router's IP)


1.7.5
Added tray menu items for "Run Selected Scripts" and "Run ALL Scripts"
so you can do these things when the main window is hidden (left-click on tray)

Added a tray menu of ALL the scripts in your collection, you can run
any script while ARSE is hidden by simply selecting it in the tray menu. This
list changes dynamically as you add and delete in the main gui.

Changes to the position of the progress dialog are now remembered
Thereafter, this position will also be used for the brief "login" window.

I removed that rogue "esc" key capture thing.

fixed the bug where as soon as one reboot is required, arse will keep bugging
you to reboot every time you send a script, until you quit. Now arse will only
bug you until you do the reboot, then it will stop, until another is required.


ARSE now looks at the *last* parameter on the command line for the path to the
script. this won't affect anyone becasue we haven't started adding switches yet,
but if you plan to create some custom actions, keep this in mind.


1.7.4
Your *current* selection is now saved and restored when you drag in a new
script, though, as ever, on exit, it's the last *successfully sent*
configuration that is saved (or, if that was unsuccessful, the last one you
*attempted* to send) in other words, just messing around with the selection
won't affect your "last known good" selection, and dragging *new* scripts into
ARSE will affect *neither*!

Added a concept menu to the list. From there you can (so far, and working fine):

    * Resfresh the scripts list.

        If you add a pile of scripts to your script folder manually, you can do
        this to have them show up in your collection.

    * Open the scripts folder.

        In Explorer, for if you ever need to interact manually with your
        scripts. Or else a handy way to get to the ini file (open, then hit
        backspace "<-" which surely is programmed into your middle mouse button!
        ;o)

    * Delete selected scripts (from your scripts folder)

        Note, ARSE needs at least one script to be more than just a pretty GUI,
        so if you delete *all* your scripts, ARSE will re-create the default
        stealth script "for you".

        Note, by default, scripts are deleted to your recycle bin. You can
        change that by hacking the ini file, in the [ARSE] section (if that
        doesn't exist, create it)..

            [ARSE]
            permanent_delete=true

        I might do a prefs page yet, and a switch for this.


1.7.3
You can now drag and drop scripts onto ARSE and they will be added to your
sripts folder (and the list).

Switched mode of operation to "Mode 1", event mode, mainly to get above working.
This is probably a better way of working, regardless.


1.7.2
cleaned up some of the legacy code structures lying around (some!)

added a (right-click) tray menu with an "about" item, I forgot about an about
box! regular left-clicking on the tray icon toggles the main window.



1.7.1

Your last used selection is now remembered in the ini file, for next time.
note: by "used", I mean the last set you actually sent to the router.

Between the saving and the "toggle" function, it's possible to run a nice big
on/off switch, with the regular and "remove" versions of your scripts.

I moved ARSE's application data folder into the "corz" folder, best for
everyone. If possible ARSE will move your old folder to its new location
automatically, though it will err on the side of caution, and you may have to
move your scripts over by hand.

ARSE now only performs only one commit per operation, so if a dozen scripts all
needa "commit" command, ARSE performs it only once, at the end. saves 1.8
seconds per script.


1.7

Incorporated some stuff I learned making the installer.

Added a list menu of available scripts. Now you can select any number of scripts
to run. There's also an "all" button, which unsurprisingly, runs all available
scripts.

Added "clear" and "toggle" controls, for rapid scripts selection.

Changed the ini file name from "router.ini" to "arse.ini", as it now holds
non-router prefs. old ini files will be renamed automatically, at least for the
next few versions, they will.

Window size and position is now saved (in arse.ini) and restored on launch.

ARSE won't ask for login details if an ini file exists, you did that already.

Added an "edit login details" button, should you wish to change the details
later.

When multiple scripts are being processed, a reboot command is stored and sent
only at the end of the sequence, rather than "when it comes", which caused
multiple selections to only get partly sent. This would be a bug-fix if I hadn't
fixed it before I even encountered it.

Fixed a few minor bugs.


1.6.5
minor tweaks and adjustments, compiler directives, etc.

1.6.4
Added a HotKey (Esc) that you can use to exit Arse at any time.

Improved name resolution handling.

1.6.3
ARSE will now resolve host "names", so if you have a local host name for your
router (mine is called "router") you can use that in the address field.

ARSE will now recognize a "reboot" command in a script, and warn the user of the
impending reboot, as well as giving them the chance to cancel it, if they really
must (important transfer in progress, perhaps).

Removed the old one-time reboot warning (no need now).

Some GUI and progress bar improvements.

1.6.2..
You can now enable "progress directives" inside your scripts. These look exactly
like ini section header..

[I am a progress directive]

Simply, when Arse finds one of these, it will use the text within for the
current progress message, so if you have a long script with many sections, you
can keep the user informed about which section of the script is currently being
excecuted.

Here's an example..

    [disable UPnP]
    ; disable nasty UPnP..
    modify upnp cfg  nbstatus disable

Don't overdo these because a) if there are too many, they will flash before the
users' eyes too quickly to read, and b) they are classed as *real* lines when
calculating the progress bar, so it would become (albeit only slightly)
inaccurate.

See inside "Basic-Voyager-205-setup.arse" for more examples.

note:    Arse no longer performs "commit" at the end of the run. If you want your
        rules to be permanent, add "commit" to the end of your script.

1.6..
Arse now accepts scripts on the command line. In other words..

    a)    you can drag-and-drop script files onto rah.exe (or a shortcut
        to it), and they will be sent directly to the router, and..

    b)    you can script your ARSE!

When using the command-line or drag-and-drop, arse doesn't arse about
asking for your router login details (unless its ini is missing), just
sends the commands immediately. You still get a nice progress bar, though.


<=1.5..
private builds.

<=1.0

First there was a shell script for Linux called "RAD". It removed those
nasty rules the Voyager 205 inserts at bootup. (or rather, BT inserted!)
It's still around, works great, if you have a Linux box handy.

Then there was a Windows batch file, because, well, most folk still use
windows. It worked, but it had problems. The main one being that it spawned
a telnet window and "sent" key commands to it. If the user were to shift
focus to a different window, bad things happened, like launching infinite
copies of the same batch file. It came with a big warning..

    STAND BACK FROM THE COMPUTER!!! TOUCH NOTHING!!

But folk still did, and bad things happened.

RichE did a nice GUI version of this, which was cooler than the batch file
but still suffered the same problems, sending keys to windows. But through
this I was introduced to AutoIt proper. Thanks RichE!

First it was a GUI version of RAD, then also a "RAH" "H" for "hacking"
because it could send commands other than the original "Router Automatic
Deletions"
, and could be packaged as a "one-shot" app that could setup
an application for someone. this lasted about two days.

RichE and I grappled with the code and ideas for a few days, until I
wrestled it off him for my first AutoIt project..

ARSE 1.0 combined the functions of both applications and a whole lot more!

Have fun!

;o)

Before you ask a question..

PLEASE remember, this page is about ARSE, which is FREE!
If you want to ask questions about routers, go here.


previous comments (four pages)   show all comments

mido0109850352 - 04.08.08 10:59 am

nice man


muerte - 13.04.09 12:36 pm

yeahhhhhhhh


BHOB - 06.05.09 7:17 pm

Where on earth is the download link???


The link is hidden away at the very top of the page. ;o)



tapenade - 11.06.09 10:41 am

mucho gracias


saayacoolu - 15.08.09 12:17 pm

so nicesmiley for :roll:smiley for :roll:smiley for :roll:


Call of Duty - 24.05.10 2:31 am

i love this program but i can't seem to get a script working for Call of Duty - Modern Warfare 2 has any one made a script they might want to share?


If anyone has scripts, mail them to me! I'll put them up here. ;o)



Peter - 07.04.12 11:53 am

Please let me have a listing of related gear 2 A R S E


lorelle - 07.04.12 12:00 pm

smiley for :idea:smiley for :erm:smiley for :eek:


Peter - 17.05.12 11:10 am

Hello everybody

Is there some way how to detect that script in command-line does its job, or not? Some %ERRORLEVEL% mechanism used for command-line?
Yes, i know, that there is no way how to parse output from telnet. I need only information about succesfully connecting and ending telnet session...

Thanks

Peter


Not currently, which is an omission. It's on my 2do list. ;o)

[edit]Note: v2 now has this, and a lot more[/edit]




Dancingriver - 22.10.14 12:40 pm

Thanks for the great software;

BUT WHERE IS THE DOWNLOAD LINK, I have tried for over two days looking for the link.lol,

No download link at the very top as well.

Thanks in advance.


Heh, yeah, it was temporarily removed while I worked out a few kinks. Sorree!
It's back now!

;o)



Ernie - 27.05.15 6:58 am

Do you plan on making a version that utilizes SSH instead of Telnet?

Thanks,
Ernie


No, not currently. Security isn't usually a major concern on the single hop between folk and their routers. If enough people ask, or better yet, someone donates and asks, I would certainly look into it. ;o)



First, confirm that you are human by entering the code you see..

(if you find the code difficult to decipher, click it for a new one!)


Enter the 5-digit code this text sounds like :

lower-case tee, Upper-Case Queue, ate, lower-case dbl-u, Upper-Case Em


 

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!