O'Reilly logo

Learning Python Web Penetration Testing by Christian Martorella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Automating the detection

Let's go back to the editor and open, this in Section-6, SQLinjector-0.py. It's important to highlight that all the content and scripts are based on MySQL database and will only work with this database.

In the import section, we have the same content we were using in Chapter 5, Password Testing. Then, we have the typical banner and usage functions:

def banner():  print "\n***************************************"  print "* SQlinjector 1.0 *"  print "***************************************"def usage():  print "Usage:"  print " -w: url (http://somesite.com/news.php?id=FUZZ)\n"    print " -i: injection strings file \n"  print "example: SQLinjector.py -w http://www.somesite.com/news.php?id=FUZZ \n"

Then, we have the start function, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required