I've got a TPLink TL-SG1024DE switch and want to pull some stats off it for giggles. It doesn't seem to have SNNO, but does have port mirroring.
But it's also got a pretty page with stats on all the ports:
Port Status Link Status TxGoodPkt TxBadPkt RxGoodPkt RxBadPkt
Port 1 Enabled 100Full 498251196 0 131304668 210126
Port 2 Enabled Link Down 366673044 0 89192528 0
Port 3 Enabled 1000Full 311815473 0 866313613 0
I've been trying to play with curl to log in and access this page. It seems to call a login.cgi page, with a form
- Request URL: http://sg1024.lan/logon.cgi
- Request Method: POST
- Status Code: 200 OK
- Remote Address: [::1]:3000
- Response Headersview source
- Cache-Control: no-cache
- Connection: close
- Expires: -1
- Pragma: no-cache
- Request Headersview source
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
- Accept-Encoding: gzip, deflate
- Accept-Language: en-US,en;q=0.8
- Cache-Control: max-age=0
- Connection: keep-alive
- Content-Length: 41
- Content-Type: application/x-www-form-urlencoded
- DNT: 1
- Host: sg1024.lan
- Origin: http://sg1024.lan
- Referer: http://sg1024.lan/
- Upgrade-Insecure-Requests: 1
- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
- Form Dataview sourceview URL encoded
- username: admin
- password: admin
- logon: Login
From there once logged in they have a menu system, but I know the page I want is PortStatisticsRpm.htm
I've looked and tried the command: curl -d "username=admin" -d "password=admin" -d "logon=Login" http://sg1024.lan/login.cgi and I've tried curl -d "username=admin&password=admin&logon=Login" -c cookies http://sg1024.lan/login.cgi
But this gets an empty response. I've tried saving cookies but it doesn't look like it gets those either. Any ideas?
