Skip to content

Commit

Permalink
20201021a
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierStevens committed Oct 21, 2020
1 parent 5d91e86 commit dc31ad2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
__description__ = 'Strings command in Python'
__author__ = 'Didier Stevens'
__version__ = '0.0.5'
__date__ = '2019/12/17'
__date__ = '2020/10/21'

"""
Source code put in the public domain by Didier Stevens, no Copyright
Expand All @@ -29,6 +29,7 @@
2019/04/14: Quote bugfix
2019/08/05: bugfix #e#chr
2019/12/17: 0.0.5 added option -P
2020/10/21: Python 3 fix in cBinaryFile
Todo:
"""
Expand Down Expand Up @@ -99,7 +100,7 @@ def PrintManual():
The selection of strings to output can be inverted with option -v.
Option -P selects pascal strings. A pascal string is a string preceded by an integer with the number of characters in the string (a counter). Option -p takes a value that defines how to decode the counter, using the same syntax as the struct module.
Option -P selects pascal strings. A pascal string is a string preceded by an integer with the number of characters in the string (a counter). Option -P takes a value that defines how to decode the counter, using the same syntax as the struct module.
For example, to define the counter as a little-endian 32-bit unsigned integer, use '-P "<I"'. Use > for big-endian, B for 8-bit (byte) and H for 16-bit.
Use option -f to prefix each string with the name of the file it was found it.
Expand Down Expand Up @@ -706,7 +707,7 @@ def read(self, size=None):
return fRead.read(size)

def Data(self):
data = self.fIn.read()
data = self.read()
self.close()
return data

Expand Down

0 comments on commit dc31ad2

Please sign in to comment.