[Скрипт, С] Автоматизация работы автоматизатора SQLMAP

Discussion in 'Инструменты' started by neofit, 3 Dec 2012.

  1. neofit

    neofit Banned

    Joined:
    14 Nov 2009
    Messages:
    223
    Likes Received:
    14
    Reputations:
    0
    Собственно, автоматизация (не фронтэнд) для SQLMAP автор Coded by Ajith Kp


    Code:
    /*
    * Coded by Ajith Kp
    * Works In LinuX
    * Compiled With gcc compiler
    * Automated SQLMAP Command Executor
    * Just Input Data and enjoy
    * Jai Hind
    * Long Live Hindustan
    * WwW.Openfire-Security.Net [ToF]
    * wWw.SuckTheTech.BlogSpot.in [PerSonal]
    * WwW.CodingBrainStorm.BlogSpot.In [w3p]
    * Hope Maximum Share
    */
    #include <stdio.h>
    #include <string.h>
    
    void url_in();
    void options();
    void dbs();
    void table();
    void column();
    void dump();
    void banner();
    void greets();
    
        char cmd[]="python ./sqlmap.py -u ";
        char d[10]=" -D ";
        char t[10]=" -T ";
        char db[10]=" --dbs";
        char tab[20]=" --tables";
        char col[20]=" --columns";
        char c[20]=" -C ";
        char dum[20]=" --dump";
        char url[50];
    
    
    main()
    {
        banner();
        url_in();
        options();
    }
    void url_in()
    {
        printf("\n\nInput URL: ");
        gets(url);
    }
    void options()
    {
        int option;
        system("clear");
        banner();
        printf("\n\nSelect Your Option:\n "); 
        printf("\n\t1. DBS\n\t2. Tables\n\t3. Columns\n\t4. Dump Data\n\nInput Option[1,2,3,4]: ");
        scanf("%d", &option);
        switch(option)
        {
            case 1:
                dbs();
                break;
            case 2:
                table();
                break;
            case 3:
                column();
                break;
            case 4:
                dump();
                break;
            default:
                printf("\nWrong Input Try again!");
                greets();
                break;
        }
    }
        
    void dbs()
    {
        char pirr1[250]="";
        system("clear");
        banner();
        strcat(pirr1, cmd);
        strcat(pirr1, url);
        strcat(pirr1,db);
        printf("\n%s\n",pirr1);
        system(pirr1);
    }
    void table()
    {
        char pirr2[250]="";
        char dbnamet[50];
        system("clear");
        banner();
        printf("\nInput DB Name: ");
        scanf("%s",dbnamet);
        strcat(pirr2, cmd);
        strcat(pirr2, url);
        strcat(pirr2, d);
        strcat(pirr2, dbnamet);
        strcat(pirr2, tab);
        printf("%s\n",pirr2);
        system(pirr2);
        printf("\n\nPress Enter To Explore Columns");
    }
    void column()
    {
        char pirr3[250]="";
        char dbnamec[50], tablenamec[50];
        system("clear");
        banner();
        printf("\nInput DB Name: ");
        scanf("%s",dbnamec);
        printf("\nInput Table Name: ");
        scanf("%s",tablenamec);
        strcat(pirr3, cmd);
        strcat(pirr3, url);
        strcat(pirr3, d);
        strcat(pirr3, dbnamec);
        strcat(pirr3, t);
        strcat(pirr3, tablenamec);
        strcat(pirr3, col);
        printf("%s\n",pirr3);
        system(pirr3);
        printf("\nPress Enter to Continue...");
    }
    void dump()
    {
        char pirr4[250]="";
        char dbnamed[50], tablenamed[50], columnnamed[50];
        system("clear");
        banner();
        printf("\n\nInput DB Name: ");
        scanf("%s",dbnamed);
        printf("\nInput Table Name: ");
        scanf("%s",tablenamed);
        printf("\nInput Column Name: ");
        scanf("%s",columnnamed);
        strcat(pirr4,cmd);
        strcat(pirr4,url);
        strcat(pirr4,d);
        strcat(pirr4,dbnamed);
        strcat(pirr4,t);
        strcat(pirr4,tablenamed);
        strcat(pirr4,c);
        strcat(pirr4,columnnamed);
        strcat(pirr4,dum);
        printf("%s\n",pirr4);
        system(pirr4);
    }
    void greets()
    {
        printf("\n\n\n\t\tAmsteck Arts & Science College, BCA Batch");
        printf("\n\nCoded By\n\t Ajith Kp: www.facebook.com/ajithkp560");
        printf("\n\tvisit: www.suckthetech.blogspot.in\n\twww.codingbrainstorm.blogspot.in [Ajmal Josh]");
        printf("\n\tAjmal Josh: www.facebook.com/ajmal.josh");
        printf("\n\tDheeraj KV: BCA");
        printf("\n\tJhelai Sahadevan: BSc Physics");
        printf("\n\tJithendra Singh: BSc Physics");
        printf("\n...& All My friends from Amsteck and Team Open Fire");
        printf("\n\n...Press Enter To Continue...");
    }
    void banner()
    {
        printf("\n\t+---------------------------------------------------------------+");
        printf("\n\t|coded by Ajith Kp           |           facebook.com/ajithkp560|");
        printf("\n\t|www.suckthetech.blogspot.com | www.codingbrainstorm.blogpot.com|");
        printf("\n\t| Dheeraj KV                                   Jhelai Sahadevan |");
        printf("\n\t| Ajmal Joshi                                          Jitendra |");
        printf("\n\t| TeamOpenFire: Coded32, Alex, John,S udeep & All other Members |");
        printf("\n\t+---------------------------------------------------------------+");
    } 
    
    Собераем программу:--> gcc sqlmap.c -O sqlmap --> Я паложил программу в папку со скриптами sqlmap --> Запускаем ./sqlmap

    Не ново, но всё же, может кому пригодица;)
     
    1 person likes this.
  2. blesse

    blesse Member

    Joined:
    18 Jan 2012
    Messages:
    175
    Likes Received:
    8
    Reputations:
    1
    Чето я не понял что она автоматизирует?
     
    #2 blesse, 3 Dec 2012
    Last edited by a moderator: 4 Dec 2012
  3. Pirotexnik

    Pirotexnik Member

    Joined:
    13 Oct 2010
    Messages:
    376
    Likes Received:
    73
    Reputations:
    38
    По сути ничего, просто более удобный ввод команд. Что-то типа встроенного --wizard :)