Skip to content

Instantly share code, notes, and snippets.

@weiland
Last active February 10, 2024 07:46
Show Gist options
  • Save weiland/7e77affa25cddffce9963e4dfc967a5d to your computer and use it in GitHub Desktop.
Save weiland/7e77affa25cddffce9963e4dfc967a5d to your computer and use it in GitHub Desktop.
portalefrecce.it (InTrain Wifi ๐Ÿ‡ฎ๐Ÿ‡น)

PortaleFrecce InTrain Wifi

Captive portal:

curl -k https://88.131.62.56/en/index.html -H 'Host: portalefrecce.on.icomera.com'

Requests to https://www.ombord.info/api/jsonp/user/?callback=jQuery331043751383463883264_1648922326710&_=1648922326713 and to https://www.ombord.info/api/jsonp/connectivity/?callback=jsonpCallback always return 403.

Frecce Portal:

Perform login:

(using IP)

curl -ik 'https://192.168.127.254/hotspot/hotspot.cgi' -H 'Host: www.ombord.info' -H 'Referer: http://portalefrecce.on.icomera.com/' --data 'method=login'
curl -i 'https://www.ombord.info/hotspot/hotspot.cgi' -H 'Referer: http://portalefrecce.on.icomera.com/' --data 'method=login

You can also provide your own redirect URL: curl -i 'https://www.ombord.info/hotspot/hotspot.cgi' -H 'Referer: --data 'method=login&url=http%3A%2F%2Fwww.pascalweiland.com%2F&onerror=http%3A%2F%2Fwww.google.de%2F'.

And method=logout performs a logout.

Note: The Referer must be right (e.g. http://db-regio-mnr.on.icomera.com/ does not work)

For testing:

curl -I http://captive.apple.com

might help.

macOS Troubleshooting

If the captive portal pops up, access to Hostnames might not work.

// https://www.portalefrecce.it/BobHttpLogger/status/train
// somtimes comes as XML or JSON
{
"BobStatus": {
"Train": {
"Id": "9653",
"Token": "IhRbCoYDMQDm0OVbZbIqXw==",
"MealStatus": "on"
}
}
}
<!-- https://www.portalefrecce.it/BobHttpLogger/info -->
<?xml version="1.0" encoding="UTF-8"?>
<BobInfo>
<ServerOnde>
<Status>on</Status>
</ServerOnde>
</BobInfo>
// https://d6o.portalefrecce.it/PortaleFrecce/infoViaggioActionJson?ta=1648919992493&lang=EN&_=1648919957031
{
"isGpsValid": true,
"ultimaStazione": "BOLOGNA AV",
"eta": "21.10",
"speed": "200",
"isOdoValid": true,
"tracknum": "9653",
"statoPercorso": [
{
"description": "MILANO CENTRALE",
"id": 0,
"orario": "18:00",
"passed": true,
"percent": 100,
"stationState": 2
},
{
"description": "BOLOGNA AV",
"id": 1,
"orario": "19:04",
"passed": true,
"percent": 9,
"stationState": 2
},
{
"description": "ROMA TERMINI",
"id": 2,
"orario": "21:10",
"passed": false,
"percent": 0,
"stationState": 0
},
{
"description": "NAPOLI CENTRALE",
"id": 3,
"orario": "22:33",
"passed": false,
"percent": 0,
"stationState": 0
},
{
"description": "SALERNO",
"id": 4,
"orario": "23:22",
"passed": false,
"percent": 0,
"stationState": 0
}
],
"m53": {
"m53elements": [
{
"binario": "",
"binarioReale": null,
"categoria": "REGIONALE",
"destinazione": "GROSSETO",
"numTreno": "4506",
"orario": "21:12",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "EUROSTAR",
"destinazione": "MODENA",
"numTreno": "88300",
"orario": "21:15",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIO_FAST",
"destinazione": "FIUMICINO AEROPORTO",
"numTreno": "4684",
"orario": "21:20",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIONALE",
"destinazione": "ALBANO LAZIALE",
"numTreno": "20047",
"orario": "21:21",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIONALE",
"destinazione": "CASSINO",
"numTreno": "12651",
"orario": "21:28",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "ICN",
"destinazione": "SIRACUSA",
"numTreno": "36039",
"orario": "21:31",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIO_FAST",
"destinazione": "FIUMICINO AEROPORTO",
"numTreno": "4686",
"orario": "21:35",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIONALE",
"destinazione": "NETTUNO",
"numTreno": "20281",
"orario": "21:42",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIO_FAST",
"destinazione": "FIUMICINO AEROPORTO",
"numTreno": "4688",
"orario": "21:50",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIONALE",
"destinazione": "VELLETRI",
"numTreno": "20181",
"orario": "22:00",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIO_FAST",
"destinazione": "FIUMICINO AEROPORTO",
"numTreno": "4690",
"orario": "22:05",
"ritardo": null
},
{
"binario": "",
"binarioReale": null,
"categoria": "REGIONALE",
"destinazione": "FORMIA-GAETA",
"numTreno": "12665",
"orario": "22:06",
"ritardo": null
}
],
"m53Station": "ROMA TERMINI",
"dateSnapshot": "2022-04-02T19:16:27"
},
"categoria": "F_ROSSA",
"statename": "IL",
"onTimeInfo": "the train is running <span>ON SCHEDULE<\\/span>",
"prossimaStazione": "ROMA TERMINI",
"tracktitle": "Milano Centrale &rarr; Salerno",
"delay2": "",
"isM53Visible": true,
"trackline": {
"start": {
"staz": "Bologna Av",
"orario": "19:04"
},
"trainprogress": 218,
"postreno": 4.62962962962963,
"mid": {
"staz": "Roma Termini",
"orario": "21:10"
},
"end": {
"staz": "Napoli Centrale",
"orario": "22:33"
}
},
"isTrackOnGPS": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment