Automatic Router Scripting Engine
aka. ARSE
This is ARSE, the 'Automatic Router Scripting Engine'. ARSE is an application which automatically sends command scripts (rules) to your router. Essentially, it does background, scriptable, automatic telnet. You can setup your router with just a couple of clicks.As well as its simple graphic interface, ARSE 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 ARSE - or a shortcut to it - and they will be sent immediately to the router via background telnet.
The scripts themselves (along with your login data, etc) live in the "Viking Router" folder..
C:\Documents and Settings\**YOU**\Application Data\corz\Viking RouterIf you opt to have Start Menu shortcuts installed, there will be a shortcut to your scripts folder in your Start Menu, along with the usual application shortcut, uninstall, etc. You can also open your scripts folder from the ARSE scripts concept menu (context, right-click, whatever you call it), though as you can add and delete scripts from right from within ARSE, there shouldn't be much need to interact with the folder manually.
Note: Although designed for the BT Voyager 205 (and myriad clones; CastleNet AR502, Dynalink RTA100, RTA500-D51, GlobespanVirata, Netgear DM602, Solwise SAR100 and SAR130, etc) this will likely work with many other routers with simple telnet protocols, only the scripts will be different.
command-line mode..
Note: in command-line mode, you will not be asked for any login preferences - unless the router.ini file is missing, i.e.. the first time you run ARSE.
or GUI..
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.
If no scripts are available, ARSE creates one called basic_stealth.arse which contains only the two basic Viking Router stealth rules, as found on the main Voyager 205 page. ARSE needs at least one script to function.
It's okay to run scripts from the command-line or schedule while the ARSE GUI is running, they won't interfere with each other.
simply click, and go..
Run the installer and everything will be setup for you, with optional Start Menu items, file associations, cute icons, add/remove entry, etc., etc., just click-and-go. Once installed, the installer will also act as an uninstaller/reinstaller should you ever need that facility.Note: You can also use the installer for your own installations, if you do that sort of thing, check the "setup.ini" file for more details (you can also alter most of the parameters of your ARSE install by hacking this file, too, if that's your bag)
Scripts are available for all sorts of things, mainly port-forwarding rules for p2p applications, ftp servers and the like, though technically, any valid command can be placed in an ARSE script. Feel free to mail me your own pet scripts, and I'll chuck them here for all to use.
for scripters..
As mentioned, ARSE scripts are simply lists of valid router commands, the exact same commands one would enter in a telnet session. ARSE scripts can also contain comments. Any line beginning with semicolon ";" or hash "#" (for compatibility with "commitedcfg.cfg" and similar files) is considered a comment.The line format can be peecee (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. The commands can have spaces after them, or not, contrary to popular voodoo myth.
You can also embed "progress directives", 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, ARSE will not commit at the end of a script. If you want your rules to "stick", add the commit command to the end of your script. 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). Don't worry about multiple scripts sending multiple commit or reboot commands (and the long wait that entails), if there are multiple scripts to send, ARSE stores these commands and performs them only once, right at the end. If a reboot is required, ARSE will warn you first, and give you the option to defer that, if needed.
installer notes..
I've done a fair amount of work on the installer (because I intend to re-use it), improving its intelligence, error-checking, and expanded the setup.ini to include some handy new options, mostly for those wishing to use the installer to install their own applications, but also for folk requiring unusual setups or custom options.
I quite like that it needs an admin to intall it, prevents casual users taking control of your router with a couple of clicks.
development notes..
Source code is available. You will need the latest ßeta of AutoIt to compile this. Feel free to test, compile, play around and report feedback to the usual place, or else leave feedback belowFor itstory, changes, features, etc, scroll down.
ARSE Changes..
Automatic Router Scripting Engine I thought I'd better start keeping notes. Take shape, it's starting to. Yes. itstory.. 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!
and finally..
All this work is free as in beer, so help yourself, and save some precious hours, days and weeks. And if you bump into me some time, maybe you could buy me a beer!Have fun!
;o)
(or














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.
Hey Cheers!
If you dig my software, you might just love my new clock <- blatant plug
;o)
(or
Great, thanks
thanks
Hey just downloaded arse
<3
thanks
Thanx man
It's all good!
;o)
the admin of the network closed my ports so now i cannot download with a torrent client
Well, erm, thanks for keeping us up-to-date!
;o)
(or
Hi Cor,
I've had a look through the arse source code and have a few ideas, to possibley make it abit more stream lined.
1. you store the variable in an .ini file, to stop people screwing the .ini file entries up, or editing it directly without using arse you could encyrpt the string and write it, arse could decrypt the string when needed
2. have you thought about using select...case for some of the button functions, then arse would ignore them when looking through the func list, thus speeding it up a little.
3. as you know me from the past RAD coding, you'll know that i'm a big fan of registry values for storage instead of .ini files, this would do away with the .ini file alltogether.
like i say just ideas, but would be nice to see what you think.
Regards
RichE
Hi again!
I haven't worked on ARSE since I first made it, and probably never will again, not using a voyager router myself any more, you see. Some of the code if probably fairly inept - I think it was my first AutoIt app - but it works great, so I don't feel the need to replace any of it with better techniques I've learned since, I'm happy to leave my "AutoIt progression" out there!
Arse stores the ini in the user's folder, doesn't it? So encryption isn't really necessary. (there's an excellent debate or two about this logic on the FileZilla forum)
As for the registry, I am NOT a fan of storing anything there unless I really have to. I get religious about this elsewhere on-site, I'm sure. ini files are real and tangible. A user can open them, edit them, move them, and importantly, back them up. Even with sophisticated backup and recovery scripts (which I have), the registry is a pain in the arse (the other arse!).
Every application I now make uses plain text ini files. In fact, I've done quite a bit of AutoIt coding since last we spoke (I today noticed that ffe has been listed on the ffmpeg project page, w00t!), including a cool desktop clock, color picker, and more. Hit the newish Windows button in the top toolbar for more details. Most things are still getting updated when I come up with new features and such. Not ARSE, though.
But Hey! The source is freely available, so feel free to do whatever you like with it. If you fully document all your changes, thoroughly test it, and provide the source, I'll even put up a download here, with credits and all that.
One thing I would like to add to ARSE, is the ability to set the login search strings. Currently it looks for something that the Viking router says during the conversation (particular Viking responses), but it would be nice to be able to set that, so that ARSE would work with any router. I wasn't thinking big enough when I built it.
I've had reports of ARSE working well on pretty much all the Viking I based routers, which is good, but working on all routers, period, would be better.
Anyways, back to my prose..
;o)
(or
Thank you very much!
Your work and your application is great!
Greatings from Argentina!!!
thank you
Indispensible info!
Hi ..
The router-reboot script works with my UTStarcom WA3002G4 adsl router as well! This is awesome!
But only in the GUI mode !
I try and run it from the command prompt .. it does not work.
Even when I try and run if from the system tray .. run script .. it does not work.
Only when the GUI is running and I select from scripts.. and click run selected it works.
Hence I am unable to schedule it to run at odd times :o(
Any idea on how to make it work ?
Thanks !
Another one for the list! I must get that list up here sometime.
Only in GUI mode? How strange! I can't remember there being any difference between running scripts from the different controls; they all go through the TelnetRouter() function (or whatever it's called).
Feel free to poke around in the source code and solve this mystery!
;o)
(or
Hi, COR. Great job!!
Do you know a command for drop the PPPoE session and then restart another one without reboot? I'd like to renew the Public IP address given at starting PPPoE session.
Thank you very much.
OG
Not off-hand, but I'm fairly certain there's one in the Viking manual (pppup/pppdown, or somesuch). If you don't have the CLI Manual, you can download that from the main Voyager 205 page.
;o)
(or
I was looking at the CLI Manual before posting but the "modify" word confused me.
Rechecked it, I found the command I was searching for is
Thanks COR.
Nice site useful
nice man