360 Secure SkillHub
360 安全技能中心

ip lookup ( get ip )

通过 curl 调用 myip.ipip.net 等外部服务获取当前公网 IP,并展示城市、地区、国家、ISP 与组织信息;主接口失败时依次回退到 icanhazip.com、ipify、ifconfig.me 和 ipinfo.io,不保存历史,也不隐藏或切换 IP。

qidu
qidu
热度 90.71
最近更新 2026-05-11 15:53:33
分类:搜索依赖:代码执行 / 第三方 API应用场景:自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add get-ip
Metadata
name
ip-lookup
description
Get current public IP address and geolocation information. Use when users ask about IP addresses, network location, or want to check their public IP. Supports both fetching IP info and displaying it clearly.

IP Lookup Skill

Overview

This skill provides a simple way to check your public IP address and its geolocation information.

Usage

When users ask:

  • "What is my IP?"
  • "What is my current IP address?"
  • "What's my public IP?"
  • "Where am I?"
  • "Where am I located?"
  • "Check location"
  • "Check my IP location"
  • "Get location"
  • "Locate me"
  • "What's the IP?"
  • "What's your IP?"

Execute the workflow below.

Workflow

Basic IP Check

Run this command to get your public IP and location:

curl -s myip.ipip.net

Example output:

Current IP:8.8.8.8  From: SF CA USA Google
Current IP:1.1.1.1  From: SF CA USA Cloudflare

Alternative Methods

If the above fails, try these alternatives:

Method 1: icanhazip.com (fallback)

curl -s icanhazip.com

Method 2: ipify API

curl -s https://api.ipify.org

Method 3: ifconfig.me

curl -s ifconfig.me

Full Geolocation Lookup

For more detailed geolocation info:

curl -s https://ipinfo.io/$(curl -s https://api.ipify.org)/json

Display Format

Present the information clearly:

IP Address: [address] Location: [city], [region], [country] ISP: [ISP name] Org: [organization]

Error Handling

If the primary service (myip.ipip.net) fails:

  1. Try alternative services one by one
  2. Report which service succeeded
  3. If all fail, inform the user about the network issue