-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
63 lines (57 loc) · 2.44 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
2014-12-30
- not worked on this for several months, apps have been updated since,
- w/ updated version of os x app since last work on this, "objectsCount" map in
xml is filled in instead of empty
- DataMapper a bit over-ambitious, use raw sql/prepared stmts at first
* can clean up later
- semesters
* create:
INSERT INTO semesters (is_new, is_local, DEL, server_uid, old_server_uid, name, start_date, hidden, duration) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
- start_date = # days since 1/1/1970
* delete:
INSERT INTO semesters (is_local, DEL) VALUES (1, 1)
- after sync, is_local => 0, row of 'deleted' semester still present
- sync
* mitmproxy to capture packets, strip ssl to investigate structure
* POST request to 74.208.109.61/sync.php
- ?cmd=syncData&session=<session_id>&model=2&client_uid=<uid>
- custom header: "zip-original-length: 24"
* content is being padded somehow
* content is zip'd? gzip'd?
- Connection: keep-alive
* mitmproxy may have interfered w/ this, would have issues w/ sync
request getting response to app, response was always closed
* when did get response w/ content, was some json: {"classes": []}
- Accept: */*
- Accept-Encoding: gzip, deflate
- Content-Type: application/x-www-form-urlencoded
- Content-Length: 32
- content: x«V*J-S²2³4ÐQJÎI,.N-V²ª® ]Qó
* wasn't able to ungzip / decompress w/ zlib directly
* based on "zip-original-length" header, seems to be padded by 8 bytes,
unsure how it's padded though
2014-05-14
- updated 'dbRev' under db_params
- inserted new row into `assignments`
* filled in description, added Allison as partner
* used `course_uid` for `test1` course from coursera semester
SUCCESS: was able to add an assignment to a course manually using
above method, though it forces me to sign-in again for cloud sync
TODO
- test/verify generated "backup" from iPhone, iPad.
- get "Assignment" model working
MVP 1.0 - Assignments
- Create/Update/Delete Assignments
- Send email with generated backup
- IMAP IDLE to watch for changes
* will send new backups from app to special email address
* when backup received, extract out new SQLite db
- Prompt user (?) they may lose work when merging dbs
* when syncing
- backup SQLite db
- generate XML metadata
- zip files into .istd
- send email w/ new .istd attached
MVP 1.5 - Exams
- CRUD Exams
MVP 2.0 - Better syncing logic, more models supported