xp5
This commit is contained in:
parent
0d55851347
commit
c46e2ad096
4 changed files with 310 additions and 11 deletions
65
run_exp_5.sh
Normal file
65
run_exp_5.sh
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
WD=$(pwd)
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
||||
PLATFORM_DIR=$(mktemp -d)
|
||||
APKTOOL="${WD}/apktool.jar"
|
||||
DB="${SCRIPT_DIR}/data/app-2023-xp4.db"
|
||||
LIST=$(mktemp)
|
||||
APKTOOL="${SCRIPT_DIR}/apktool.jar"
|
||||
ANDROZOO_KEY="${SCRIPT_DIR}/.ZOO_KEY"
|
||||
|
||||
app_lst=(
|
||||
'00'
|
||||
'01'
|
||||
'02'
|
||||
'03'
|
||||
'04'
|
||||
'05'
|
||||
'06'
|
||||
'07'
|
||||
'08'
|
||||
'09'
|
||||
'10'
|
||||
'11'
|
||||
'12'
|
||||
'13'
|
||||
'14'
|
||||
'15'
|
||||
'16'
|
||||
'17'
|
||||
'18'
|
||||
'19'
|
||||
)
|
||||
|
||||
unzip platforms.zip -d "${PLATFORM_DIR}"
|
||||
|
||||
for ad in "${PLATFORM_DIR}"/**/{platform,sdk}; do
|
||||
cd ${ad}
|
||||
for jar in "${ad}"/*.jar; do
|
||||
java -Xmx8G -jar ${APKTOOL} d "${jar}"
|
||||
done
|
||||
done
|
||||
|
||||
cd "${WD}"
|
||||
|
||||
sqlite3 ${DB} 'SELECT sha256 FROM data WHERE nb_def_platform_32_classes >= 1 OR nb_def_platform_33_classes >= 1 OR nb_def_platform_34_classes >= 1;' > "${LIST}"
|
||||
|
||||
N_CHUNK=$(python3 -c "print($(cat ${LIST} | wc -l)//20 + 1)")
|
||||
rm -r ./app-2023-exp4
|
||||
mkdir ./app-2023-exp4
|
||||
split -a 2 -d -l "${N_CHUNK}" "${LIST}" ./app-2023-exp4/
|
||||
|
||||
worker () {
|
||||
for sha in $(cat "${1}"); do
|
||||
"${SCRIPT_DIR}"/venv/bin/check-platf-reder --api-key-file "${ANDROZOO_KEY}" --sha256 "${sha}" --path-platform-smali "${PLATFORM_DIR}" --apktool-jar "${APKTOOL}" --output-dir "${OUT_DIR}"
|
||||
done
|
||||
echo "Finished ${1}"
|
||||
}
|
||||
|
||||
for lst in ${app_lst[@]}; do
|
||||
worker "./app-2023-exp4/${lst}" &
|
||||
echo 1
|
||||
done
|
||||
|
||||
echo 'PROCESS LAUNCHED'
|
||||
Loading…
Add table
Add a link
Reference in a new issue