MarkdownPad Documenthtml
CTF的Crypto中常常会遇到这样的加密git
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.github
有经验的赛棍一眼就能够看出这是Brainfuck加密,brainfuck又被称为brainf**k或者BF,
brainfuck语言用> < + - . , [ ]八种符号来替换C语言的各类语法和命令,具体规则以下:web
The Brainfuck programming language consists of eight commands, each of which is represented as a single character.express
> Increment the pointer.
< Decrement the pointer.
+ Increment the byte at the pointer.
- Decrement the byte at the pointer.
. Output the byte at the pointer.
, Input a byte and store it in the byte at the pointer.
[ Jump forward past the matching ] if the byte at the pointer is zero.
] Jump backward to the matching [ unless the byte at the pointer is zero.编程
The semantics of the Brainfuck commands can also be succinctly expressed in terms of C, as follows (assuming that p has been previously defined as a char*):canvas
> becomes ++p;
< becomes --p;
+ becomes ++*p;
- becomes --*p;
. becomes putchar(*p);
, becomes *p = getchar();
[ becomes while (*p) {
] becomes }ruby
而另外一种相似的Ook!编程语言也偶尔遇到,以下:markdown
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.app
Ook!语言与brainfuck相似,也是用了替换,具体规则以下:
Ook! has only three distinct syntax elements:
Ook.
Ook?
Ook!
These are combined into groups of two, and the various pair combinations specify commands. Programs must thus contain an even number of "Ook"s. Line breaks are ignored.
Ook. Ook?
Move the Memory Pointer to the next array cell.
Ook? Ook.
Move the Memory Pointer to the previous array cell.
Ook. Ook.
Increment the array cell pointed at by the Memory Pointer.
Ook! Ook!
Decrement the array cell pointed at by the Memory Pointer.
Ook. Ook!
Read a character from STDIN and put its ASCII value into the cell pointed at by the Memory Pointer.
Ook! Ook.
Print the character with ASCII value equal to the value in the cell pointed at by the Memory Pointer.
Ook! Ook?
Move to the command following the matching Ook? Ook! if the value in the cell pointed at by the Memory Pointer is zero. Note that Ook! Ook? and Ook? Ook! commands nest like pairs of parentheses, and matching pairs are defined in the same way as for parentheses.
Ook? Ook!
Move to the command following the matching Ook! Ook? if the value in the cell pointed at by the Memory Pointer is non-zero.
固然对于咱们而言,咱们没有必要弄清楚Ook!和brainfuck的语法,由于网上已经有了不少现成的解密脚本和在线网站,这里提供一个在线的Ook!和brainfuck的在线加密解密网址:
https://www.splitbrain.org/services/ook2017-2-7 11:21;03