Skip to content

Commit f06f466

Browse files
Alexander Loutsenkoadsr
authored andcommitted
Use extended regex modifier for pgrep
1 parent 981be79 commit f06f466

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

phpspy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,8 @@ static int get_php_version(trace_target_t *target) {
779779
" || readlink /proc/%d/exe; } "
780780
"| { xargs stat --printf=%%n 2>/dev/null || echo /proc/%d/exe; } "
781781
"| xargs strings "
782-
"| grep -o 'X-Powered-By: PHP/\\d\\.\\d' "
783-
"| grep -o '\\d\\.\\d' ",
782+
"| grep -Eo 'X-Powered-By: PHP/[0-9]+\\.[0-9]+' "
783+
"| grep -Eo '[0-9]+\\.[0-9]+' ",
784784
pid, libname, pid, pid, pid
785785
);
786786
if ((size_t)n >= sizeof(version_cmd) - 1) {

0 commit comments

Comments
 (0)