BlackArch / blackarch

An ArchLinux based distribution for penetration testers and security researchers.
https://www.blackarch.org
Other
2.77k stars 550 forks source link

Apkid error #2074

Closed vdun closed 5 years ago

vdun commented 5 years ago
# apkid sample.apk
[+] APKiD 1.2.1 :: from RedNaga :: rednaga.io
2018-10-04 10:17:09 ERROR    error scanning sample.apk: could not open file "/usr/lib/python3.7/site-packages/apkid/rules/rules.yarc"
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/apkid/apkid.py", line 72, in scan
    matches = rules.match(file_path, timeout)
  File "/usr/lib/python3.7/site-packages/apkid/rules.py", line 72, in match
    load()
  File "/usr/lib/python3.7/site-packages/apkid/rules.py", line 41, in load
    RULES = yara.load(RULES_PATH)
yara.Error: could not open file "/usr/lib/python3.7/site-packages/apkid/rules/rules.yarc"
noptrix commented 5 years ago

where can we find this file? it's netiher i apkid nor in the fork of yara-rules from apkid ppl. any hints? btw, it seems that we've to compile them somewhere somehow: https://github.com/rednaga/APKiD/blob/8f88c138b05c14f304a1468451bf17a35ad5b9e3/.gitignore#L2 but you know which package? also, when trying to build via setup.py we get this:

[ noptrix@blackarch-dev ~/blackarch/repos/blackarch/packages/apkid/src/APKid ]$ python3 setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/apkid
copying apkid/__init__.py -> build/lib/apkid
copying apkid/rules.py -> build/lib/apkid
copying apkid/output.py -> build/lib/apkid
copying apkid/apkid.py -> build/lib/apkid
running egg_info
creating apkid.egg-info
writing apkid.egg-info/PKG-INFO
writing dependency_links to apkid.egg-info/dependency_links.txt
writing entry points to apkid.egg-info/entry_points.txt
writing requirements to apkid.egg-info/requires.txt
writing top-level names to apkid.egg-info/top_level.txt
writing manifest file 'apkid.egg-info/SOURCES.txt'
reading manifest file 'apkid.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'`
warning: no files found matching 'apkid/rules/rules.yarc'
writing manifest file 'apkid.egg-info/SOURCES.txt'
noptrix commented 5 years ago

and fucking pre-release.py gives us another error:

[*] Compiling Yara files
Traceback (most recent call last):
  File "./prep-release.py", line 46, in <module>
    rulez = rules.compile()
  File "/home/noptrix/blackarch/repos/blackarch/packages/apkid/src/APKid/apkid/rules.py", line 58, in compile
    return yara.compile(filepaths=yara_files)
yara.SyntaxError: /home/noptrix/blackarch/repos/blackarch/packages/apkid/src/APKid/apkid/rules/dex/compilers.yara(99): invalid field name "map_list"
noptrix commented 5 years ago

ok, seems we really need the yara-python fork from rednaga, which would overwrite files from python-yara of community. i need to talk to @FFY00 first to see what options are given

FFY00 commented 5 years ago

Report it in the official bugtracker first.

Edu4rdSHL commented 5 years ago

I'll try to fix and see if executing https://github.com/rednaga/APKiD/blob/master/prep-release.py in build() will solve the issue, it generates that file according to the code, https://github.com/rednaga/APKiD/blob/master/prep-release.py#L44-L48

Edu4rdSHL commented 5 years ago

and fucking pre-release.py gives us another error:

[*] Compiling Yara files
Traceback (most recent call last):
  File "./prep-release.py", line 46, in <module>
    rulez = rules.compile()
  File "/home/noptrix/blackarch/repos/blackarch/packages/apkid/src/APKid/apkid/rules.py", line 58, in compile
    return yara.compile(filepaths=yara_files)
yara.SyntaxError: /home/noptrix/blackarch/repos/blackarch/packages/apkid/src/APKid/apkid/rules/dex/compilers.yara(99): invalid field name "map_list"

That is because you need to enable the --enable-dex option when running setup.py build, i got it working but you've reason, it overwrite files that python-yara provides like /usr/lib/python3.7/site-packages/yara.cpython-37m-x86_64-linux-gnu.so, we need to report that in the bugtracker.

Edu4rdSHL commented 5 years ago

@noptrix @FFY00 i can got it working copying a precompiled rules.yarc to /usr/lib/python3.7/site-packages/apkid/rules/rules.yarc, what do you think about that?

sechacklabs@SecHackLabs ~ ->
 ➤➤➤➤ ▶ command -v apkid
/usr/bin/apkid
sechacklabs@SecHackLabs ~ ->
 ➤➤➤➤ ▶ cd Downloads/
sechacklabs@SecHackLabs ~/Downloads ->
 ➤➤➤➤ ▶ /usr/bin/apkid Signal-website-release-4.25.10.apk 
[+] APKiD 1.2.1 :: from RedNaga :: rednaga.io
[*] Signal-website-release-4.25.10.apk!classes2.dex
 |-> anti_vm : Build.HARDWARE check, Build.MANUFACTURER check
 |-> compiler : dx
[*] Signal-website-release-4.25.10.apk!classes.dex
 |-> anti_vm : Build.FINGERPRINT check, Build.HARDWARE check, Build.MANUFACTURER check, possible Build.SERIAL check
 |-> compiler : dx
[*] Signal-website-release-4.25.10.apk

that's nice. thank you. let's see what @FFY00 says.

FFY00 commented 5 years ago

Report it in the official arch bugtracker so that the issue gets fixed there.

Edu4rdSHL commented 5 years ago

@FFY00 I don't think that the ArchLinux community agree with modifying your packages only for our specifics reasons, I recommend that we package the yara-python fork and add it as dependency for apkid, I've both PKGBUILD's that can solve it issue.

APKid

# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.

pkgname=apkid
_pkgname=APKid
pkgver=v1.2.1.r3.g956d6dd
pkgrel=1
epoch=1
pkgdesc='Android Application Identifier for Packers, Protectors, Obfuscators and Oddities.'
groups=('blackarch' 'blackarch-mobile')
arch=('any')
url='https://github.com/rednaga/APKiD'
license=('GPL3')
depends=('python' 'python-argparse' 'yara-python')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/rednaga/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd "$_pkgname"

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

prepare() {
  cd "$_pkgname"

  ./prep-release.py
}

build() {
  cd "$_pkgname"

  python setup.py build
}

package() {
  cd "$_pkgname"

  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm 644 -t "$pkgdir/usr/share/doc/apkid/" README.md README.rst \
    AUTHORS.txt
  install -Dm 644 -t "$pkgdir/usr/share/licenses/apkid" LICENSE.GPL \
    LICENSE.COMMERCIAL
}

yara-python

# This file is part of BlackArch Linux ( http://blackarch.org ).
# See COPYING for license details.

pkgname=yara-python
_pkgname=yara-python-1
pkgver=3.8.1.r1.g39c475a
pkgrel=1
pkgdesc='The Python interface for YARA'
url='https://github.com/rednaga/yara-python-1'
arch=('any')
groups=('blackarch')
license=('Apache')
depends=('python')
makedepends=('python-setuptools')
provides=('python-yara')
conflicts=(python-yara')
source=("git+https://github.com/rednaga/${_pkgname}")
sha512sums=('SKIP')

prepare() {
  cd ${_pkgname}
  git submodule init
  git config submodule.https://plusvic@github.com/VirusTotal/yara.git $srcdir/yara
  git submodule update
}

build() {
  cd ${_pkgname}

  python setup.py build --enable-dex
}

package() {
  cd ${_pkgname}

  python setup.py install --root="$pkgdir" --optimize=1
}

BUILD AND WORKING TESTS

yara-python

sechacklabs@SecHackLabs ~/Git/edu4rdshl/blackarch/packages/yara-python ->
 ➤➤➤➤ ▶ makepkg
==> Making package: yara-python 3.8.1.r1.g39c475a-1 (Fri 05 Oct 2018 10:16:28 PM -05)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating yara-python-1 git repo...
Fetching origin
==> Validating source files with sha512sums...
    yara-python-1 ... Skipped
==> Extracting sources...
  -> Creating working copy of yara-python-1 git repo...
Reset branch 'makepkg'
==> Starting prepare()...
Cloning into '/tmp/makepkg/yara-python/src/yara-python-1/yara'...
Submodule path 'yara': checked out '546cc14a1d6aeb71a0b3dec49fabfe0ecd0fd348'
==> Starting build()...
running build
running build_ext
building 'yara' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/yara
creating build/temp.linux-x86_64-3.7/yara/libyara
creating build/temp.linux-x86_64-3.7/yara/libyara/proc
creating build/temp.linux-x86_64-3.7/yara/libyara/modules
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara-python.c -o build/temp.linux-x86_64-3.7/yara-python.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/threading.c -o build/temp.linux-x86_64-3.7/yara/libyara/threading.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/strutils.c -o build/temp.linux-x86_64-3.7/yara/libyara/strutils.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/stream.c -o build/temp.linux-x86_64-3.7/yara/libyara/stream.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/stopwatch.c -o build/temp.linux-x86_64-3.7/yara/libyara/stopwatch.o
yara/libyara/stopwatch.c: In function ‘yr_stopwatch_elapsed_us’:
yara/libyara/stopwatch.c:103:19: warning: unused variable ‘ts_stop’ [-Wunused-variable]
   struct timespec ts_stop;
                   ^~~~~~~
yara/libyara/stopwatch.c:112:20: warning: ‘ts_elapsed.tv_sec’ is used uninitialized in this function [-Wuninitialized]
   return ts_elapsed.tv_sec * 1000000L + ts_elapsed.tv_nsec / 1000;
          ~~~~~~~~~~^~~~~~~
yara/libyara/stopwatch.c:112:51: warning: ‘ts_elapsed.tv_nsec’ is used uninitialized in this function [-Wuninitialized]
   return ts_elapsed.tv_sec * 1000000L + ts_elapsed.tv_nsec / 1000;
                                         ~~~~~~~~~~^~~~~~~~
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/sizedstr.c -o build/temp.linux-x86_64-3.7/yara/libyara/sizedstr.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/scanner.c -o build/temp.linux-x86_64-3.7/yara/libyara/scanner.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/scan.c -o build/temp.linux-x86_64-3.7/yara/libyara/scan.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/rules.c -o build/temp.linux-x86_64-3.7/yara/libyara/rules.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/re_lexer.c -o build/temp.linux-x86_64-3.7/yara/libyara/re_lexer.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/re_grammar.c -o build/temp.linux-x86_64-3.7/yara/libyara/re_grammar.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/re.c -o build/temp.linux-x86_64-3.7/yara/libyara/re.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/parser.c -o build/temp.linux-x86_64-3.7/yara/libyara/parser.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/object.c -o build/temp.linux-x86_64-3.7/yara/libyara/object.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/mem.c -o build/temp.linux-x86_64-3.7/yara/libyara/mem.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/libyara.c -o build/temp.linux-x86_64-3.7/yara/libyara/libyara.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/lexer.c -o build/temp.linux-x86_64-3.7/yara/libyara/lexer.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/hex_lexer.c -o build/temp.linux-x86_64-3.7/yara/libyara/hex_lexer.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/hex_grammar.c -o build/temp.linux-x86_64-3.7/yara/libyara/hex_grammar.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/hash.c -o build/temp.linux-x86_64-3.7/yara/libyara/hash.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/grammar.c -o build/temp.linux-x86_64-3.7/yara/libyara/grammar.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/filemap.c -o build/temp.linux-x86_64-3.7/yara/libyara/filemap.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/exefiles.c -o build/temp.linux-x86_64-3.7/yara/libyara/exefiles.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/exec.c -o build/temp.linux-x86_64-3.7/yara/libyara/exec.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/endian.c -o build/temp.linux-x86_64-3.7/yara/libyara/endian.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/compiler.c -o build/temp.linux-x86_64-3.7/yara/libyara/compiler.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/bitmask.c -o build/temp.linux-x86_64-3.7/yara/libyara/bitmask.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/atoms.c -o build/temp.linux-x86_64-3.7/yara/libyara/atoms.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/arena.c -o build/temp.linux-x86_64-3.7/yara/libyara/arena.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/ahocorasick.c -o build/temp.linux-x86_64-3.7/yara/libyara/ahocorasick.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc/windows.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc/windows.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc/openbsd.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc/openbsd.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc/none.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc/none.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc/mach.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc/mach.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc/linux.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc/linux.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/proc/freebsd.c -o build/temp.linux-x86_64-3.7/yara/libyara/proc/freebsd.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/time.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/time.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/tests.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/tests.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/pe_utils.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/pe_utils.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/pe.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/pe.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/math.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/math.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/hash.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/hash.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/elf.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/elf.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/dex.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/dex.o
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -DHASH_MODULE=1 -DHAVE_LIBCRYPTO=1 -DDEX_MODULE=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.7m -c yara/libyara/modules/demo.c -o build/temp.linux-x86_64-3.7/yara/libyara/modules/demo.o
creating build/lib.linux-x86_64-3.7
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/yara-python.o build/temp.linux-x86_64-3.7/yara/libyara/threading.o build/temp.linux-x86_64-3.7/yara/libyara/strutils.o build/temp.linux-x86_64-3.7/yara/libyara/stream.o build/temp.linux-x86_64-3.7/yara/libyara/stopwatch.o build/temp.linux-x86_64-3.7/yara/libyara/sizedstr.o build/temp.linux-x86_64-3.7/yara/libyara/scanner.o build/temp.linux-x86_64-3.7/yara/libyara/scan.o build/temp.linux-x86_64-3.7/yara/libyara/rules.o build/temp.linux-x86_64-3.7/yara/libyara/re_lexer.o build/temp.linux-x86_64-3.7/yara/libyara/re_grammar.o build/temp.linux-x86_64-3.7/yara/libyara/re.o build/temp.linux-x86_64-3.7/yara/libyara/proc.o build/temp.linux-x86_64-3.7/yara/libyara/parser.o build/temp.linux-x86_64-3.7/yara/libyara/object.o build/temp.linux-x86_64-3.7/yara/libyara/modules.o build/temp.linux-x86_64-3.7/yara/libyara/mem.o build/temp.linux-x86_64-3.7/yara/libyara/libyara.o build/temp.linux-x86_64-3.7/yara/libyara/lexer.o build/temp.linux-x86_64-3.7/yara/libyara/hex_lexer.o build/temp.linux-x86_64-3.7/yara/libyara/hex_grammar.o build/temp.linux-x86_64-3.7/yara/libyara/hash.o build/temp.linux-x86_64-3.7/yara/libyara/grammar.o build/temp.linux-x86_64-3.7/yara/libyara/filemap.o build/temp.linux-x86_64-3.7/yara/libyara/exefiles.o build/temp.linux-x86_64-3.7/yara/libyara/exec.o build/temp.linux-x86_64-3.7/yara/libyara/endian.o build/temp.linux-x86_64-3.7/yara/libyara/compiler.o build/temp.linux-x86_64-3.7/yara/libyara/bitmask.o build/temp.linux-x86_64-3.7/yara/libyara/atoms.o build/temp.linux-x86_64-3.7/yara/libyara/arena.o build/temp.linux-x86_64-3.7/yara/libyara/ahocorasick.o build/temp.linux-x86_64-3.7/yara/libyara/proc/windows.o build/temp.linux-x86_64-3.7/yara/libyara/proc/openbsd.o build/temp.linux-x86_64-3.7/yara/libyara/proc/none.o build/temp.linux-x86_64-3.7/yara/libyara/proc/mach.o build/temp.linux-x86_64-3.7/yara/libyara/proc/linux.o build/temp.linux-x86_64-3.7/yara/libyara/proc/freebsd.o build/temp.linux-x86_64-3.7/yara/libyara/modules/time.o build/temp.linux-x86_64-3.7/yara/libyara/modules/tests.o build/temp.linux-x86_64-3.7/yara/libyara/modules/pe_utils.o build/temp.linux-x86_64-3.7/yara/libyara/modules/pe.o build/temp.linux-x86_64-3.7/yara/libyara/modules/math.o build/temp.linux-x86_64-3.7/yara/libyara/modules/hash.o build/temp.linux-x86_64-3.7/yara/libyara/modules/elf.o build/temp.linux-x86_64-3.7/yara/libyara/modules/dex.o build/temp.linux-x86_64-3.7/yara/libyara/modules/demo.o -L/usr/lib -lcrypto -lpython3.7m -o build/lib.linux-x86_64-3.7/yara.cpython-37m-x86_64-linux-gnu.so
==> Entering fakeroot environment...
==> Starting package()...
running install
running build
running build_ext
running install_lib
creating /tmp/makepkg/yara-python/pkg/yara-python/usr
creating /tmp/makepkg/yara-python/pkg/yara-python/usr/lib
creating /tmp/makepkg/yara-python/pkg/yara-python/usr/lib/python3.7
creating /tmp/makepkg/yara-python/pkg/yara-python/usr/lib/python3.7/site-packages
copying build/lib.linux-x86_64-3.7/yara.cpython-37m-x86_64-linux-gnu.so -> /tmp/makepkg/yara-python/pkg/yara-python/usr/lib/python3.7/site-packages
writing byte-compilation script '/tmp/tmpq__q5i3j.py'
/usr/bin/python /tmp/tmpq__q5i3j.py
removing /tmp/tmpq__q5i3j.py
running install_egg_info
running egg_info
creating yara_python.egg-info
writing yara_python.egg-info/PKG-INFO
writing dependency_links to yara_python.egg-info/dependency_links.txt
writing top-level names to yara_python.egg-info/top_level.txt
writing manifest file 'yara_python.egg-info/SOURCES.txt'
reading manifest file 'yara_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'yara_python.egg-info/SOURCES.txt'
Copying yara_python.egg-info to /tmp/makepkg/yara-python/pkg/yara-python/usr/lib/python3.7/site-packages/yara_python-3.7.0.999-py3.7.egg-info
running install_scripts
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "yara-python"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: yara-python 3.8.1.r1.g39c475a-1 (Fri 05 Oct 2018 10:16:57 PM -05)
sechacklabs@SecHackLabs ~/Git/edu4rdshl/blackarch/packages/yara-python ->
 ➤➤➤➤ ▶ sudo pacman -U yara-python-3.8.1.r1.g39c475a-1-any.pkg.tar.xz 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) yara-python-3.8.1.r1.g39c475a-1

Total Installed Size:  0.35 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                    [##############################################] 100%
(1/1) checking package integrity                                                  [##############################################] 100%
(1/1) loading package files                                                       [##############################################] 100%
(1/1) checking for file conflicts                                                 [##############################################] 100%
(1/1) checking available disk space                                               [##############################################] 100%
:: Processing package changes...
(1/1) installing yara-python                                                      [##############################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

APKid

sechacklabs@SecHackLabs ~/Git/edu4rdshl/blackarch/packages/apkid ->
 ➤➤➤➤ ▶ makepkg
==> Making package: apkid 1:1.2.1.r3.g956d6dd-1 (Fri 05 Oct 2018 10:25:11 PM -05)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning APKid git repo...
Cloning into bare repository '/home/sechacklabs/Git/edu4rdshl/blackarch/packages/apkid/APKid'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 1596 (delta 0), reused 3 (delta 0), pack-reused 1590
Receiving objects: 100% (1596/1596), 9.77 MiB | 1.26 MiB/s, done.
Resolving deltas: 100% (924/924), done.
==> Validating source files with sha512sums...
    APKid ... Skipped
==> Extracting sources...
  -> Creating working copy of APKid git repo...
Reset branch 'makepkg'
==> Starting prepare()...
[*] Compiling Yara files
[*] Saved 186 rules to /tmp/makepkg/apkid/src/APKid/apkid/rules/rules.yarc
[*] Rule tag counts:
 |-> abnormal: 2
 |-> anti_debug: 1
 |-> anti_disassembly: 3
 |-> anti_vm: 28
 |-> compiler: 10
 |-> dropper: 2
 |-> embedded: 1
 |-> internal: 27
 |-> manipulator: 1
 |-> obfuscator: 16
 |-> packer: 94
 |-> protector: 1
[*] Finished prepping.
==> Starting pkgver()...
==> Updated version: apkid 1:v1.2.1.r3.g956d6dd-1
==> Removing existing $pkgdir/ directory...
==> Starting build()...
running build
running build_py
running egg_info
writing apkid.egg-info/PKG-INFO
writing dependency_links to apkid.egg-info/dependency_links.txt
writing entry points to apkid.egg-info/entry_points.txt
writing requirements to apkid.egg-info/requires.txt
writing top-level names to apkid.egg-info/top_level.txt
reading manifest file 'apkid.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'apkid.egg-info/SOURCES.txt'
copying apkid/rules/rules.yarc -> build/lib/apkid/rules
==> Entering fakeroot environment...
==> Starting package()...
running install
running build
running build_py
running egg_info
writing apkid.egg-info/PKG-INFO
writing dependency_links to apkid.egg-info/dependency_links.txt
writing entry points to apkid.egg-info/entry_points.txt
writing requirements to apkid.egg-info/requires.txt
writing top-level names to apkid.egg-info/top_level.txt
reading manifest file 'apkid.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'apkid.egg-info/SOURCES.txt'
running install_lib
creating /tmp/makepkg/apkid/pkg/apkid/usr
creating /tmp/makepkg/apkid/pkg/apkid/usr/lib
creating /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7
creating /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages
creating /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid
creating /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid/rules
copying build/lib/apkid/rules/rules.yarc -> /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid/rules
copying build/lib/apkid/__init__.py -> /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid
copying build/lib/apkid/apkid.py -> /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid
copying build/lib/apkid/output.py -> /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid
copying build/lib/apkid/rules.py -> /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid
byte-compiling /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid/__init__.py to __init__.cpython-37.pyc
byte-compiling /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid/apkid.py to apkid.cpython-37.pyc
byte-compiling /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid/output.py to output.cpython-37.pyc
byte-compiling /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid/rules.py to rules.cpython-37.pyc
writing byte-compilation script '/tmp/tmpl5w9tu56.py'
/usr/bin/python /tmp/tmpl5w9tu56.py
removing /tmp/tmpl5w9tu56.py
running install_egg_info
Copying apkid.egg-info to /tmp/makepkg/apkid/pkg/apkid/usr/lib/python3.7/site-packages/apkid-1.2.1-py3.7.egg-info
running install_scripts
Installing apkid script to /tmp/makepkg/apkid/pkg/apkid/usr/bin
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> WARNING: Package contains reference to $srcdir
usr/lib/python3.7/site-packages/apkid/rules/rules.yarc
==> Creating package "apkid"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: apkid 1:v1.2.1.r3.g956d6dd-1 (Fri 05 Oct 2018 10:25:21 PM -05)
sechacklabs@SecHackLabs ~/Git/edu4rdshl/blackarch/packages/apkid ->
 ➤➤➤➤ ▶ sudo pacman -U apkid-1\:v1.2.1.r3.g956d6dd-1-any.pkg.tar.xz 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) apkid-1:v1.2.1.r3.g956d6dd-1

Total Installed Size:  1.14 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                    [##############################################] 100%
(1/1) checking package integrity                                                  [##############################################] 100%
(1/1) loading package files                                                       [##############################################] 100%
(1/1) checking for file conflicts                                                 [##############################################] 100%
(1/1) checking available disk space                                               [##############################################] 100%
:: Processing package changes...
(1/1) installing apkid                                                            [##############################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

WORK TEST

sechacklabs@SecHackLabs ~/Downloads ->
 ➤➤➤➤ ▶ apkid Signal-website-release-4.25.10.apk 
[+] APKiD 1.2.1 :: from RedNaga :: rednaga.io
[*] Signal-website-release-4.25.10.apk!classes2.dex
 |-> anti_vm : Build.HARDWARE check, Build.MANUFACTURER check
 |-> compiler : dx
[*] Signal-website-release-4.25.10.apk!classes.dex
 |-> anti_vm : Build.FINGERPRINT check, Build.HARDWARE check, Build.MANUFACTURER check, possible Build.SERIAL check
 |-> compiler : dx
[*] Signal-website-release-4.25.10.apk

@noptrix, @FFY00 let me know what do you think about that.

Edu4rdSHL commented 5 years ago

Still waiting for @noptrix and @FFY00 approbation.

FFY00 commented 5 years ago

Why the well did you name the package yara-python? That's just wrong. It should be named python-yara-rednaga! Please fix this. I know I haven't been that active the last few days but I don't think this is that time sensitive that you needed to merge it before I had a look at it.

Some notes on the PKGBUILD.

git config submodule.https://plusvic@github.com/VirusTotal/yara.git $srcdir/yara

should be

git config submodule.yara.git $srcdir/yara

Are you sure this is working as is? I really doubt it.

Please follow the PKGBUILD in the official repo https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/python-yara. You can ignore the python 2/split package specific stuff.

Edu4rdSHL commented 5 years ago

@FFY00 all issues that you mentioned has been fixed in https://github.com/BlackArch/blackarch/commit/c818ac83777e84e82c57700377a8867ba0dd48b8. Also the package works accordly to https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git_Submodules,

@noptrix you can merge the package when you want.

I'm closing it issue.

noptrix commented 5 years ago

@vdun should be fixed now. we just released python-yara-rednaga along with apkid. make sure to remove python-yara when p4cm4n asks.