Giter Site home page Giter Site logo

huawei-e5180-api's People

Contributors

hspdev avatar pablo avatar sebastiansommer avatar szepeviktor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

huawei-e5180-api's Issues

Where would one get the full Huawei API documentation

Been looking at gaining access the some more operations, wanted to find out if you could share some of your documentation or point me in the right direction as i've been searching on the net with no luck. so far i only got to this site

Bars

Hey I don't have the same exact router I have a 4g 3 pro. However for me the api seems somewhat similar. The bars for me are as follows:

  -H 'Connection: keep-alive' \
  -H 'Accept: */*' \
  -H 'DNT: 1' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -H 'Update-Cookie: UpdateCookie' \
  -H '_ResponseSource: Broswer' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36' \
  -H 'Referer: http://192.168.8.1/html/content.html' \
  -H 'Accept-Language: en-GB,en;q=0.9' \
  -H 'Cookie: SessionID=blah' \
  --compressed \
  --insecure```

The response is:
```<?xml version="1.0" encoding="UTF-8"?>
<response>
<ConnectionStatus>901</ConnectionStatus>
<WifiConnectionStatus></WifiConnectionStatus>
<SignalStrength></SignalStrength>
<SignalIcon>2</SignalIcon>
<CurrentNetworkType>19</CurrentNetworkType>
<CurrentServiceDomain>3</CurrentServiceDomain>
<RoamingStatus>0</RoamingStatus>
<BatteryStatus></BatteryStatus>
<BatteryLevel></BatteryLevel>
<BatteryPercent></BatteryPercent>
<simlockStatus>0</simlockStatus>
<PrimaryDns>217.171.132.0</PrimaryDns>
<SecondaryDns>217.171.135.0</SecondaryDns>
<PrimaryIPv6Dns></PrimaryIPv6Dns>
<SecondaryIPv6Dns></SecondaryIPv6Dns>
<CurrentWifiUser>1</CurrentWifiUser>
<TotalWifiUser>64</TotalWifiUser>
<currenttotalwifiuser>64</currenttotalwifiuser>
<ServiceStatus>2</ServiceStatus>
<SimStatus>1</SimStatus>
<WifiStatus>1</WifiStatus>
<CurrentNetworkTypeEx>1011</CurrentNetworkTypeEx>
<maxsignal>5</maxsignal>
<wifiindooronly>0</wifiindooronly>
<wififrequence>1</wififrequence>
<classify>cpe</classify>
<flymode>0</flymode>
<cellroam>1</cellroam>
<usbup>0</usbup>
<wifiswitchstatus>1</wifiswitchstatus>
<hvdcp_online>0</hvdcp_online>
</response>

The bars are from 0 to and it's under SignalIcon

Hope this helps!

deleting from outbox

is there a way to grab the outbox message index after an sms is sent?

also, if i want to grab the outbox items, is the boxtype simply 2?

Unused variables

private $sessionInfo = '';
private $tokenInfo = '';

I think this variables is not used, because it only use in "prepare" function in Router.php. There are no assigment value to that variables later.

API SMS Sended

You talk about an API to query for send status. Could you developp plz ?

Composer package not up to date

Hello,
please update docs (add setDataSwitch()) and upload current version to packagist.
In the currenct composer version the setDataSwitch() method is missing.
Thank you very much!

Please help me create a login script with bash

Hi, I'm trying to recreate your script with bash but I got stuck at the login part, I keep getting:

<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>100006</code>
<message></message>
</error>

Based on the error code, it's ERROR_PARAMETER_ERROR = 100006
Here's my script:

#!/bin/bash

username="admin"
password="admin"

E5577_auth() {
	curl -sc '/tmp/E5577' 'http://192.168.8.1/html/home.html' > /dev/null
	cookie=$(curl -sb /tmp/E5577 http://192.168.8.1/api/webserver/SesTokInfo | awk -F "[><]" '/SesInfo/ {print $3}')
	token=$(curl -sb /tmp/E5577 http://192.168.8.1/api/webserver/SesTokInfo | awk -F "[><]" '/TokInfo/ {print $3}')
	echo "Cookie: $cookie"
	echo "Token: $token"
	if [[ -z "$cookie" ]] || [[ -z "$token" ]]; then
		echo "Authentication failed."
	fi
}
login() {
	E5577_auth
	password=$(echo -n "$password" | sha256sum | cut -d ' ' -f 1 | sed ':a;N;$!ba;s/\n//g') # 1. Original password is hashed first
	password=$(echo -n "$password" | base64 | sed ':a;N;$!ba;s/\n//g') # 2. Then the hashed password is encoded with base64
	password=$(echo -n "$username$password$token"  | sed ':a;N;$!ba;s/\n//g') # 3. Append both username & token
	password=$(echo -n "$password" | sha256sum | cut -d ' ' -f 1 | sed ':a;N;$!ba;s/\n//g') # 4. hash again
	password=$(echo -n "$password" | base64 | sed ':a;N;$!ba;s/\n//g') # 5. encode again
	echo "Password: $password"
	data="<?xml version=\"1.0\" encoding=\"UTF-8\"?><request><Username>$username</Username><password_type>4</password_type><Password>$password</Password></request>"
	curl -s 'http://192.168.8.1/api/user/login' -H "Cookie: $cookie" -H "__RequestVerificationToken: $token" --data "$data"
}
login

Can you help me fix it ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.