Is there a way to find SQL injection vulnerabilities?
Note: I am asking how to find them on a server you are in control of so you can fix them. I am not asking about how to detect them on someone else’s server to exploit them.
Is there a way to find every occurance of mysql_query() without opening every page and doing a ctrl+f?
Using linux, you can use the
greputility./dir/containing/files: The directory containing your PHP files, for example, /home/user/domains/example.com/public_html-type f: search for files only (not directories)-name '*.php'match files ending with.phponly. If you’ld like to match other files too, like.incuse this instead:-name '*.php' -o -name '*.inc'(matches *.php OR *.inc)|xargs grepuse the contents of the found files for searching--color=autohighlights the found part"mysql_query"your search terms