grep只显示匹配部分

以bugku的日志审计这道题为例

┌─[thekingofnight@parrot]─[~/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
....

你可能感兴趣的:(grep只显示匹配部分)