0

My current code is testing a SQL injection mitigation test cases using python. The code posted is only a small section of the entire project. The purpose of this code is to test different methods of mitigating SQL injection attacks. However, I would like to know how I can make the code better.

def test_comments():
    username = "Safeguard1234"
    password = "Myspace1234'; INSERT INTO passwordList(name, passwd) VALUES 'myspace1234', 'nine"

    sql = gen_query(username, password)
    print(sql)

    sql = gen_query_weak(username, password)
    print("Weak Mitigated SQL: " + sql)
    sql = gen_query_strong(username, password)
    print("Strong Mitigated SQL: " + sql)

BRN
  • 1
  • 1

0 Answers0