Question

I'm searching a wordpress multisite set up for some possible SEO spam and I'm using the command line to curl with Mozilla but for some reason it's not working.

curl -A “Mozilla/4.0 \(compatible; MSIE 6.0; Windows NT 5.0\)” http://blogs.mysite.com | grep “http://www.gncc.ge/”

curl –user-agent “Mozilla/4.0 \(compatible; MSIE 6.0; Windows NT 5.0\)” http://blogs.mysite.com | grep “http://www.gncc.ge/” 

I've looked through a couple of tutorials to makes sure I was doing everything right but I either get nothing back or I get these errors.

I get these errors though

-bash: MSIE: command not found
-bash: Windows: command not found

Should these compatibility mentions not be included? Thank you.

Was it helpful?

Solution

Are you using curly quotes or straight quotes?

I see:

$ url -A “Mozilla/4.0 \(compatible; MSIE 6.0; Windows NT 5.0\)” http://blogs.mysite.com | grep “http://www.gncc.ge/”

And not:

$ url -A "Mozilla/4.0 \(compatible; MSIE 6.0; Windows NT 5.0\)" http://blogs.mysite.com | grep "http://www.gncc.ge/"

If you are using curly quotes, it can explain your issues. Curly quotes have no special meaning is the shell. Regular quotes keep the parameter from being divided by whitespace. Curly quotes do nothing of the sort.

Don't use TextEdit to edit command shell scripts. Get a real program editor. TextWrangler is free. It's the little brother to BBEdit.

Another one to try is TextMate, but it's not free.

Of course, you can always use Xcode which is free and comes with a full IDE environment. Or, learn Emacs or VIM which come on the Mac.

OTHER TIPS

Might need to escape your semicolons (That's what I had to do on cygwin):

curl –user-agent “Mozilla/4.0 \(compatible\; MSIE 6.0\; Windows NT 5.0\)” http://blogs.mysite.com | grep “http://www.gncc.ge/” 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top