Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望同时支持多数据库结果查询 #127

Open
ixuanwu opened this issue Jul 30, 2022 · 2 comments
Open

希望同时支持多数据库结果查询 #127

ixuanwu opened this issue Jul 30, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ixuanwu
Copy link

ixuanwu commented Jul 30, 2022

No description provided.

@zu1k
Copy link
Owner

zu1k commented Jul 31, 2022

还没有想好结果呈现的格式,这个feature应该会在统计模式之后实现

@zu1k zu1k added the enhancement New feature or request label Jul 31, 2022
@zu1k zu1k added this to the Statistics mode milestone Jul 31, 2022
@o98k-ok
Copy link

o98k-ok commented Feb 19, 2025

#!/bin/bash

ip="$1"  # 统一提取参数

if [ -e $ip ]
then
    ip=$(curl -s https://ifconfig.io/ip)
fi

# 定义处理函数(避免重复代码)
process_output() {
    local db_name=$1
    local output
    output=$(NALI_DB_IP4="$db_name" nali "$ip" 2>&1)

    # 安全处理换行符
    output="${output#"${output%%[![:space:]]*}"}"  # 去开头空白
    output="${output%"${output##*[![:space:]]}"}"  # 去结尾空白

    printf "%-15s -> \033[32m%s\033[0m\n" "<$db_name>" "$output"
}

process_output ipip
process_output ip2region
process_output qqwry
process_output zxipv6wry

这个enhancement很长时间了, 我先写了一个shell脚本凑合着。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants