Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nali tool parses the ip source

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report