Python reads the timestamp in the PE file (exe/dll,

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.