Pen-testing tools in Python
Penetration testing tools in Python. I wrote these to test the security of the forms I build for work in React.js. I built a form to test code-injection tools. Below are a list of the security tests that I run on applications that contain forms.
XSS Scripting with test forms and RESTful API
SQL Injection with test forms and RESTful API
To test SQL Injection tools, open 2 tabs on your terminal and go to form directory in one of them. Perform the
following first to launch the RESTful API locally
- cd form
- npm install
- npm run prod_start
This most likely will crash becuase you need to add the parameters to your local SQL database in the config.js file,
located in the modules folder. The testform saves the first and last name of the users in a table I called in my local MySQL database “Users”.
- var config = {
- development: {
- database: {
- host: '127.0.0.1',
- user: 'root',
- password: '',
- database: 'Users'
- }
- }
- };
- module.exports = config;
Once you have settup your database, in your other window run the Python script that is in the sqlinjection folder.
- python3 sqlinjector.py
The results will be
- SQL Injection Vulnerability Detected
- http status code:
- 200
The reason for this is described in the sqlinjection folder