Get the App
SLTechnology News&Howtos  ›  Database  › 

Nali tool parses the ip source

Shulou Source: shulou.com Published: 2022-06-01 02:20:11 11月18日 Update

I. background

In daily operation and maintenance, we often need to parse the ip source of each service access, or find and locate the ip access source. Today, we introduce an open source query tool, nali, which can be queried using a pure ip database.

II. Installation

1. Download and compile the installation

Wget https://qqwry.googlecode.com/files/nali-0.2.tar.gz # cannot be accessed or fails, please move to https://pan.baidu.com/s/1eS276kq tar xvf nali-0.2.tar.gzcd nali-0.2makemake install

2. Update the ip database

Cd / usr/local/share/

Update QQWry.Dat pure ip database

Method 1:

Download https://pan.baidu.com/s/1eS276kq this package includes an ip database by default, but it may be a little old

Decompress it and put it here.

Method 2:

Download from the official website http://www.cz88.net of innocence.

Install the software to update the database after windows step down and upload it to / user/local/share to complete the update.

Third, use nali tools to complete ip parsing.

1. Script parsing

The script reads as follows:

Cat nali.sh

#! / bin/bashcat ip.txt | while read linedo echo $line `nali $line | awk-F "['{print $2}'| awk-F']''{print $1}'| awk-F'{print $1} '`done

Description: put the ip to be parsed into ip.txt and save it one by one, and then run nali.sh

2. Test and use

Tags: Data database update innocence tool method script software query source line content official website website background software package dimension location service Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Xiaomi OPPO Reno NVidia Huawei