Python reads the timestamp in the PE file (exe/dll,
Original Code address:
Https://www.snip2code.com/Snippet/144008/Read-the-PE-Timestamp-from-a-Windows-Exe
Https://gist.github.com/03152ba1a148d9475e81
Go directly to the code and reference it to prevent link failure:
1 #! /usr/bin/env python2.7 2 # 3 # Author: Pat Litke (C) 2014 4 # 5 # This code is free software: you can redistribute it and/or modify 6 # it under the terms of the GNU Affero General Public License as 7 # published by the Free Software Foundation, either version 3 of the 8 # License, or (at your option) any later version. 9 #10 # This code is distributed in the hope that it will be useful,11 # but WITHOUT ANY WARRANTY; without even the implied warranty of12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 # GNU General Public License for more details.14 #15 # You should have received a copy of the GNU Affero General Public License16 # along with Baku. If not, see
If you want to modify the timestamp, follow the above rules, pack and write it. In addition, there is some trouble in the sentence 53. In fact, you can write it like this: t = unpack ("<L ", dword) [0], that is, you can directly decode it based on the small end.