Skip to content

Instantly share code, notes, and snippets.

@highel
Forked from GWuk/zte_sms.py
Last active September 16, 2023 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save highel/76171be0b49f8d5555849be84830e439 to your computer and use it in GitHub Desktop.
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.
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