xorfilesスクリプトを作成し、chmodの+ X xorfiles、xorfiles 1.TXT 2.txt>
#!/bin/bash
file1=$(echo| cat $1)
file2=$(echo | cat $2)
#xor $file1 $file2
function xor()
{
local res=(`echo "$1" | sed "s/../0x& /g"`)
shift 1
while [[ "$1" ]]; do
local one=(`echo "$1" | sed "s/../0x& /g"`)
local count1=${#res[@]}
if [ $count1 -lt ${#one[@]} ]
then
count1=${#one[@]}
fi
for ((i = 0; i < $count1; i++))
do
res[$i]=$((${one[$i]:-0}^${res[$i]:-0}))
done
shift 1
done
printf "%02x" "${res[@]}"
}
echo $(xor $file1 $file2)
結果3.txtます。http://
[email protected]:~$ ./xorfiles ./1.txt ./2.txt
02a0feea81a19b33
誰かがあなたのためのアプリをしましたwww.nirsoft.net/utils/xorfiles.html 次回はどのようなprogについて具体的にしてください。あなたが望む言語、または何がos。 – aslavkin
ありがとうございました –
私はこのドメインに新しいと私はあなたの助けが必要です –