Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix at line 69 #7

Open
0xbitx opened this issue Jan 16, 2024 · 1 comment
Open

fix at line 69 #7

0xbitx opened this issue Jan 16, 2024 · 1 comment

Comments

@0xbitx
Copy link

0xbitx commented Jan 16, 2024

import sys

import requests

import json

answer = True

while answer:

print('''\033[2;33m 



_  _ _  _ ___ ____ ____ _  _    _ ___  

|\ |  \/   |  | __ |___ |\ | __ | |__] 

| \| _/\_  |  |__] |___ | \|    | |    

                                     

[1] My ip

[2] Trace an IP

[3] Contact the developer 

[4] Exit

\033[2;32m''')

answer = input("SELECT AN OPTION:")

if answer == "1":

    def my_ip():

        response = requests.get('https://api64.ipify.org?format=json').json()

        return response

    print(my_ip())

    break

elif answer == "2":

    the_ip = input("INPUT THE IP ADDRESS HERE:")

    file_type = 'json'

    def locate_data():

        lookup = 'https://ipapi.co'

        response = requests.get(f'{lookup}/{the_ip}/json/').json()

        location_data={

            "ip": the_ip,

            "org": response.get("org"),

            "hostname": response.get("hostname"),

            "version": response.get("version"),

            "city": response.get("city"),

            "country": response.get("country"),

            "country_code": response.get("country_code"),

            "country_name": response.get("country_name"),

            "country_code_iso3": response.get("country_code_iso3"),

            "country_capital": response.get("country_capital"),

            "country_tld": response.get("country_tld"),

            "country_area": response.get("country_area"),

            "country_population": response.get("country_population"),

            "region": response.get("region"),

            "region_code": response.get("region_code"),

            "continent_code": response.get("continent_code"),

            "in_europe": response.get("in_eu"),

            "postal": response.get("postal"),

            "latitude": response.get("latitude"),

            "longitude": response.get("longitude"),

            "timezone": response.get("timezone"),

            "utc_offset": response.get("utc_offset"),

            "country_calling_code": response.get("country_calling_code"),

            "currency": response.get("currency"),

            "currency_name": response.get("currency_name"),

            "languages": response.get("languages"),

        }

        return location_data

    print(json.dumps(locate_data(), indent=4))

    file = open('results.txt', 'w')

    file.write(json.dumps(locate_data(), indent=4))

    file.close()

    print("\033[1;34m this session datas are now recorded here \"results.txt\"\033[1;33m")

    break

elif answer == "3":

    print('''\033[2;32m

     CHASE YOUR DREAMS(⌐■_■)

     DO WHAT YOU LOVE (。_。) SUCCESS WILL COME TO YOU NATURALLY

     

     

     FACEBOOK PAGE : https://facebook.com/cyberhacks6

     GROUP CHAT : https://facebook.com/groups/shade234sherif

     MAIN ACC : https://facebook.com/shade234sherif

     ALSO FOLLOW MY CODES ON GITHUB/GITLAB @shade234sherif

  

      \033[1;33m''')

    break

elif answer == "4":

    sys.exit()

elif answer != "":

    print("""INVALID OPTION

    

    KINDLY RETRY """)
@harkerbyte
Copy link
Owner

I don't understand... What issue are you facing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants