Article 4S3AJ Search text if some part sequence exists

Search text if some part sequence exists

by
pedropt
from LinuxQuestions.org on (#4S3AJ)
Hi guys , i dont even know how to write the topic to match what i need .

Here it is , i am writing a definition file with errors messages appears in my web log servers .

Example of def.conf

Quote:
ThinkPHP_RCE /module/action/param1 ${@die(md5(HelloThinkPHP))}
Now in web server log this line could be in many forms but that specific sequence is there , by this i mean :

Quote:
111.111.111.111 "GET /index.php/module/action/param1 ${@die(md5(HelloThinkPHP))}"
111.111.111.111 "GET /something//module/action/param1 ${@die(md5(HelloThinkPHP))}

Now , when i put my script searching the definition log , i will use the variable i have in the log , witch is :
"/index.php/module/action/param1 ${@die(md5(HelloThinkPHP))}"

and i want the script to identify that this line belongs to "/module/action/param1 ${@die(md5(HelloThinkPHP))}" , and then i will retrieve with awk the variable $1 witch is ThinkPHP_RCE.

How can i do this ?latest?d=yIl2AUoC8zA latest?i=ljwuL0uAcx8:G_qzGu51F5o:F7zBnMy latest?i=ljwuL0uAcx8:G_qzGu51F5o:V_sGLiP latest?d=qj6IDK7rITs latest?i=ljwuL0uAcx8:G_qzGu51F5o:gIN9vFwljwuL0uAcx8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments