Skip to content

Commit

Permalink
Merge pull request #410 from j-t-1/documentation
Browse files Browse the repository at this point in the history
Tiny comment improvements
  • Loading branch information
erocarrera authored Aug 26, 2024
2 parents d00c867 + 3d3ea93 commit 737fb4e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ def get_data(self, start=None, length=None, ignore_padding=False):
`ignore_padding=True` will truncate the result in order
not to return the padding (if any).
Returns bytes() under Python 3.x and set() under Python 2.7
Returns bytes().
"""

if start is None:
Expand Down Expand Up @@ -2267,7 +2267,7 @@ def create(unwcode):


# Valid FAT32 8.3 short filename characters according to:
# http://en.wikipedia.org/wiki/8.3_filename
# https://en.wikipedia.org/wiki/8.3_filename
# This will help decide whether DLL ASCII names are likely
# to be valid or otherwise corrupt data
#
Expand Down Expand Up @@ -3352,7 +3352,7 @@ def __parse__(self, fname, data, fast_load):

def parse_rich_header(self):
"""Parses the rich header
see http://www.ntcore.com/files/richsign.htm for more information
see https://www.ntcore.com/files/richsign.htm for more information
Structure:
00 DanS ^ checksum, checksum, checksum, checksum
Expand Down Expand Up @@ -3453,6 +3453,8 @@ def full_load(self):
This method will load the data directories which might not have
been loaded if the "fast_load" option was used.
It also parses the rich header, which may or may not present.
"""

self.parse_data_directories()
Expand Down Expand Up @@ -4409,7 +4411,7 @@ def parse_debug_directory(self, rva, size):
return None

# apply structure according to DEBUG_TYPE
# http://www.debuginfo.com/articles/debuginfomatch.html
# https://www.debuginfo.com/articles/debuginfomatch.html
#
dbg_type = None

Expand Down Expand Up @@ -6365,7 +6367,7 @@ def get_rva_from_offset(self, offset):
# and we will simply return the offset as the RVA
#
# The case illustrating this behavior can be found at:
# http://corkami.blogspot.com/2010/01/hey-hey-hey-whats-in-your-head.html
# https://corkami.blogspot.com/2010/01/hey-hey-hey-whats-in-your-head.html
# where the import table is not contained by any section
# hence the RVA needs to be resolved to a raw offset
return offset
Expand Down

0 comments on commit 737fb4e

Please sign in to comment.