[python-impacket] initial import

Fabian Affolter fab at fedoraproject.org
Sun Sep 21 12:47:43 UTC 2014


commit 8f2d8fe4766f8a01aaa5997505f92f8e4460d1ba
Author: Fabian Affolter <fabian at affolter-engineering.ch>
Date:   Sun Sep 21 14:47:35 2014 +0200

    initial import

 .gitignore                  |    1 +
 impacket-0.9.11-setup.patch |   31 ++++++++++++++++++++++
 python-impacket.spec        |   59 +++++++++++++++++++++++++++++++++++++++++++
 sources                     |    1 +
 4 files changed, 92 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e855b9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/impacket-0.9.11.tar.gz
diff --git a/impacket-0.9.11-setup.patch b/impacket-0.9.11-setup.patch
new file mode 100644
index 0000000..41f06e4
--- /dev/null
+++ b/impacket-0.9.11-setup.patch
@@ -0,0 +1,31 @@
+--- impacket-0.9.11/setup.py	2014-01-30 17:07:52.000000000 +0100
++++ impacket-0.9.11/setup.py.new	2014-08-14 00:00:24.514459291 +0200
+@@ -6,9 +6,9 @@
+ 
+ from distutils.core import setup
+ 
+-PACKAGE_NAME = "impacket"
++PACKAGE_NAME = "python-impacket"
+ 
+-setup(name = PACKAGE_NAME,
++setup(name = "impacket",
+       version = "0.9.11",
+       description = "Network protocols Constructors and Dissectors",
+       url = "http://oss.coresecurity.com/projects/impacket.html",
+@@ -18,11 +18,10 @@
+       maintainer_email = "bethus at gmail.com",
+       license = "Apache modified",
+       long_description = 'Impacket is a collection of Python classes focused on providing access to network packets. Impacket allows Python developers to craft and decode network packets in simple and consistent manner.',
+-      platforms = ["Unix","Windows"],
++      platforms = ["Unix", "Windows"],
+       packages = ['impacket', 'impacket.dcerpc', 'impacket.examples', 'impacket.dcerpc.v5'],
+-      scripts = glob.glob(os.path.join('examples', '*.py')),
+-      data_files = [(os.path.join('share', 'doc', PACKAGE_NAME), ['README', 'LICENSE']+glob.glob('doc/*')),
+-                    (os.path.join('share', 'doc', PACKAGE_NAME, 'testcases', 'dot11'),glob.glob('impacket/testcases/dot11/*')),
+-                    (os.path.join('share', 'doc', PACKAGE_NAME, 'testcases', 'ImpactPacket'),glob.glob('impacket/testcases/ImpactPacket/*')),
+-                    (os.path.join('share', 'doc', PACKAGE_NAME, 'testcases', 'SMB-RPC'),glob.glob('impacket/testcases/SMB-RPC/*'))],
++      data_files = [(os.path.join('share', 'doc', PACKAGE_NAME, 'examples'), glob.glob('examples/*.py')),
++                    (os.path.join('share', 'doc', PACKAGE_NAME, 'testcases', 'dot11'), glob.glob('impacket/testcases/dot11/*')),
++                    (os.path.join('share', 'doc', PACKAGE_NAME, 'testcases', 'ImpactPacket'), glob.glob('impacket/testcases/ImpactPacket/*')),
++                    (os.path.join('share', 'doc', PACKAGE_NAME, 'testcases', 'SMB-RPC'), glob.glob('impacket/testcases/SMB-RPC/*'))]
+       )
diff --git a/python-impacket.spec b/python-impacket.spec
new file mode 100644
index 0000000..095581e
--- /dev/null
+++ b/python-impacket.spec
@@ -0,0 +1,59 @@
+%global srcname impacket
+
+Name:           python-%{srcname}
+Version:        0.9.11
+Release:        2%{?dist}
+Summary:        Collection of Python classes providing access to network packets
+
+License:        ASL 1.1 and zlib
+URL:            http://code.google.com/p/impacket/
+Source0:        https://pypi.python.org/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
+Patch0:         impacket-0.9.11-setup.patch
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+
+%description
+Impacket is a collection of Python classes focused on providing access to
+network packets. Impacket allows Python developers to craft and decode network
+packets in simple and consistent manner. it is highly effective when used in
+conjunction with a packet capture utility or package such as Pcapy. Packets
+can be constructed from scratch, as well as parsed from raw data. Furthermore,
+the object oriented API makes it simple to work with deep protocol hierarchies.
+
+%prep
+%setup -q -n %{srcname}-%{version}
+%patch0 -p1 -b .setup
+for file in uncrc32.py nmapAnswerMachine.py os_ident.py loopchain.py; do
+    sed -i -e '1i#!/usr/bin/env python' examples/$file
+done
+
+%build
+%{__python2} setup.py build
+
+%install
+%{__python2} setup.py install --skip-build --root %{buildroot}
+for file in tds.py ese.py; do
+    chmod a+x %{buildroot}%{python2_sitelib}/%{srcname}/$file
+done
+
+%files
+%doc ChangeLog LICENSE README examples
+%{python2_sitelib}/%{srcname}/
+%{python2_sitelib}/impacket*.egg-info
+%exclude %{_defaultdocdir}/%{name}/testcases/*
+
+%changelog
+* Sat Jun 28 2014 Fabian Affolter <mail at fabian-affolter.ch> - 0.9.11-2
+- Move files out of /usr/bin
+- Update licence (according to mailing list)
+
+* Wed Feb 26 2014 Fabian Affolter <mail at fabian-affolter.ch> - 0.9.11-1
+- Updated to new upstream release 0.9.11
+
+* Sat Aug 10 2013 Fabian Affolter <mail at fabian-affolter.ch> - 0.9.10-1
+- Updated to new upstream release 0.9.10
+
+* Sat Nov 17 2012 Fabian Affolter <mail at fabian-affolter.ch> - 0.9.9.9-1
+- Initial package
diff --git a/sources b/sources
index e69de29..228209a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+be93b861437aa0721a4d6904a292f5c6  impacket-0.9.11.tar.gz


More information about the scm-commits mailing list