Author Topic: TI-Nspire update request method  (Read 4582 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
TI-Nspire update request method
« on: November 10, 2011, 12:15:14 pm »
I've made a little script to requests TI's servers for updates. It uses the method as the students software (I 'reverse engineered' it :p)
Code: [Select]
#!/usr/bin/python
import httplib2
from xml.etree import ElementTree as ET

REQUEST_URL = "http://education.ti.com/ws/webUpdate/queryForUpdate"

root = ET.Element("QueryUpdates")
Request = ET.SubElement(root, "Request")
WebUpdateClientName = ET.SubElement(Request, "WebUpdateClientName")
WebUpdateClientVersion = ET.SubElement(Request, "WebUpdateClientVersion")
WebUpdateClientOS = ET.SubElement(Request, "WebUpdateClientOS")
CurrentVersion = ET.SubElement(Request, "CurrentVersion")
LanguageCode = ET.SubElement(Request, "LanguageCode")
WebUpdateClientEncoding = ET.SubElement(Request, "WebUpdateClientEncoding")
RequestType = ET.SubElement(Request, "RequestType")
CalculatorModel = ET.SubElement(Request, "CalculatorModel")

WebUpdateClientName.text = "TI-Nspire Computer Link Software"
WebUpdateClientVersion.text = "1.4.0.539"
WebUpdateClientOS.text = "Linux"
CurrentVersion.text = "3.1.0.392"
LanguageCode.text = "NL"
WebUpdateClientEncoding.text = "ISO-8859-1"
RequestType.text = "OS"
CalculatorModel.text = "TI-Nspire"

bodyrequest=ET.tostring(root)

h = httplib2.Http(".cache")
resp, content = h.request(REQUEST_URL,"POST", body=bodyrequest)
root = ET.XML(content)


Response = root[1]
ProductInfo = Response[1]

for node in ProductInfo:
name = node.__str__().split("\'")[1]
if node.text:
print(name + ": " + node.text)


Now, here is the response:

ProductID: 7953
ProductName: TI-Nspire Handheld Operating System
ProductFileSize: 10867233
ProductType: OS
ProductRevision: 3.1.0.392
ProductCalculator: TI-Nspire
Name: TI-Nspire
ParentProduct: TI-Nspire™ Handheld Operating System
ForceUpdate: N
UpToDate: Y

I highlighted something creepy, "ForceUpdate". Does this mean that TI can update your calculator without asking you?
Image TI makes a fix for Ndless 3, and they are able to update the calculators of unknowing people just because they connected it with their computer (to send a game for example).

Scary...
« Last Edit: November 10, 2011, 12:15:49 pm by jimbauwens »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: TI-Nspire update request method
« Reply #1 on: November 10, 2011, 02:12:18 pm »
Very nice !

I wanted to do the same kind of thing before, with a network packet sniffer but I .... forgot to do it ?  lol

Still, interesting :)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire update request method
« Reply #2 on: November 11, 2011, 02:14:10 am »
Very interesting, indeed :)
If executed as a cron job, your tool will provide the community an early warning when TI decides to use ForceUpdate: Y.
« Last Edit: November 11, 2011, 02:31:20 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: TI-Nspire update request method
« Reply #3 on: November 11, 2011, 08:15:18 am »
I'll put it like a cron job, and let it mail some guys when it detects a change :)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: TI-Nspire update request method
« Reply #4 on: November 11, 2011, 08:16:27 am »
How often is that "cronjob-like" event firing, jim ?

Watchout, maybe TI blacklists automated requests ?

(I have no idea)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: TI-Nspire update request method
« Reply #5 on: November 11, 2011, 08:17:53 am »
I didn't put it in a cronjob yet, I was just going to ask you guys for your emails ^^
I was thinking of every 1-2 hours, not too bad

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire update request method
« Reply #6 on: November 11, 2011, 09:29:46 am »
6 times a day, every 4 hours ?
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: TI-Nspire update request method
« Reply #7 on: November 11, 2011, 09:31:50 am »
Every mid-days is sufficient I guess
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire update request method
« Reply #8 on: November 11, 2011, 09:52:54 am »
Wouldn't 12h or 24h be somewhat infrequent, for such important news as a new, possibly forced, OS upgrade ?

BTW, I think that the set of persons to whom the e-mail is sent should contain persons living on both sides of the Atlantic Ocean :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: TI-Nspire update request method
« Reply #9 on: November 11, 2011, 10:40:01 am »
Alright, will update the Cron entry :)