示例#1
0
文件: pdf.py 项目: llcoolj1/w3af-kali
 def _get_pdf_content(self, document_str):
     """
     Iterate through all PDF pages and extract text
     
     :return: A list containing the words in the PDF
     """
     pdf_text = pdf_to_text(document_str)
     return pdf_text.split()
示例#2
0
文件: pdf.py 项目: 0x554simon/w3af
 def _get_pdf_content(self, document_str):
     """
     Iterate through all PDF pages and extract text
     
     :return: A list containing the words in the PDF
     """
     pdf_text = pdf_to_text(document_str)
     return pdf_text.split()
示例#3
0
 def test_pdf_to_text_no_pdf(self):
     text = pdf_to_text('hello world')
     self.assertEqual('', text)
示例#4
0
 def test_pdf_to_text(self):
     text = pdf_to_text(file(self.SIMPLE_SAMPLE).read())
     self.assertIn('Hello', text)
     self.assertIn('World', text)
示例#5
0
 def test_pdf_to_text_no_pdf(self):
     text = pdf_to_text('hello world')
     self.assertEqual('', text)
示例#6
0
 def test_pdf_to_text(self):
     text = pdf_to_text(file(self.SIMPLE_SAMPLE).read())
     self.assertIn('Hello', text)
     self.assertIn('World', text)