OWASP / owasp-mastg

The Mobile Application Security Testing Guide (MASTG) is a comprehensive manual for mobile app security testing and reverse engineering. It describes the technical processes for verifying the controls listed in the OWASP Mobile Application Security Verification Standard (MASVS).
https://mas.owasp.org/
Creative Commons Attribution Share Alike 4.0 International
11.8k stars 2.34k forks source link

Release Process Improvements #1933

Open sushi2k opened 3 years ago

sushi2k commented 3 years ago

To-Do pushed to next release:

This is much faster: extract the first page and then convert:

from pdf2image import convert_from_path
from PyPDF2 import PdfFileReader, PdfFileWriter
“”"
pdf2image on macOS needs: brew install poppler
See https://github.com/Belval/pdf2image#how-to-install
“”"
def split(path, name_of_split):
    pdf = PdfFileReader(path)
    pdf_writer = PdfFileWriter()
    pdf_writer.addPage(pdf.getPage(0))
    output = f’{name_of_split}.pdf’
    with open(output, ‘wb’) as output_pdf:
        pdf_writer.write(output_pdf)
if __name__ == ‘__main__‘:
    path = ‘OWASP_MSTG-1.2.pdf’
    split(path, ‘cover_v1.2’)
    convert_from_path(‘cover_v1.2.pdf’)[0].save(‘cover_v1.2.png’, ‘PNG’)
cpholguera commented 2 years ago

see https://github.com/OWASP/owasp-mstg/issues/1772