From 1786b46d3363e5ea786fee842e96adc4fbc3f421 Mon Sep 17 00:00:00 2001 From: Jürgen Löhel Date: Aug 21 2019 16:24:01 +0000 Subject: initial commit Signed-off-by: Jürgen Löhel --- diff --git a/peepdf-0.4.2.tar.gz b/peepdf-0.4.2.tar.gz new file mode 100644 index 0000000..174194c Binary files /dev/null and b/peepdf-0.4.2.tar.gz differ diff --git a/python-peepdf.spec b/python-peepdf.spec new file mode 100644 index 0000000..ce86d18 --- /dev/null +++ b/python-peepdf.spec @@ -0,0 +1,88 @@ +# +# spec file for package python-peepdf +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +%if 0%{?el7} +%{?!python_module:%define python_module() python-%{**} python36-%{**}} +%else +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%endif +Name: python-peepdf +Version: 0.4.2 +Release: 0 +License: GPL-3.0-only +Summary: Powerful Python tool to analyze PDF documents http://peepdf.eternal-todo.com +Url: http://eternal-todo.com +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/p/peepdf/peepdf-%{version}.tar.gz +Patch0: remove-fixed-old-versions.patch +BuildRequires: python-rpm-macros +%if 0%{?el7} +BuildRequires: epel-release +%endif +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module colorama} +BuildRequires: %{python_module future} +BuildRequires: %{python_module jsbeautifier} +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module pythonaes} +# /SECTION +BuildRequires: fdupes +%if 0%{?el7} +BuildRequires: epel-release +%endif +Requires: %{python_module colorama} +Requires: %{python_module future} +Requires: %{python_module jsbeautifier} +Requires: %{python_module Pillow} +Requires: %{python_module pythonaes} +Recommends: %{python_module PyV8} +Recommends: %{python_module pylibemu} +BuildArch: noarch + +%python_subpackages + +%description +peepdf is a Python tool to explore PDF files in order to find out if the file +can be harmful or not. The aim of this tool is to provide all the necessary +components that a security researcher could need in a PDF analysis without +using 3 or 4 tools to make all the tasks. With peepdf it's possible to see all +the objects in the document showing the suspicious elements, supports all the +most used filters and encodings, it can parse different versions of a file, +object streams and encrypted files. With the installation of PyV8 and +Pylibemu it provides Javascript and shellcode analysis wrappers too. Apart +of this it's able to create new PDF files and to modify/obfuscate existent +ones. + +%prep +%setup -q -n peepdf-%{version} +%patch0 -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%files %{python_files} +%doc README +%python3_only %{_bindir}/peepdf +%{python_sitelib}/* + +%changelog diff --git a/remove-fixed-old-versions.patch b/remove-fixed-old-versions.patch new file mode 100644 index 0000000..6bc7549 --- /dev/null +++ b/remove-fixed-old-versions.patch @@ -0,0 +1,20 @@ +Index: peepdf-0.4.2/setup.py +=================================================================== +--- peepdf-0.4.2.orig/setup.py ++++ peepdf-0.4.2/setup.py +@@ -7,11 +7,11 @@ setup( + license="GNU GPLv3", + url="http://eternal-todo.com", + install_requires=[ +- "jsbeautifier==1.6.2", +- "colorama==0.3.7", ++ "jsbeautifier>=1.6.2", ++ "colorama>=0.3.7", + "future>=0.16.0", +- "Pillow==3.2.0", +- "pythonaes==1.0", ++ "Pillow>=3.2.0", ++ "pythonaes>=1.0", + ], + entry_points={ + "console_scripts": [