1. 当前位置:网站首页 > 数据恢复

数据恢复中xor和add(亦或加减运算)脚本(可在winhex中运行)


数据恢复中xor和add(亦或加减运算)脚本

(可在winhex中运行)也就是中盈底层编辑软件中

create "c:\add_xor.txt" 0
assign str ""
getuserinput mm "请输入密文的4个字节"
getuserinput tt "请输入明文的4个字节"
write mm
write2 tt
convert hexascii binary
goto 0
read m 4
read t 4
block 0 7
remove

assign m1 (m&0xFF)
assign m2 ((m/256)&0xFF)
assign m3 ((m/65536)&0xFF)
assign m4 ((m/16777216)&0xFF)
assign t1 (t&0xFF)
assign t2 ((t/256)&0xFF)
assign t3 ((t/65536)&0xFF)
assign t4 ((t/16777216)&0xFF)

write "用下面给出的值对密文 先异或再加减 解密"
write 0x0D0A
assign xor 255
assign a 1
{
assign add ((m1^xor)-t1)
IfEqual m2 (((t2+add)&0xFF)^xor)
IfEqual m3 (((t3+add)&0xFF)^xor)
IfEqual m4 (((t4+add)&0xFF)^xor)
assign add ((0x100-add)&0xFF)
inttostr str a
write str
write ".异或="
inttostr str xor
write str
write "  .加="
inttostr str add
write str
write 0x0D0A
inc a
endif
endif
endif
dec xor
}[256]

write "用下面给出的值对密文 先ADD再XOR 解密"
write 0x0D0A
assign xor 255
{
assign add (m1-(t1^xor))
IfEqual m2 (((t2^xor)+add)&0xFF)
IfEqual m3 (((t3^xor)+add)&0xFF)
IfEqual m4 (((t4^xor)+add)&0xFF)
assign add ((0x100-add)&0xFF)
inttostr str a
write str

write ".加"
inttostr str add
write str

write "  .异或="
inttostr str xor
write str
write 0x0D0A
inc a
endif
endif
endif
dec xor
}[256]
save
messagebox "题目解密方法已保存到 C: \add_xor.txt 文件中,请查看!!!"
exit

在数据解释器中按回车打开脚本页面,添加脚本运行


本文最后更新于2023-4-30,已超过 3个月没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
版权说明

本文地址:https://bolg.xs357.com/post-13.html
未标注转载均为本站远程,转载请注明文章出处:

联系我们

在线咨询:点击这里给我发消息

微信号:LS1975172433

工作日:9:00-23:00,节假日休息

扫码关注