开发者

Reverse engineering base64 variation

开发者 https://www.devze.com 2023-02-01 23:52 出处:网络
I\'m dealing with a strange base64 variation. I need to write decoder for it but I\'ve stuck with reverse engineering. It differs not so much from original base64. It looks like there\'s something wit

I'm dealing with a strange base64 variation. I need to write decoder for it but I've stuck with reverse engineering. It differs not so much from original base64. It looks like there's something with bit padding or smth.

Here are some known encoded strings:

开发者_高级运维
  • YQ== - a
  • YQA= - aa
  • YQBh - aaa
  • YQBhAA== - aaaa
  • YQBhAGE= - aaaaa
  • YQBhAGEA - aaaaaa
  • YQBhAGEAYQ== - aaaaaaa
  • YQBhAGEAYQA= - aaaaaaaa
  • YQBhAGEAYQBh - aaaaaaaaa


At the risk of sounding stupid, my bet would be that the encoding above is a buggy implementation that is mixing chars and wchar_ts together.

Using "regular" base64, the string 'YQA=' decodes to 'a\x00' and the 'YQBhAGEAYQA=' decodes to 'a\x00a\x00a\x00a\x00'.

Any chance you could supply a few more examples so we can cancel this theory?

0

精彩评论

暂无评论...
验证码 换一张
取 消