Evaluating "asp" tags locally

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

crunchyrouters

New Around Here
I'd like to retrieve information about active clients (both wired and wireless) programmatically for a dashboard I'm working on. The `get_clientlist()` function appears to do what I want and I tried writing up a quick script to log in (via the WebUI) & pull the contents of that page. Unfortunately, it seems that I'm limited to one admin session at a time so this prevents me from performing administrative tasks via the WebUI. I'm not sure how this is enforced in the source code - a quick review implies that multiple sessions should be supported via `add_asus_token`...

I looked into getting httpd to evaluate an asp file pre-auth, which does work with some creative use of bind mounts* but this isn't optimal either.

Is there a built-in way I could invoke a `<% %>` tag locally (via SSH) to gather the information I want? Is my only option compiling some subset of httpd to accomplish this? Are there better ways to accomplish what I want (`get_clientlist()` is nice because it includes DNS names, signal strength, etc)? Any recommendations are welcome!

* I replaced /www/manifest.asp with a custom script
 

RMerlin

Asuswrt-Merlin dev
Is there a built-in way I could invoke a `<% %>` tag locally (via SSH) to gather the information I want?
No. Processing is only done by httpd prior to transmitting the page to a web client, there is no separate interpreter.
 

crunchyrouters

New Around Here
Drat, that's what I suspected. I suppose I'll look into SNMP, as this is a pretty deep yak shave I've gotten into. Thank you for the help.
 

RMerlin

Asuswrt-Merlin dev
If you want to obtain a list of connected STAs, it can be done with the userspace tools. This repo has a very advanced example script that should work on most (if not all) of the newer HND models:

 
Similar threads
Thread starter Title Forum Replies Date
F wrong VLAN tags going out Asuswrt-Merlin 7

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top