Page 4 of 10

Re: Toon app: PostNL

Posted: Fri Nov 08, 2019 2:37 pm
by Toonz
Templar wrote:Okay, I ran update-rooted.sh -f for implementing the memory tuning options as mentioned in this post: domoticaforum.eu/viewtopic.php?f=104&am ... 540#p92392
After that the Postnl info didn't appear anymore, even after reinstalling the tsc certificates.

According to userSettings.json userid & password are stored and postnl_inbox.json has data stored.
What exactly is going on: you don't see the PostNL tile anymore or you do see the tile but no data is retrieved anymore?
if it is the latter I assume it is because of the contents of the json data (missing fields which I thought were always there for instance), can you send me a PM with the contents of the postnl_inbox.json file?

Re: Toon app: PostNL

Posted: Wed Nov 13, 2019 2:01 am
by Micha_123
PostNL dont work anymore by me.

No txt file in tmp

On tile i see only "geen packeten verwacht"

Deleted postnl app, deleted user config file,

Installed app again, set user and passwort (there wil be written in the tsc map) but app dont work.

In the tmp map there are no txt file from postnl app.


Toon1

Tsc Version 2.1.1

Re: Toon app: PostNL

Posted: Wed Nov 13, 2019 8:17 am
by Toonz
currently the app isn't working anymore as the postnl webserver is refusing the request to provide an access token.
I need to further dig into this, either I need to change the request headers or they have tightened their security to block apps like this permanently.
Busy period at work coming up so not sure when I can start looking into this.

Re: Toon app: PostNL

Posted: Wed Nov 13, 2019 9:13 am
by Micha_123
Thank you for the answere now i know it is not a problem by me.

Re: Toon app: PostNL

Posted: Wed Dec 18, 2019 12:01 am
by Xavier
Any update about this app?

Re: Toon app: PostNL

Posted: Wed Dec 18, 2019 12:58 am
by Toonz
Xavier wrote:Any update about this app?
not yet, still on my todo list (coming holiday probably)

Re: Toon app: PostNL

Posted: Sun Dec 22, 2019 1:20 pm
by Toonz
Xavier wrote:Any update about this app?
Hi, I did look into this today to see if I can get around their new security checks.
I have to say they did a proper job here.
I can't get it to work again.
The problem is that the server is not giving you an access token, the request for the token is refused whatever I do (even when copy/paste a similar request from the iOS app).
Happy for others to give it a try though.

For now I will remove the app from the ToonStore(s) completely. The source is still available at GitHub.

If you still have the app installed via ToonStore 4 you can remove it via ssh:

Code: Select all

opkg remove postnl
If you still have the app installed via ToonStore 5 you can remove it by deleting the folders postnl and postnl-1.0.5 from the folder /qmf/qml/apps

Kind regardz,

Toonz

Re: Toon app: PostNL

Posted: Tue Dec 24, 2019 10:14 am
by glsf91
Toonz wrote: Hi, I did look into this today to see if I can get around their new security checks.
I have to say they did a proper job here.
I can't get it to work again.
The problem is that the server is not giving you an access token, the request for the token is refused whatever I do (even when copy/paste a similar request from the iOS app).
I think I have a way to get this working again. I just tried in Postman with success on the desktop.
You have to do the following:

- go to (method = GET) https://jouw.postnl.nl/?pst=k-pnl_f-f_p ... v-jouwpost
This url is coming from jouw.post.nl from Inloggen/Consument. I don't know of this url in de app will be different.
In the response there is a line at the end like: <script type="text/javascript" src="/static/<long number>"></script>

- Do a POST with content-type text/plain;charset=UTF-8 to https://jouw.postnl.nl/static/<long number> with body: {"sensor_data":"111111111111" }

- go like before to: https://jouw.postnl.nl/web/token and you get the access token again.
(I used pwWebApp as client_id)

Re: Toon app: PostNL (Retired)

Posted: Tue Dec 24, 2019 10:27 am
by TheHogNL
Amazing job glsf91! Also, if that is working as you say, then the 'security' they have implemented is securtiy-by-obscurity :-)
I just did the first part in postman:

Code: Select all

<script>
		bazadebezolkohpepadr="1090884440"
</script>
Just naming the variable like that is just because they don't want you to know where it is for :)

Re: Toon app: PostNL (Retired)

Posted: Tue Dec 24, 2019 10:50 am
by glsf91
TheHogNL wrote:Amazing job glsf91! Also, if that is working as you say, then the 'security' they have implemented is securtiy-by-obscurity :-)
I just did the first part in postman:

Code: Select all

<script>
		bazadebezolkohpepadr="1090884440"
</script>
Just naming the variable like that is just because they don't want you to know where it is for :)
Normally the body with sensor_data is much bigger, but this was enough.

Re: Toon app: PostNL (Retired)

Posted: Tue Dec 24, 2019 11:13 am
by Toonz
Great find guys, much appreciated. Will have something to do this holiday period :-)
Expect a reborn postnl app soonish….

Re: Toon app: PostNL

Posted: Tue Dec 24, 2019 2:01 pm
by Toonz
glsf91 wrote: I think I have a way to get this working again. I just tried in Postman with success on the desktop.
You have to do the following:

- go to https://jouw.postnl.nl/?pst=k-pnl_f-f_p ... v-jouwpost
This url is coming from jouw.post.nl from Inloggen/Consument. I don't know of this url in de app will be different.
In the response there is a line at the end like: <script type="text/javascript" src="/static/<long number>"></script>

- Do a POST with content-type text/plain;charset=UTF-8 to https://jouw.postnl.nl/static/<long number> with body: {"sensor_data":"111111111111" }

- go like before to: https://jouw.postnl.nl/web/token and you get the access token again.
(I used pwWebApp as client_id)
Have sent you an email.....

Re: Toon app: PostNL

Posted: Tue Dec 24, 2019 2:18 pm
by glsf91
Toonz wrote: Have sent you an email.....
Replied and edited my initial post (added GET).

Re: Toon app: PostNL

Posted: Tue Dec 24, 2019 3:16 pm
by Toonz
glsf91 wrote:Replied and edited my initial post (added GET).
Thanks, all working fine now.... ( I forgot the closing '/' in the url after the static key).
The ball is back in the postnl developer court ;-)

I just noticed I get a package delivered this evening, must be Santa … ;-)

Thanks glsf91, much appreciated.

Kind regards,

Toonz

Re: Toon app: PostNL

Posted: Tue Dec 24, 2019 3:39 pm
by Toonz
Hi all,

The PostNL app is back, version 1.0.6 is available in ToonStore 5.

Changelog:
- implemented workaround for the new PostNL security setup (thanks to glsf91).

Kind regardz,

Toonz