Skip to content

Commit

Permalink
Simplify main
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Oct 8, 2024
1 parent 4b3b1e2 commit 1ce48d8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6428,7 +6428,7 @@ def get_rva_from_offset(self, offset):
def get_offset_from_rva(self, rva):
"""Get the file offset corresponding to this RVA.
Given a RVA , this method will find the section where the
Given a RVA, this method will find the section where the
data lies and return the offset within the file.
"""

Expand Down Expand Up @@ -8012,12 +8012,8 @@ def adjust_SectionAlignment(self, val, section_alignment, file_alignment):
def main():
import sys

usage = """\
pefile.py <filename>
pefile.py exports <filename>"""

if not sys.argv[1:]:
print(usage)
print('pefile.py <filename>', 'pefile.py exports <filename>', sep='\n')
elif sys.argv[1] == "exports":
if not sys.argv[2:]:
sys.exit("error: <filename> required")
Expand Down

0 comments on commit 1ce48d8

Please sign in to comment.