Skip to content

Commit

Permalink
Add extraction script
Browse files Browse the repository at this point in the history
  • Loading branch information
christophetd committed Mar 20, 2023
1 parent 89e228d commit c8ff619
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions malware-samples/pypi/extract.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

if [ $# -ne 1 ]; then
echo "Usage: $0 target-directory"
exit 1
fi

target=$1
mkdir -p $target
find . -type f -name '*.zip' | while read sample; do
unzipDir=$target/$(basename $sample .zip)
mkdir -p $unzipDir
unzip -o -P infected $sample -d $unzipDir >/dev/null 2>&1
done

0 comments on commit c8ff619

Please sign in to comment.