diff options
author | jakob | 2018-11-11 22:43:19 +0100 |
---|---|---|
committer | jakob | 2018-11-11 22:43:19 +0100 |
commit | b1c580078d96b9c604388d9319f2ce69cc18a58c (patch) | |
tree | f6374f8cedb0aa64d3c2d3a6c4e57fa1121ac7d0 | |
parent | fb7d6f2c7ba95e382838c945adbeb986d8f49cb9 (diff) | |
download | aur-b1c580078d96b9c604388d9319f2ce69cc18a58c.tar.gz |
Use pycryptodome explicitly instead of pycrypto
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | pycryptodome.patch | 27 |
3 files changed, 40 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = selfspy-git pkgdesc = X11 personal keylogger daemon with statistical analysis. pkgver = 0.1.4.r202.ga98a9c0 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = https://github.com/gurgeh/selfspy install = selfspy.install @@ -15,15 +15,17 @@ pkgbase = selfspy-git depends = python2-xlib depends = python2-sqlalchemy depends = tk - depends = python2-crypto + depends = python2-pycryptodome provides = selfspy=0.1.4.r202.ga98a9c0 conflicts = selfspy source = selfspy::git+https://github.com/gurgeh/selfspy.git source = selfspy.conf source = selfspy@.service + source = pycryptodome.patch md5sums = SKIP md5sums = c19d0212e7c6c1fe90c6975da9937db2 md5sums = 2874c55b09f87c946824dfdf4f60e1ed + md5sums = SKIP pkgname = selfspy-git @@ -4,7 +4,7 @@ pkgname=selfspy-git _pkgname=${pkgname%-git} pkgver=0.1.4.r202.ga98a9c0 -pkgrel=1 +pkgrel=2 epoch=1 pkgdesc="X11 personal keylogger daemon with statistical analysis." url="https://github.com/gurgeh/selfspy" @@ -19,14 +19,16 @@ depends=('python2-daemon' 'python2-xlib' 'python2-sqlalchemy' 'tk' - 'python2-crypto') + 'python2-pycryptodome') makedepends=('git') source=("$_pkgname"::"git+https://github.com/gurgeh/$_pkgname.git" "$_pkgname.conf" - "$_pkgname@.service") + "$_pkgname@.service" + 'pycryptodome.patch') md5sums=('SKIP' 'c19d0212e7c6c1fe90c6975da9937db2' - '2874c55b09f87c946824dfdf4f60e1ed') + '2874c55b09f87c946824dfdf4f60e1ed' + 'SKIP') pkgver() { cd $_pkgname @@ -37,6 +39,9 @@ prepare() { cd $_pkgname sed -i 's/env python/env python2/g' $_pkgname/__init__.py sed -i 's:var/lib:usr/share:g' Makefile + sed -i 's/pycrypto>=.\+/pycryptodome>=3.6.6/g' requirements.txt + # Apply hacks to keep it working with pycryptodome + patch -p1 < "$srcdir/pycryptodome.patch" } package() { diff --git a/pycryptodome.patch b/pycryptodome.patch new file mode 100644 index 000000000000..69ba4f392651 --- /dev/null +++ b/pycryptodome.patch @@ -0,0 +1,27 @@ +diff --git a/selfspy/__init__.py b/selfspy/__init__.py +index b77b814..e93dacb 100755 +--- a/selfspy/__init__.py ++++ b/selfspy/__init__.py +@@ -72,7 +72,7 @@ def make_encrypter(password): + if password == "": + encrypter = None + else: +- encrypter = Blowfish.new(hashlib.md5(password).digest()) ++ encrypter = Blowfish.new(hashlib.md5(password).digest(), Blowfish.MODE_ECB) + return encrypter + + +diff --git a/selfspy/stats.py b/selfspy/stats.py +index 609b59f..a1dc0a3 100755 +--- a/selfspy/stats.py ++++ b/selfspy/stats.py +@@ -551,7 +551,7 @@ def make_encrypter(password): + if password == "": + encrypter = None + else: +- encrypter = Blowfish.new(hashlib.md5(password).digest()) ++ encrypter = Blowfish.new(hashlib.md5(password).digest(), Blowfish.MODE_ECB) + return encrypter + + + |