grep只显示匹配部分
程序员文章站
2022-07-12 14:08:53
...
以bugku的日志审计这道题为例
┌─[[email protected]]─[~/Downloads]
└──╼ $strings access.log | grep -o "dvwa.flag_is_here.*AND"
dvwa.flag_is_here%29%2C1%2C1%29%29%3E51%20AND
dvwa.flag_is_here%29%2C1%2C1%29%29%3E48%20AND
dvwa.flag_is_here%29%2C1%2C1%29%29%3E49%20AND
dvwa.flag_is_here%29%2C2%2C1%29%29%3E51%20AND
dvwa.flag_is_here%29%2C2%2C1%29%29%3E48%20AND
dvwa.flag_is_here%29%2C2%2C1%29%29%3E9%20AND
dvwa.flag_is_here%20ORDER%20BY%20flag%20LIMIT%200%2C1%29%2C1%2C1%29%29%3E64%20AND
dvwa.flag_is_her
....