-
Notifications
You must be signed in to change notification settings - Fork 4
/
fast_test.sh
executable file
·39 lines (34 loc) · 888 Bytes
/
fast_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Script to test the aplication by sending apks to the server and run the manager
echo 'Starting test, assuming server.py is running on localhost:5000'
echo 'Run with 1 apk only[1] or run with all apks of the list[2]?'
read varoption
file="apks.txt"
# Just sending one apk to test the api
if [ $varoption = "1" ];
then
firstLine=$(head -n 1 $file)
echo "Sending $firstLine"
curl -X POST "http://localhost:5000/apkscan?md5=$line"
sed -i '1d' $file
python3 manager.py
fi
# Send all apks in the list
if [ $varoption = "2" ];
then
n=1
while read line; do
echo "$line"
curl -X POST "http://localhost:5000/apkscan?md5=$line"
n=$((n+1))
done < $file
python3 manager.py
fi
echo 'script completed'
# file='apks.txt'
# n=1
# while read line; do
# echo "LINE No $n : $line"
# n=$((n+1))
# done < $file
# python3 manager.py