Last active
December 27, 2021 15:17
-
-
Save olekstomek/a85152fca24adfde05b44e957a8f5180 to your computer and use it in GitHub Desktop.
skrypt do pokazywania parametrów sygnału w modemie mobilnym 4G
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HOST=192.168.32.1 | |
PASSWORD=admin | |
HEADER="Referer: http://$HOST/index.html" | |
P=$(echo -n "$PASSWORD" | base64 -w0 | sha256sum | awk '{print toupper($1)}') | |
A=$(wget -t 3 -q -O - --save-cookies cookies.txt --keep-session-cookies --header="$HEADER" --post-data "isTest=false&goformId=LOGIN&password=$P" http://$HOST/goform/goform_set_cmd_process) | |
if [ "x$A" = "x{\"result\":\"0\"}" ]; then | |
A=$(wget -t 3 -q -O - --load-cookies cookies.txt --header="$HEADER" "http://$HOST/goform/goform_get_cmd_process?isTest=false&cmd=network_type%2Crssi%2Crscp%2Clte_rsrp%2Cwan_lte_ca%2Clte_ca_pcell_band%2Clte_ca_pcell_bandwidth%2Clte_ca_scell_band%2Clte_ca_scell_bandwidth%2Clte_ca_pcell_arfcn%2Clte_ca_scell_arfcn%2CZ_SINR%2CZ_CELL_ID%2CZ_eNB_id%2CZ_rsrq%2Clte_ca_scell_info%2Cwan_ipaddr%2Cipv6_wan_ipaddr%2Cstatic_wan_ipaddr%2Copms_wan_mode%2Copms_wan_auto_mode%2Cppp_status%2Cloginfo&multi_data=1") | |
fi | |
if command -v jq >/dev/null; then | |
echo $A | jq . | |
else | |
echo $A | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://eko.one.pl/forum/viewtopic.php?pid=261513#p261513