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 #6

Closed
0xbitx opened this issue Dec 14, 2023 · 1 comment
Closed

fix at line 69 #6

0xbitx opened this issue Dec 14, 2023 · 1 comment

Comments

@0xbitx
Copy link

0xbitx commented Dec 14, 2023

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

harkerbyte commented Dec 14, 2023

From what I can see here, It appears that you're using an outdated package... To update to the newest version, kindly run these commands

rm - rf nxtgen-ip

git clone https://github.com/harkerbyte/nxtgen-ip

python3 ip.py

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