-
-
Save highel/76171be0b49f8d5555849be84830e439 to your computer and use it in GitHub Desktop.
Remove all SMS from ZTE MF283V modem. This modem has tendency to overflow after you cant view SMS in UI. Tested on Russian Tele 2 version.
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
import requests | |
import json | |
import base64 | |
url = 'http://192.168.0.1/goform/goform_get_cmd_process?isTest=false&cmd=sms_data_total&page=0&data_per_page=500&mem_store=1&tags=10&order_by=order+by+id+desc' | |
s = requests.Session() | |
s.headers.update({'Host': '192.168.0.1'}) | |
s.headers.update({'Referer': 'http://192.168.0.1/index.html'}) | |
r = s.get(url) | |
t = r.text | |
j = json.loads(t, strict=False) | |
for m in j['messages']: | |
print(m['id'] + " (" + m['number'] + "):") | |
print(m['content']) | |
print("\n") | |
id = m['id'] | |
url = 'http://192.168.0.1/goform/goform_set_cmd_process' | |
payload = {'isTest': 'false', 'goformId': 'DELETE_SMS', 'msg_id': id, 'notCallback': 'true'} | |
s.post(url, data=payload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment