Closed M09Ic closed 1 year ago
with fatal: https://github.com/zu1k/nali/pull/163#issuecomment-1554537648
I did not reproduce the error, so if it still exists, please point it out.
This PR breaks the original output format, please fix it.
without nali
❯ nslookup fake.com
Server: 192.168.226.100
Address: 192.168.226.100#53
Name: fake.com
Address: 198.18.59.212
with old version nali
❯ nslookup fake.com | nali
Server: 192.168.226.100 [局域网 对方和您在同一内部网]
Address: 192.168.226.100 [局域网 对方和您在同一内部网] #53
Name: fake.com
Address: 198.18.59.212 [IANA 保留地址]
with this pr version nali
❯ nslookup fake.com | ./nali
Server:
192.168.226.100 [局域网 对方和您在同一内部网]
Address:
192.168.226.100 [局域网 对方和您在同一内部网]
#53
Name:
Name: fake.com
Address:
198.18.59.212 [IANA 保留地址]
with fatal: #163 (comment)
I did not reproduce the error, so if it still exists, please point it out.
https://github.com/zu1k/nali/pull/163#discussion_r1198949818
If we need to output the database name, I recommend using the real database name defined in the configuration file, because the user may modify it, and the same database format may have multiple sources and therefore may have different names.
- name: geoip2
format: mmdb
file: GeoIP2-City.mmdb
- name: geolite2
format: mmdb
file: GeoLite2-City.mmdb
- name: ipinfo
format: mmdb
file: ipinfo_country.mmdb
- name: dbip
format: mmdb
file: dbip.mmdb
If we need to output the database name, I recommend using the real database name defined in the configuration file, because the user may modify it, and the same database format may have multiple sources and therefore may have different names.
- name: geoip2 format: mmdb file: GeoIP2-City.mmdb - name: geolite2 format: mmdb file: GeoLite2-City.mmdb - name: ipinfo format: mmdb file: ipinfo_country.mmdb - name: dbip format: mmdb file: dbip.mmdb
Has been changed to return the same value for dbif.Name func as db.Name field.
This PR breaks the original output format, please fix it.
without nali
❯ nslookup fake.com Server: 192.168.226.100 Address: 192.168.226.100#53 Name: fake.com Address: 198.18.59.212
with old version nali
❯ nslookup fake.com | nali Server: 192.168.226.100 [局域网 对方和您在同一内部网] Address: 192.168.226.100 [局域网 对方和您在同一内部网] #53 Name: fake.com Address: 198.18.59.212 [IANA 保留地址]
with this pr version nali
❯ nslookup fake.com | ./nali Server: 192.168.226.100 [局域网 对方和您在同一内部网] Address: 192.168.226.100 [局域网 对方和您在同一内部网] #53 Name: Name: fake.com Address: 198.18.59.212 [IANA 保留地址]
resolve it in commit https://github.com/zu1k/nali/pull/165/commits/56be0c61cae1ce6e653fefcca974e1be371a6a91
Sorry for the late, had too many things a while ago. This PR looks good so far, I'm going to merge it!
Cleaned up the code and solved multiple problems in pr #163
The specific changes compared to #163:
source
fields to json output.example1:
example2: