Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py #657

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
setup.py
Python3
Deemonetized authored Jun 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 30288093a6e94c10dcbb9f0c1ed688c47eb154d8
100 changes: 48 additions & 52 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# Copyright 2015, John Mora, johmora12@engineer.com
@@ -21,21 +21,16 @@

import sys
import platform
from distutils.core import setup, Extension
from distutils.command.build_ext import build_ext
from distutils.unixccompiler import UnixCCompiler
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils.errors import CompileError


VERSION = '0.5.1'

UnixCCompiler.src_extensions.append('.S')


# Support for AES-NI-intrinsics is not found everywhere
EXTRA_COMPILE_ARGS = ['-Wall', '-fno-strict-aliasing',
'-DVERSION="%s"' % (VERSION,)]
# Support for AES-NI-intrinsics is not found everyhwere
if sys.platform in ('darwin', 'linux2') and \
if sys.platform in ('darwin', 'linux') and \
platform.machine() in ('x86_64', 'i386'):
EXTRA_COMPILE_ARGS.extend(('-maes', '-mpclmul'))

@@ -45,7 +40,7 @@ class LazyBuilder(build_ext):
-maes and -mpclmul first. If that fails, it simply re-tries with
those flags disabled.
This is not exactly elegant but probably the most portable solution
given the limited capabilities of distutils to detect compiler-versions.
given the limited capabilities of setuptools to detect compiler-versions.
'''

def build_extension(self, ext):
@@ -62,46 +57,47 @@ def build_extension(self, ext):


cpu_extension = Extension(name='cpyrit._cpyrit_cpu',
sources = ['cpyrit/_cpyrit_cpu.c',
'cpyrit/_cpyrit_cpu_sse2.S'],
libraries = ['crypto', 'pcap'],
extra_compile_args=EXTRA_COMPILE_ARGS)
sources=['cpyrit/_cpyrit_cpu.c',
'cpyrit/_cpyrit_cpu_sse2.S'],
libraries=['crypto', 'pcap'],
extra_compile_args=EXTRA_COMPILE_ARGS)

setup_args = {
'name': 'pyrit',
'version': VERSION,
'description': 'GPU-accelerated attack against WPA-PSK authentication',
'long_description': \
"Pyrit allows to create massive databases, pre-computing part " \
"of the WPA/WPA2-PSK authentication phase in a space-time-" \
"tradeoff. Exploiting the computational power of Many-Core- " \
"and other platforms through ATI-Stream, Nvidia CUDA and OpenCL " \
", it is currently by far the most powerful attack against one " \
"of the world's most used security-protocols.",
'license': 'GNU General Public License v3',
'author': 'Lukas Lueg',
'author_email': 'lukas.lueg@gmail.com',
'url': 'https://github.com/JPaulMora/Pyrit',
'maintainer': 'John Mora',
'maintainer_email': 'johmora12@engineer.com',
'classifiers': \
['Development Status :: 4 - Beta',
'Environment :: Console',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Security'],
'platforms': ['any'],
'packages': ['cpyrit'],
'py_modules': ['pyrit_cli', 'cpyrit.cpyrit',
'cpyrit.util', 'cpyrit.pckttools',
'cpyrit.config', 'cpyrit.network'],
'scripts': ['pyrit'],
'ext_modules': [cpu_extension],
'cmdclass': {'build_ext': LazyBuilder},
'options': {'install': {'optimize': 1}}
}
setup(
name='pyrit',
version=VERSION,
description='GPU-accelerated attack against WPA-PSK authentication',
long_description=(
"Pyrit allows to create massive databases, pre-computing part "
"of the WPA/WPA2-PSK authentication phase in a space-time-"
"tradeoff. Exploiting the computational power of Many-Core- "
"and other platforms through ATI-Stream, Nvidia CUDA and OpenCL "
", it is currently by far the most powerful attack against one "
"of the world's most used security-protocols."
),
license='GNU General Public License v3',
author='Lukas Lueg',
author_email='lukas.lueg@gmail.com',
url='https://github.com/JPaulMora/Pyrit',
maintainer='John Mora',
maintainer_email='johmora12@engineer.com',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Security'
],
platforms=['any'],
packages=['cpyrit'],
py_modules=[
'pyrit_cli', 'cpyrit.cpyrit', 'cpyrit.util',
'cpyrit.pckttools', 'cpyrit.config', 'cpyrit.network'
],
scripts=['pyrit'],
ext_modules=[cpu_extension],
cmdclass={'build_ext': LazyBuilder},
options={'install': {'optimize': 1}}
)

if __name__ == '__main__':
setup(**setup_args)