JSON RPC - jamesmacwhite/hh70-ee GitHub Wiki
Similar to the HH40, HH70 and other variants, there is a JSON-RPC web API present, which acts as a layer between the web interface front end and back end hardware to display data.
The API is available at: http://192.168.1.1/jrd/webapi
Some methods don't require authentication and only need a _TclRequestVerificationKey
and Referer
value. Others require authentication and in addition to these headers, will also require passing a valid _TclRequestVerificationToken
as well as a sensible User-Agent
string.
_TclRequestVerificationToken
can be obtained from an authenticated session when logging into the web interface with a web browser. It will be present in the request headers when viewing any settings page when logged in. It will be valid until the session is timed out, when you'll need to log back in to generate another token.
Method name | Requires token? | Purpose |
---|---|---|
GetCurrentLanguage | No | Returns the set language e.g. en
|
GetSimStatus | No | Returns the state of the SIM card |
GetLoginState | No | Return the login state |
GetSystemStatus | No | Returns essential network connectivity information like signal strength, roaming etc |
GetDeviceNewVersion | ||
GetNetworkInfo | ||
GetWanSettings | ||
GetWanIsConnInter | ||
GetSMSStorageState | ||
GetCallLogCountInfo | ||
GetActiveData | ||
GetConnectionSettings | ||
GetUsageSettings | ||
GetUsageRecord | ||
GetNetworkSettings | ||
GetNetworkRegisterState | ||
GetProfileList | ||
GetConnectionState | ||
GetLanSettings | ||
GetALGSettings | ||
getDMZInfo | ||
GetUpnpSettings | ||
getPortFwding | ||
getSmsInitState | ||
GetSMSListByContactNum | ||
GetSingleSMS | ||
GetSendSMSResult | ||
getSMSAutoRedirectSetting | ||
GetSMSSettings | ||
GetDdnsSettings | ||
GetDynamicRouting | ||
getIPFilterList | ||
GetMacFilterSettings | ||
GetParentalSettings | ||
GetConnectedDeviceList | ||
GetAutoValidatePinState | ||
GetStaticRouting | ||
getUrlFilterSettings | ||
GetVPNPassthrough | ||
getFirewallSwitch | ||
GetDLNASettings | ||
GetFtpSettings | ||
GetSambaSettings | ||
GetDeviceDefaultRight | ||
GetBlockDeviceList | ||
GetLanStatistics | ||
GetWlanSettings | ||
GetWlanStatistics | ||
getCurrentProfile | ||
GetLanPortInfo | ||
GetSystemInfo | ||
GetPasswordChangeFlag | ||
GetUSBLocalUpdateList | ||
GetSystemSettings | ||
GetDeviceUpgradeState | ||
GetCurrentTime | ||
GetClientConfiguration | ||
GetUSSDSendResult | ||
GetWanCurrentMacAddr | ||
GetCallLogList | ||
GetQosSettings | ||
GetVoicemail |
TODO: Document all methods.
There are a range of get/set methods which can be sent. Here are a few examples of querying the JSON-RPC API.
curl --location --request POST 'http://192.168.1.1/jrd/webapi' \
--header '_TclRequestVerificationKey: <YOUR_KEY>' \
--header 'Referer: http://192.168.1.1/index.html' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "12",
"jsonrpc": "2.0",
"method": "GetSystemStatus",
"params": {}
}'
curl --location --request POST 'http://192.168.1.1/jrd/webapi' \
--header '_TclRequestVerificationKey: <YOUR_KEY>' \
--header 'Referer: http://192.168.1.1/index.html' \
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36' \
--header '_TclRequestVerificationToken: <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "12",
"jsonrpc": "2.0",
"method": "GetNetworkInfo",
"params": {}
}'
curl --location --request POST 'http://192.168.1.1/jrd/webapi' \
--header '_TclRequestVerificationKey: <YOUR_KEY>' \
--header 'Referer: http://192.168.1.1/index.html' \
--header '_TclRequestVerificationToken: <YOUR_TOKEN' \
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "12",
"jsonrpc": "2.0",
"method": "setFirewallSwitch",
"params": {
"wan_ping_status": 1
}
}'
<?xml version='1.0' encoding='UTF-8'?>
<CONTENT date="2014-09-27" version="5.0">
<Generate_Type>0</Generate_Type>
<Base_Info>
<Project_Code>HH70</Project_Code>
<Project_Name>HH70</Project_Name>
<Customer_Code>E1</Customer_Code>
<Customer_Name>EE</Customer_Name>
<Major_Version>02</Major_Version>
<Minor_Version>00</Minor_Version>
<Release_Index>24</Release_Index>
</Base_Info>
<Variant_Code>VB</Variant_Code>
<CURef>HH70VB-2XE8GBX</CURef>
<Software>
<External_Ver>HH70_E1_02.00_24</External_Ver>
<Inner_Ver>HH70_E1_02.00_24</Inner_Ver>
<Baseline_Dependency>
<FIRMWARE>HH70_E1_02.00_459</FIRMWARE>
</Baseline_Dependency>
</Software>
</CONTENT>
A file called versionInfo.txt
is present within the folder path that serves the Vue.JS web interface. It is also accessible through a web browser http://192.168.1.1/versionInfo.txt.
p,HH70,E1_EE
Last Changed Author: jacky.cheng
Last Changed Rev: 10754
Binary file (standard input) matches
Apologies in advance for potentially doxing any Alcatel employees.