Permalink
Browse files

updates thanks to David of visiblerisk.com

  • Loading branch information...
urule99
urule99 committed Apr 22, 2013
1 parent 28d709d commit 1f636054a54b9bbd08774385bbf7898bea0fb778
Showing with 682 additions and 150 deletions.
  1. +5 −2 jsunpackn.py
  2. +677 −148 pdf.py
View
@@ -1016,7 +1016,7 @@ def main_decoder(self, data, url, tcpaddr=[], lastModified=''):
mypdf = pdf.pdf(data, 'PDF-' + self.url)
if mypdf.is_valid():
mypdf.parse()
pdfjs, pdfjs_header = mypdf.getJavaScript()
pdfjs, pdfjs_header, sloppy = mypdf.getJavaScript()
else:
isPDF = False
@@ -1056,7 +1056,10 @@ def main_decoder(self, data, url, tcpaddr=[], lastModified=''):
self.rooturl[self.url].dbgobj.record_main('init')
while predecoded and len(predecoded) > 0 and level < 10:
detect_txt += predecoded
try:
detect_txt += predecoded
except:
pass # possibly an encoding problem
if isPDF and level > 1:
#make pdf headers available to all future decodings
Oops, something went wrong.

0 comments on commit 1f63605

Please sign in to comment.