-
Notifications
You must be signed in to change notification settings - Fork 61
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
Time format broken in SAPRouterInfoClient #12
Comments
Another variant not casting the Long to Int in the dissector could be to apply this transformation at client: sapts_to_epoch=lambda sapts: (sapts & 0xFFFFFFFF) + 1000000000 |
I found the same weirdeness when started playing with those fields. In the end, figured out that the first 4 bytes were used as some way of time zone, and the remaining 4 bytes were the actual timestamp. Date is somewhat used in the server's local time zone, instead of using UTC, which is not the best decision by SAP. Will check your changes to see if that covers the different scenarios, we need to check how that works across time zones. The best way to solve this might be maybe creating a new Scapy field that abstracts the implementation. |
Actually I have several testcases on different timezone (India, Asia, US) where the first Int is always 0x01. |
Hi,
while playing with
router_admin.py -l
I noticed timestamp (connected_on
,started_on
) where broken showing date like June 2121.I don't really know what format SAP use for that, but "reversed" a bit those fields to get something plausible with following modifications:
and in
router_admin.py
code, do some offseting:It's quick and dirty so you got the idea.
Adding the offset should be done at the field level, but my scapy skills are a bit rusty.
Cheers,
NB: btw I changed the '\x00' by '|', more easy to read in my opinion
-- Mathieu
The text was updated successfully, but these errors were encountered: