index
:
w32miller.git
malware development kit for x86 windows based platforms
log msg
author
committer
range
main
about
summary
refs
log
tree
commit
diff
path:
root
/
batch
/
old
/
genhex.sh
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
(limited to 'batch/old/genhex.sh')
-rwxr-xr-x
batch/old/genhex.sh
18
1 files changed, 18 insertions, 0 deletions
diff --git a/batch/old/genhex.sh b/batch/old/genhex.sh
new file mode 100755
index 0000000..114ea34
--- /dev/null
+++ b/
batch/old/genhex.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+ DPATH="$(pwd)"
+else
+ DPATH="$1"
+fi
+
+echo "$0: generate *.hex files in $(ls ${DPATH})"
+for file in $(ls ${DPATH}); do
+ [ -d ${file} ] && continue
+ FLEN=$((${#file}-4))
+ FSUFFIX=${file:$FLEN:4}
+ if [ "$FSUFFIX" != ".hex" ]; then
+ xxd "${file}" > "${file}.hex"
+ fi
+done
+