Commit 3b44d469fbab03f201aa5a2b1235115f0b4faca7

Authored by decalage2
1 parent 2ae0ecd2

rtfobj: fixed the fix for issue #70, now it works with pyxswf

Showing 1 changed file with 4 additions and 4 deletions
oletools/rtfobj.py
... ... @@ -559,7 +559,7 @@ class RtfObjParser(RtfParser):
559 559  
560 560 #=== FUNCTIONS ===============================================================
561 561  
562   -def rtf_iter_objects_old (filename, min_size=32):
  562 +def rtf_iter_objects(filename, min_size=32):
563 563 """
564 564 [DEPRECATED] Backward-compatible API, for applications using the old rtfobj:
565 565 Open a RTF file, extract each embedded object encoded in hexadecimal of
... ... @@ -570,9 +570,9 @@ def rtf_iter_objects_old (filename, min_size=32):
570 570 data = open(filename, 'rb').read()
571 571 rtfp = RtfObjParser(data)
572 572 rtfp.parse()
573   - for rtfobj in rtfp.objects:
574   - orig_len = rtfobj.end - rtfobj.start
575   - yield rtfobj.start, orig_len, rtfobj.rawdata
  573 + for obj in rtfp.objects:
  574 + # orig_len = obj.end - obj.start
  575 + yield obj.start, obj.rawdata
576 576  
577 577  
578 578  
... ...