Skip to content

Commit 68a7fb9

Browse files
committed
Change default path for non-Windows system.
1 parent d20337b commit 68a7fb9

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

ip2trace.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
if platform.system() == 'Windows':
3232
default_path = os.path.expanduser('~') + os.sep + "Documents" + os.sep
3333
# elif platform.system() === 'Linux ':
34+
# elif platform.system() == 'Darwin':
3435
else:
35-
default_path = '/usr/share/ip2location/'
36+
default_path = '/usr/local/share/ip2location/'
37+
# default_path = '/usr/share/ip2location/'
3638

3739
# Now we copy the BIN database to default_path here instead of doing it duing installation as pip kept copied to wrong location.
3840
if (os.path.isfile(default_path + "IP2LOCATION-LITE-DB1.IPV6.BIN") == False):
@@ -152,7 +154,7 @@ def print_usage():
152154

153155
def print_version():
154156
print(
155-
"IP2Location Geolocation Traceroute (ip2trace) Version 3.1.1\n"
157+
"IP2Location Geolocation Traceroute (ip2trace) Version 3.1.2\n"
156158
"Copyright (c) 2021 IP2Location.com [MIT License]\n"
157159
"https://www.ip2location.com/free/traceroute-application\n")
158160

@@ -227,7 +229,7 @@ def __init__(self, destination_server, database, max_hops, output, all):
227229
sys.exit()
228230

229231
def print_start(self):
230-
print("IP2Location Geolocation Traceroute (ip2trace) Version 3.1.1\n"
232+
print("IP2Location Geolocation Traceroute (ip2trace) Version 3.1.2\n"
231233
"Copyright (c) 2021 IP2Location.com [MIT License]\n"
232234
"https://www.ip2location.com/free/traceroute-application\n\n")
233235
# print("Traceroute to", self.destination_domain_name[0], "(", self.destination_ip, ")\n\n", end="")

readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Usage: ip2tracepy -p [IP ADDRESS/HOSTNAME] -d [IP2LOCATION BIN DATA PATH] [OPTIO
2222
2323
-d, --database
2424
Specify the path of IP2Location BIN database file. You can download the latest free IP2Location BIN database from https://lite.ip2location.com.
25-
If the database filename is specified but without the path, ip2tracepy will search the database file in /usr/share/ip2location/ for Linux or C:\Users\(your_Windows_username)\Documents\ for Windows.
25+
If the database filename is specified but without the path, ip2tracepy will search the database file in /usr/local/share/ip2location/ for Linux or C:\Users\(your_Windows_username)\Documents\ for Windows.
2626
2727
-t, --ttl
2828
Set the max number of hops. (Default: 30)
@@ -46,13 +46,13 @@ Usage: ip2tracepy -p [IP ADDRESS/HOSTNAME] -d [IP2LOCATION BIN DATA PATH] [OPTIO
4646
Traceroute an IP address.
4747

4848
```bash
49-
ip2tracepy 8.8.8.8 -d /usr/share/ip2location/DB3.BIN -a
49+
ip2tracepy 8.8.8.8 -d /usr/local/share/ip2location/DB3.BIN -a
5050
```
5151

5252
Example output:
5353

5454
```bash
55-
IP2Location Geolocation Traceroute (ip2trace) Version 3.1.1
55+
IP2Location Geolocation Traceroute (ip2trace) Version 3.1.2
5656
Copyright (c) 2021 IP2Location.com [MIT License]
5757
https://www.ip2location.com/free/traceroute-application
5858

@@ -72,13 +72,13 @@ Traceroute to dns.google ( 8.8.8.8 )
7272
Traceroute by hostname
7373

7474
```bash
75-
ip2tracepy google.com -d /usr/share/ip2location/DB3.BIN -a
75+
ip2tracepy google.com -d /usr/local/share/ip2location/DB3.BIN -a
7676
```
7777

7878
Example output:
7979

8080
```bash
81-
IP2Location Geolocation Traceroute (ip2trace) Version 3.1.1
81+
IP2Location Geolocation Traceroute (ip2trace) Version 3.1.2
8282
Copyright (c) 2021 IP2Location.com [MIT License]
8383
https://www.ip2location.com/free/traceroute-application
8484

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name="IP2Trace",
9-
version="3.1.1",
9+
version="3.1.2",
1010
description="A Python tool to display geolocation information in the traceroute.",
1111
long_description_content_type="text/markdown",
1212
long_description=long_description,

0 commit comments

Comments
 (0)