Skip to content

Commit

Permalink
Use extended regex modifier for pgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Loutsenko authored and adsr committed Jul 26, 2024
1 parent 981be79 commit f06f466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpspy.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ static int get_php_version(trace_target_t *target) {
" || readlink /proc/%d/exe; } "
"| { xargs stat --printf=%%n 2>/dev/null || echo /proc/%d/exe; } "
"| xargs strings "
"| grep -o 'X-Powered-By: PHP/\\d\\.\\d' "
"| grep -o '\\d\\.\\d' ",
"| grep -Eo 'X-Powered-By: PHP/[0-9]+\\.[0-9]+' "
"| grep -Eo '[0-9]+\\.[0-9]+' ",
pid, libname, pid, pid, pid
);
if ((size_t)n >= sizeof(version_cmd) - 1) {
Expand Down

0 comments on commit f06f466

Please sign in to comment.