Skip to content

Commit

Permalink
Ready to be evaluated
Browse files Browse the repository at this point in the history
  • Loading branch information
rcabezas29 committed Dec 29, 2023
1 parent 1f33b97 commit 93f7338
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ war
*.x86_64
*.hex

test
!test/
# Debug files
*.dSYM/
Expand Down
3 changes: 3 additions & 0 deletions test/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

sleep infinity
12 changes: 11 additions & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function test_folder_is_file(){
touch /tmp/test
./${NAME}
echo_green OK
rm -rf /tmp/test
}

function test_hello_world(){
Expand Down Expand Up @@ -110,7 +111,7 @@ function test_antidebug(){
}

function get_signatures(){
for f in $(find /tmp/test/ -type f ); do
for f in $(find /tmp/test* -type f ); do
strings $f | grep $LOGIN | cut -d '-' -f 3 | tr -s ' '
done
}
Expand All @@ -123,6 +124,14 @@ function test_war() {
cp /bin/cp /tmp/test/3
cp /bin/cp /tmp/test/4

find /bin/ -type f -exec sh -c '
for file do
if file "$file" | grep -q "ELF 64-bit"; then
cp "$file" /tmp/test2/
fi
done
' sh {} +

./$NAME
local signatures=$(get_signatures)
local total=$(echo $signatures | tr ' ' '\n' | wc -l)
Expand All @@ -131,6 +140,7 @@ function test_war() {
echo_red KO
else
echo_green OK
echo $signatures | tr ' ' '\n' | uniq | wc -l
fi
}

Expand Down

0 comments on commit 93f7338

Please sign in to comment.