arska / e3372 Goto Github PK
View Code? Open in Web Editor NEWHuawei E3372 Web API
License: BSD 3-Clause "New" or "Revised" License
Huawei E3372 Web API
License: BSD 3-Clause "New" or "Revised" License
I want to be able to connect and disconnect my modem by sending POST requests to the Web API, the corresponding API for that seems to be at http://192.168.8.1/api/dialup/mobile-dataswitch
but when I do
curl -b cookie --data "1" -X POST http://192.168.8.1/api/dialup/mobile-dataswitch
It returns an error:
<error>
<code>125002</code>
<message></message>
</error>
Do you know how to accomplish this ?
I am trying to read the /api/device/signal from my E3372 to pass RSSI RSRQ RSRP SINR over to telegraf / grafana on an RaspberryPi. I tried to insert a POST function to log in with admin admin on the api/user/login, but it's not working. Any ideas?
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)
so i want to read some sms received in my huawei modem. for this i have to take a token value from one page and reuse it in another pages (sms-list) of my modem
but i got this error 125002 which means that my token value is not accurate
<error> <code>125002</code> <message></message> </error>
here is my code
`
import base64
import binascii
import xml.etree.ElementTree as ET
from datetime import datetime
import requests
from bs4 import BeautifulSoup
BASEURL = 'http://192.168.8.1'
session = requests.Session()
reqresponse = session.get(BASEURL + '/api/webserver/SesTokInfo')
if reqresponse.status_code == 200:
root = ET.fromstring(reqresponse.text)
for results in root.iter('SesInfo'):
sessionid = results.text
print("the sessionId is", sessionid)
for results in root.iter('TokInfo'):
token = results.text
print("The token is", token)
sessioncookies = reqresponse.cookies
post_data = '\n'
post_data += '131001\n'
headers = {'Content-Type': 'text/xml; charset=UTF-8',
'__RequestVerificationToken': token,'X-Requested-With: XMLHttpRequest'}
api_url = BASEURL + '/api/sms/sms-list'
logonresponse = session.post( api_url, data=post_data, headers=headers, cookies=sessioncookies)
result = BeautifulSoup(logonresponse.text, 'html.parser')
for r in result:
print(r)
`
from this bash script, i m getting all my message list and it is almost the same principle
RESPONSE=
curl -s -X GET http://192.168.8.1/api/webserver/SesTokInfo`
COOKIE=echo "$RESPONSE"| grep SessionID=| cut -b 10-147
TOKEN=echo "$RESPONSE"| grep TokInfo| cut -b 10-41
DATA="13
100
1"
curl -b $COOKIE -c $COOKIE -H "X-Requested-With: XMLHttpRequest" --data
"$DATA" http://192.168.8.1/api/sms/sms-list --header
"__RequestVerificationToken: $TOKEN" --header "Content-Type:text/xml"
`
what did i missed in python please?
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
requirements.txt
certifi ==2021.10.8
charset-normalizer ==2.1.1
idna ==3.4
requests ==2.28.1
urllib3 ==1.26.12
xmltodict ==0.13.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.