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

[WIP] frida fix #4398

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ blackarch-mirrorlist
!/bluez-hciconfig/*.h
!/bluez-hciconfig/*.txt
!/bluez-hciconfig/*.1
!/packages/frida/COPYING
50 changes: 15 additions & 35 deletions packages/frida-tools/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,56 +1,36 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=frida-tools
pkgname=('python2-frida-tools' 'python-frida-tools')
pkgname='python-frida-tools'
_pkgname=frida-tools
pkgver=11.0.0
pkgrel=3
pkgver=13.6.0
pkgrel=1
pkgdesc='Frida CLI tools.'
groups=('blackarch' 'blackarch-mobile' 'blackarch-binary' 'blackarch-reversing')
arch=('any')
url='https://pypi.org/project/frida-tools/#files'
license=('custom:unknown')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$pkgbase-$pkgver.tar.gz"
depends=('python' 'python-frida' 'python-colorama' 'python-prompt_toolkit'
'python-pygments' 'libimobiledevice' 'python-websockets')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
'setup.py.patch')
sha512sums=('31ed33ea0a652f9f7c0055c1770663bbace60ef9e15446ddc71719878fee78b1907b63b7ca12527972a41f2021d770c77a4cc52ee8ed88c4c53a089f15298527'
'48dc1d48f21e0d5672b7b628aca40c2431687608c4e228fbace9c88172b13103814af6ef9abebb4539fafa5700787b9af2c86b0c3b7988c805711db7458186e4')
sha512sums=('fe7d49cf38632d0e27342439543f73e1024ddc235ba037a771ffd56b8f1eab815372b5a0332254078d52e12dd743772b6e540f2ebf16eeac4d31fc78955b8c57'
'988bc97e8a09bd8410c9f3c9336fa7a3b5aec85de56bc69331935260453d940ce676be5507f3585d7e9333d40155d1557e9af0d78cd46324c81ea63da5c4cb2f')

prepare() {
#patch -p1 < setup.py.patch

cp -a "$pkgbase-$pkgver"{,-2}
}
# prepare() {
# #patch -p1 < setup.py.patch
# }

build() {
cd "$pkgbase-$pkgver-2"

python2 setup.py build

cd "$srcdir/$pkgbase-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py build
}

package_python2-frida-tools() {
depends=('python2' 'python2-frida' 'python2-colorama' 'python2-prompt_toolkit'
'python2-pygments' 'libimobiledevice')

cd "$pkgbase-$pkgver-2"

python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

for i in "$pkgdir/usr/bin/"* ; do
mv $i "${i}2"
done
}

package_python-frida-tools() {
depends=('python' 'python-frida' 'python-colorama' 'python-prompt_toolkit'
'python-pygments' 'libimobiledevice')

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

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}
Expand Down
6 changes: 4 additions & 2 deletions packages/frida-tools/setup.py.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
--- src/frida-tools-10.4.1/setup.py 2021-10-09 01:58:26.000000000 +0200
--- src/lol/setup.py 2021-10-09 01:58:26.000000000 +0200
+++ setup.py 2021-10-17 14:35:03.236666206 +0200
@@ -20,10 +20,10 @@
author_email="oleavr@frida.re",
url="https://frida.re",
install_requires=[
- "colorama >= 0.2.7, < 1.0.0",
- "frida >= 15.0.0, < 16.0.0",
- "frida >= 16.2.2, < 17.0.0",
- "prompt-toolkit >= 2.0.0, < 4.0.0",
- "pygments >= 2.0.2, < 3.0.0"
- "websockets >= 13.0.0, < 14.0.0",
+ "colorama",
+ "frida",
+ "prompt-toolkit",
+ "pygments"
+ "websockets",
],
license="wxWindows Library Licence, Version 3.1",
zip_safe=True,
34 changes: 34 additions & 0 deletions packages/frida-tools2/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname='python2-frida-tools'
_pkgname=frida-tools
pkgver=11.0.0
pkgrel=3
pkgdesc='Frida CLI tools.'
groups=('blackarch' 'blackarch-mobile' 'blackarch-binary' 'blackarch-reversing')
arch=('any')
url='https://pypi.org/project/frida-tools/#files'
license=('custom:unknown')
depends=('python2' 'python2-frida' 'python2-colorama' 'python2-prompt_toolkit'
'python2-pygments' 'libimobiledevice')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('31ed33ea0a652f9f7c0055c1770663bbace60ef9e15446ddc71719878fee78b1907b63b7ca12527972a41f2021d770c77a4cc52ee8ed88c4c53a089f15298527')

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

python2 setup.py build
}

package_python2-frida-tools() {
cd "$_pkgname-$pkgver"

python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

for i in "$pkgdir/usr/bin/"* ; do
mv $i "${i}2"
done
}

9 changes: 5 additions & 4 deletions packages/frida/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# See COPYING for license details.

pkgname=python-frida
_pkgname=frida
_pkgname=${pkgname#python-}
pkgver=16.5.7
pkgrel=1
pkgrel=2
pkgdesc='Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers.'
groups=('blackarch' 'blackarch-reversing' 'blackarch-binary')
arch=('x86_64' 'aarch64')
# https://frida.re/ - https://github.com/frida/frida
url='https://pypi.org/project/frida/#files'
depends=('python' 'python-colorama' 'python-pygments' 'python-prompt_toolkit'
'python-typing_extensions' 'python-tomlkit')
makedepends=('python-build' 'python-installer' 'python-wheel' 'nodejs' 'npm'
'python-setuptools')
'python-setuptools' 'git')
license=('custom:unknown')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
'https://raw.githubusercontent.com/frida/frida/master/COPYING')
Expand All @@ -25,7 +26,7 @@ build() {
python -m build --wheel --no-isolation --outdir="$startdir/dist"
}

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

python -m installer --destdir="$pkgdir" dist/*.whl
Expand Down