package demos.antiSQLInjection;


import gudusoft.gsqlparser.EDbVendor;

public class antiSQLInjection  {

    public static void main(String args[])
     {

         String sqltext = "select col1  from table1 where col1>1 or 1=1; drop table a; delete from a;--comment ";
         TAntiSQLInjection anti = new TAntiSQLInjection(EDbVendor.dbvoracle);
         if (anti.isInjected(sqltext)){
            System.out.println("SQL injected found:");
            for(int i=0;i<anti.getSqlInjections().size();i++){
                System.out.println("type: "+anti.getSqlInjections().get(i).getType()+", description: "+ anti.getSqlInjections().get(i).getDescription());
            }
         }else {
             System.out.println("Not injected");
         }

     }

}