by hackmiester · 3y ago · 0 comments
$ curl https://wifi.delta.com/api/flight-data | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 448 100 448 0 0 5600 0 --:--:-- --:--:-- --:--:-- 5743
{
"timestamp": "2023-07-11T14:54:41Z",
"eta": "17:48",
"flightDuration": 278,
"flightNumber": "DAL786",
"latitude": 39.723472595214844,
"longitude": -97.1514205932617,
"noseId": "3879",
"paState": false,
"vehicleId": "N879DN",
"destination": "KPDX",
"origin": "KATL",
"flightId": "N879DN_SF_20230711121358",
"airspeed": null,
"airTemperature": 24,
"altitude": 33922,
"distanceToGo": 179,
"doorState": "Closed",
"groundspeed": 442,
"heading": -73,
"timeToGo": 174,
"wheelWeightState": "Off"
}
And a fun snippet for you. $ curl -s https://wifi.delta.com/api/flight-data | jq -r '"https://maps.google.com/?q=", .latitude, ",", .longitude' | tr -d '\n'; echo
https://maps.google.com/?q=40.5615234375,-101.2824478149414 $ curl -s https://wifi.delta.com/api/flight-data | jq -r '"https://maps.google.com/?q=\(.latitude),\(.longitude)"' Invoke-WebRequest https://wifi.delta.com/api/flight-data | ConvertFrom-Json | %{ "https://maps.google.com/?q=$($_.latitude),$($_.longitude)"I’m on a flight right now and just went to this URL. Sure enough, it works!
I know this information is available via the wifi portal’s UI, but a JSON blob just hits different.
```
{"timestamp":"2023-09-28T21:57:39Z","eta":"23:45","flightDuration":164,"flightNumber":"DAL992","latitude":47.4557876586914,"longitude":-111.73490905761719,"noseId":"3883","paState":false,"vehicleId":"N883DN","destination":"KMSP","origin":"KSEA","flightId":"N883DN_SF_20230928195737","airspeed":null,"airTemperature":null,"altitude":35273,"distanceToGo":13,"doorState":"Closed","groundspeed":499,"heading":95,"timeToGo":107,"wheelWeightState":"Off"}
```
Apologies for the JSON formatting, I’m on mobile.
apologies for joking. it must suck.
the communication between plane and wifi/entertainment system, if there is any, is almost certainly one-way. likely, the wifi system providing this info is receiving data from the flight systems and repeating it or transforming it a bit and providing that.
it would not surprise me at all if the flight attendants have to program everything about the flight into the system prior to departure each flight, and there is no communication from the aircraft at all.
(I guess there's some kind of firewall, but we know that those are not always perfect)
There could be some fuckery via shared power or other non-data systems but that’s probably beyond someone sitting in a seat with standard laptop hardware.
[nervously looks out window]
Similar to how I can log into my ASUS router from my home wifi by visiting asusrouter.com.