Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import streamlit as st
|
2 |
import requests
|
3 |
|
4 |
def get_ip():
|
@@ -22,28 +22,28 @@ def get_location(ip_address):
|
|
22 |
}
|
23 |
return location_data
|
24 |
|
25 |
-
st.title("Hack any ip
|
26 |
get = st.selectbox(
|
27 |
-
'Choose way to get ip
|
28 |
("Input", "Get yours")
|
29 |
)
|
30 |
if get == "Input":
|
31 |
-
ip = st.text_input("Enter IP
|
32 |
sub = st.button("Hack")
|
33 |
if sub:
|
34 |
data = get_location(ip)
|
35 |
if data:
|
36 |
-
st.
|
37 |
-
City: {data[
|
38 |
-
Region: {data[
|
39 |
-
Country: {data[
|
40 |
-
Postal code: {data[
|
41 |
-
Latitude: {data[
|
42 |
-
Longitude: {data[
|
43 |
-
Timezone: {data[
|
44 |
-
UTC Offset: {data[
|
45 |
-
Country Calling Code: {data[
|
46 |
-
Country Population: {data[
|
47 |
|
48 |
if get == "Get yours":
|
49 |
ip = get_ip()
|
@@ -51,14 +51,14 @@ if get == "Get yours":
|
|
51 |
if sub:
|
52 |
data = get_location(ip)
|
53 |
if data:
|
54 |
-
st.
|
55 |
-
City: {data[
|
56 |
-
Region: {data[
|
57 |
-
Country: {data[
|
58 |
-
Postal code: {data[
|
59 |
-
Latitude: {data[
|
60 |
-
Longitude: {data[
|
61 |
-
Timezone: {data[
|
62 |
-
UTC Offset: {data[
|
63 |
-
Country Calling Code: {data[
|
64 |
-
Country Population: {data[
|
|
|
1 |
+
import streamlit as st
|
2 |
import requests
|
3 |
|
4 |
def get_ip():
|
|
|
22 |
}
|
23 |
return location_data
|
24 |
|
25 |
+
st.title("Hack any ip address and get info")
|
26 |
get = st.selectbox(
|
27 |
+
'Choose way to get ip address',
|
28 |
("Input", "Get yours")
|
29 |
)
|
30 |
if get == "Input":
|
31 |
+
ip = st.text_input("Enter IP address")
|
32 |
sub = st.button("Hack")
|
33 |
if sub:
|
34 |
data = get_location(ip)
|
35 |
if data:
|
36 |
+
st.markdown(f"""Information that we searched for this ip address: {data['ip']}
|
37 |
+
City: {data['city']}
|
38 |
+
Region: {data['region']}
|
39 |
+
Country: {data['country']}
|
40 |
+
Postal code: {data['postalcode']}
|
41 |
+
Latitude: {data['latitude']}
|
42 |
+
Longitude: {data['longitude']}
|
43 |
+
Timezone: {data['timezone']}
|
44 |
+
UTC Offset: {data['utc_offset']}
|
45 |
+
Country Calling Code: {data['country_calling_code']}
|
46 |
+
Country Population: {data['country_population']}""")
|
47 |
|
48 |
if get == "Get yours":
|
49 |
ip = get_ip()
|
|
|
51 |
if sub:
|
52 |
data = get_location(ip)
|
53 |
if data:
|
54 |
+
st.markdown(f"""Information that we searched for this ip address: {data['ip']}
|
55 |
+
City: {data['city']}
|
56 |
+
Region: {data['region']}
|
57 |
+
Country: {data['country']}
|
58 |
+
Postal code: {data['postalcode']}
|
59 |
+
Latitude: {data['latitude']}
|
60 |
+
Longitude: {data['longitude']}
|
61 |
+
Timezone: {data['timezone']}
|
62 |
+
UTC Offset: {data['utc_offset']}
|
63 |
+
Country Calling Code: {data['country_calling_code']}
|
64 |
+
Country Population: {data['country_population']}""")
|