Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login and Update NFZ issue on Assistant 1.0.9 and 1.1.2 OSX #1

Open
Opcodeffm opened this issue Jul 3, 2017 · 4 comments
Open

Login and Update NFZ issue on Assistant 1.0.9 and 1.1.2 OSX #1

Opcodeffm opened this issue Jul 3, 2017 · 4 comments

Comments

@Opcodeffm
Copy link

Assistant 1.0.9 and 1.1.2 both prompt you with a login screen and needed verification code.
Also, you dont get the prompt "Update No-fly Zone Database is required. Update now?".

Assistant 1.1.0 from repo is working fine.

@MAVProxyUser
Copy link
Owner

On 1.1.2 without --test-server, it looks like the server is a direct IP hit making it non useful.
66.102.255.36
This will allow you to login and see the Captcha they added, but that doesn't help in this case.

If you call it with --test-server it looks like a DNS lookup is used BUT it uses https AND the captcha doesn't work.
ec2-54-175-56-145.compute-1.amazonaws.com.https
there is however an http call that we may be able to snag:
ec2-52-2-37-224.compute-1.amazonaws.com.http
HTTP: GET /getfile/getallfile?product_id=wm220&token=&signature=88e82b781b648307755180a94f62bfae&account= HTTP/1.1
and
GET /getfile/download?product_version=00.09.0700&product_id=wm220&token=&signature=6ecb12db5657ecb7c122874e67cb27a0&device=pc&account= HTTP/1.1

It appears as if you can login first via:
sudo /Applications/Assistant.app/Contents/MacOS/Assistant
then when you go back to:
sudo /Applications/Assistant.app/Contents/MacOS/Assistant --test_server you will no longer be asked to login.

(this is due to cookies!)

@MAVProxyUser
Copy link
Owner

MAVProxyUser commented Jul 4, 2017

Using a dtrace one liner we can see that the .org.chromium.Chromium cookies are what causes the app to either prompt for login or not.

dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'
...
2 157 open:entry DJIBrowser /private/var/root/Library/Application Support/DJIAssistant2/Cookies

sh-3.2# file "/private/var/root/Library/Application Support/DJIAssistant2/Cookies"
/private/var/root/Library/Application Support/DJIAssistant2/Cookies: SQLite 3.x database
sh-3.2# sqlite3 "/private/var/root/Library/Application Support/DJIAssistant2/Cookies"
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
sqlite> .tables
cookies meta
sqlite> .schema
CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR);
CREATE TABLE cookies (creation_utc INTEGER NOT NULL UNIQUE PRIMARY KEY,host_key TEXT NOT NULL,name TEXT NOT NULL,value TEXT NOT NULL,path TEXT NOT NULL,expires_utc INTEGER NOT NULL,secure INTEGER NOT NULL,httponly INTEGER NOT NULL,last_access_utc INTEGER NOT NULL, has_expires INTEGER NOT NULL DEFAULT 1, persistent INTEGER NOT NULL DEFAULT 1,priority INTEGER NOT NULL DEFAULT 1,encrypted_value BLOB DEFAULT '',firstpartyonly INTEGER NOT NULL DEFAULT 0);
CREATE INDEX domain ON cookies(host_key);
CREATE INDEX is_transient ON cookies(persistent) where persistent != 1;

sqlite> select * from cookies;
13143606306683470|.dji.com|user_data_reload|true|/|1xxx|1|1|1||0
13143606306683516|.dji.com|country|US|/|xxx|1|1|1||0
13143606306683543|.dji.com|lang|en|/|xxx|0|0|xxx|1|1|1||0
13143606307564375|account.dji.com|AWSELB|xxx|/|13143606367564375|0|0|13143606307564375|1|1|1||0
13143606307945913|.dji.com|_ga|xxx|/|13206678307000000|0|0|13143606307945913|1|1|1||0
13143606307946543|.dji.com|_gid|xxx|/|13143692707000000|0|0|13143606307946543|1|1|1||0
13143606307953607|.dji.com|_gat|1|/|13143606367000000|0|0|13143606307953607|1|1|1||0

@droner69
Copy link

droner69 commented Jul 4, 2017

At first I could not get the NFZ update notification to spawn on the Mavic Pro with firmware 0.400. I reset defaults and refreshed the 0.400 firmware, and used MacOS Sierra and El Capitan to run the script, but the update notification still wouldn't spawn.

I updated to firmware 0.700 and the script (beta and current version) worked perfectly the first time using MacOS Sierra VM.

Below are the logs from the same MacOS Sierra setup using "sudo /Applications/Assistant.app/Contents/MacOS/Assistant --test_server" on firmware 0.400 and then on 0.700, while the RedHerring.rb script is running in another terminal.

#On Firmware 0.400

Admins-Mac:~ admin$ sudo /Applications/Assistant.app/Contents/MacOS/Assistant --test_server
time on open: RNDIS_Phantom4&/dev/cu.usbmodem1815 0ms!
ws url:ws://localhost:19871/controller/vision_calibration/0de5e4c69f0a143b313c6, exe:/Applications/Assistant.app/Contents/MacOS/VisionStarter
push RNDIS_Phantom4&/dev/cu.usbmodem1815 0de5e4c69f0a143b313c6
timeout dev: Lb_mcu_sky(5)
timeout dev: Lb_mcu_sky(5)
timeout dev: Lb_mcu_sky(5)
timeout dev: Lb_mcu_sky(5)
Browser finished : 0x00000000, 0
Application exit!

#After Upgrading to 0.700

Admins-Mac:~ admin$ sudo /Applications/Assistant.app/Contents/MacOS/Assistant --test_server
time on open: RNDIS_Phantom4&/dev/cu.usbmodem165 0ms!
ws url:ws://localhost:19871/controller/vision_calibration/85166f139636690fdb046, exe:/Applications/Assistant.app/Contents/MacOS/VisionStarter
push RNDIS_Phantom4&/dev/cu.usbmodem165 85166f139636690efdb046
timeout dev: Lb_mcu_sky(5)
PING 192.168.42.2 (192.168.42.2): 56 data bytes

--- 192.168.42.2 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
Floating point exception: 8

@hdnes
Copy link

hdnes commented Jul 10, 2017

So the answer is to upgrade to .700? I'm having similar problems as @droner69 on 0.400. Failing to spawn NFZ notification. I removed VPN completely from my machine and am still having same issue.

That being said. Not sure I can upgrade to .700 considering I don't have a VM of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants