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

add: ciphey #3890

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
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
39 changes: 39 additions & 0 deletions packages/ciphey/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ciphey
pkgver=5.14.0
pkgrel=1
pkgdesc='Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes.'
arch=('any')
groups=('blackarch' 'blackarch-cracker' 'blackarch-crypto')
url='https://github.com/Ciphey/Ciphey'
license=('MIT')
depends=('flake8' 'python' 'python37' 'python-appdirs' 'python-base58' 'python-base91' 'python-cipheycore' 'python-cipheydists' 'python-click' 'python-pylint' 'python-loguru' 'python-mock' 'python-pyyaml' 'python-pybase62' 'python-pywhat' 'python-rich' 'python-typing_inspect' 'python-xortool-ciphey')
makedepends=('python-poetry-core')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('3dee0b9812beab2ff2ceddf06e58531fd8bda36c8cc5f6615b4e9368ad86baccc95fe5dfb76e5cfb330265957107fb9b63fb09c43a43fb146567461a4a7cf490')

build() {
cd "$pkgname-$pkgver"

python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "$pkgname-$pkgver"

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
"$pkgname"
}
28 changes: 28 additions & 0 deletions packages/python-base91/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-base91
_pkgname=${pkgname#python-}
pkgver=1.0.1
pkgrel=1
pkgdesc='A Python implementation of Base91.'
arch=('any')
url='http://base91.sourceforge.net'
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('86c6e0e6dc19533ec1212da8f05caa7fdbdee8f003b7d70f513c4c4f682cd94e7db327896bbcd94c157c5f13cd24fb3213bf41b1daa3ab19c528c9be1f1231c6')

build() {
cd "$_pkgname-$pkgver"

python setup.py build
}

package() {
cd "$_pkgname-$pkgver"

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}
56 changes: 56 additions & 0 deletions packages/python-cipheycore/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cipheycore
_pkgname=${pkgname#python-}
pkgver=v0.3.2.r2.g63cc5fa
pkgrel=1
pkgdesc='Some cryptanalysis tidbits written in a proper language.'
arch=('any')
url='https://github.com/Ciphey/CipheyCore'
license=('MIT')
depends=('python')
makedepends=('boost' 'cmake' 'gcc' 'git' 'make' 'python-poetry' 'swig')
source=("git+https://github.com/Ciphey/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $_pkgname

git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
cd $_pkgname

# https://github.com/Ciphey/CipheyCore/pull/22
sed -i "4i #include <utility>" src/ciphers/xor_single.cpp
}

build() {
cd $_pkgname

mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCIPHEY_CORE_TEST=OFF
cmake --build . -t ciphey_core
cmake --build . -t ciphey_core_py --config Release
poetry build
}

package() {
cd $_pkgname

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$srcdir/$_pkgname/build/dist" \
"$_pkgname"
}
39 changes: 39 additions & 0 deletions packages/python-cipheydists/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cipheydists
_pkgname=${pkgname#python-}
pkgver=0.3.35
pkgrel=1
pkgdesc='Distributions for frequency analysis.'
arch=('any')
url='https://github.com/Ciphey/CipheyDists'
license=('custom:unlicense')
depends=('python')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c67005bbf98cd8047649b897436e63f4f2d48621ca424c32691d4c42b6f66432a214bea5d0297749c795a30a705436c936bb5156daddd02fa1633bda6951070c')

build() {
cd "$_pkgname-$pkgver"

python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "$_pkgname-$pkgver"

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
"$_pkgname"
}
28 changes: 28 additions & 0 deletions packages/python-pybase62/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pybase62
_pkgname=${pkgname#python-}
pkgver=1.2.1
pkgrel=1
pkgdesc='A Python module for base62 encoding.'
arch=('any')
url='http://github.com/suminb/base62'
license=('BSD')
depends=('python')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("$_pkgname::git+https://github.com/suminb/base62")
sha512sums=('SKIP')

build() {
cd "$_pkgname"

python setup.py build
}

package() {
cd "$_pkgname"

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}
39 changes: 39 additions & 0 deletions packages/python-xortool-ciphey/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-xortool-ciphey
_pkgname=xortool_ciphey
pkgver=0.1.16
pkgrel=1
pkgdesc='Multi-byte xor analysis for Ciphey.'
arch=('any')
url='https://pypi.org/project/xortool-ciphey'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-poetry-core')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('6c19cdbccea52704179f69885559ab4d8a17e2f8dffa0a484bcb26db6152e7e6bace0ad1912e4e73b6bc1d73b3d7617a6802402c31703d345d5d1b4880e10d5f')

build() {
cd "$_pkgname-$pkgver"

python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "$_pkgname-$pkgver"

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
"$_pkgname"
}
Loading