utility-tools

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Utility Tools Skill

实用工具Skill

This skill provides various utility functions for common tasks like translation, IP lookup, QR code generation, and more.
本Skill提供多种实用工具功能,可完成翻译、IP查询、二维码生成等常见任务。

Available Tools

可用工具

  1. IP Address Lookup - Get location and ISP info for any IP
  2. Text Translation - Translate between multiple languages
  3. QR Code Generation - Create QR codes for any text/URL
  4. Hash Calculation - Calculate MD5, SHA1, SHA256, SHA512
  5. OG Metadata Extraction - Extract Open Graph metadata from URLs
  6. WHOIS Lookup - Domain registration information
  7. Password Generation - Generate secure random passwords
  1. IP地址查询 - 查询任意IP的地理位置及ISP信息
  2. 文本翻译 - 支持多语言互译
  3. 二维码生成 - 为任意文本/URL生成二维码
  4. 哈希计算 - 计算MD5、SHA1、SHA256、SHA512哈希值
  5. OG元数据提取 - 从URL中提取Open Graph元数据
  6. WHOIS查询 - 查询域名注册信息
  7. 密码生成 - 生成安全随机密码

API Endpoints

API接口

ToolEndpointMethod
IP Lookup
/v2/ip
GET
Translation
/v2/fanyi
POST
QR Code
/v2/qrcode
GET
Hash
/v2/hash
POST
OG Metadata
/v2/og
POST
WHOIS
/v2/whois
GET
Password
/v2/password
GET
工具接口地址请求方法
IP地址查询
/v2/ip
GET
文本翻译
/v2/fanyi
POST
二维码生成
/v2/qrcode
GET
哈希计算
/v2/hash
POST
OG元数据提取
/v2/og
POST
WHOIS查询
/v2/whois
GET
密码生成
/v2/password
GET

1. IP Address Lookup

1. IP地址查询

python
import requests
python
import requests

Lookup specific IP

Lookup specific IP

response = requests.get('https://60s.viki.moe/v2/ip', params={'ip': '8.8.8.8'}) ip_info = response.json()
print(f"IP: {ip_info['ip']}") print(f"Location: {ip_info['location']}") print(f"ISP: {ip_info['isp']}")
response = requests.get('https://60s.viki.moe/v2/ip', params={'ip': '8.8.8.8'}) ip_info = response.json()
print(f"IP: {ip_info['ip']}") print(f"Location: {ip_info['location']}") print(f"ISP: {ip_info['isp']}")

Get your own IP info (no params)

Get your own IP info (no params)

my_ip = requests.get('https://60s.viki.moe/v2/ip').json()
undefined
my_ip = requests.get('https://60s.viki.moe/v2/ip').json()
undefined

2. Text Translation

2. 文本翻译

python
undefined
python
undefined

Translate text

Translate text

data = { 'text': 'Hello World', 'from': 'en', # or 'auto' for auto-detection 'to': 'zh' # target language }
response = requests.post('https://60s.viki.moe/v2/fanyi', json=data) translation = response.json()
print(f"Original: {translation['text']}") print(f"Translated: {translation['result']}") print(f"From: {translation['from']} To: {translation['to']}")

**Supported Languages:**
- `zh` - Chinese
- `en` - English
- `ja` - Japanese
- `ko` - Korean
- `fr` - French
- `de` - German
- `es` - Spanish
- `ru` - Russian
- And more...

```python
data = { 'text': 'Hello World', 'from': 'en', # or 'auto' for auto-detection 'to': 'zh' # target language }
response = requests.post('https://60s.viki.moe/v2/fanyi', json=data) translation = response.json()
print(f"Original: {translation['text']}") print(f"Translated: {translation['result']}") print(f"From: {translation['from']} To: {translation['to']}")

**支持的语言:**
- `zh` - 中文
- `en` - 英文
- `ja` - 日语
- `ko` - 韩语
- `fr` - 法语
- `de` - 德语
- `es` - 西班牙语
- `ru` - 俄语
- 更多...

```python

Get supported languages

Get supported languages

response = requests.post('https://60s.viki.moe/v2/fanyi/langs') languages = response.json()
undefined
response = requests.post('https://60s.viki.moe/v2/fanyi/langs') languages = response.json()
undefined

3. QR Code Generation

3. 二维码生成

python
undefined
python
undefined

Generate QR code

Generate QR code

params = { 'text': 'https://github.com/vikiboss/60s', 'size': 300 # pixels, default 200, min 50, max 1000 }
response = requests.get('https://60s.viki.moe/v2/qrcode', params=params)
params = { 'text': 'https://github.com/vikiboss/60s', 'size': 300 # pixels, default 200, min 50, max 1000 }
response = requests.get('https://60s.viki.moe/v2/qrcode', params=params)

Save the QR code image

Save the QR code image

with open('qrcode.png', 'wb') as f: f.write(response.content)
undefined
with open('qrcode.png', 'wb') as f: f.write(response.content)
undefined

4. Hash Calculation

4. 哈希计算

python
undefined
python
undefined

Calculate hash

Calculate hash

data = { 'text': 'Hello World', 'algorithm': 'md5' # md5, sha1, sha256, sha512 }
response = requests.post('https://60s.viki.moe/v2/hash', json=data) result = response.json()
print(f"Algorithm: {result['algorithm']}") print(f"Hash: {result['hash']}")
undefined
data = { 'text': 'Hello World', 'algorithm': 'md5' # md5, sha1, sha256, sha512 }
response = requests.post('https://60s.viki.moe/v2/hash', json=data) result = response.json()
print(f"Algorithm: {result['algorithm']}") print(f"Hash: {result['hash']}")
undefined

5. OG Metadata Extraction

5. OG元数据提取

python
undefined
python
undefined

Extract Open Graph metadata from URL

Extract Open Graph metadata from URL

response = requests.post('https://60s.viki.moe/v2/og', json=data) metadata = response.json()
print(f"Title: {metadata['title']}") print(f"Description: {metadata['description']}") print(f"Image: {metadata['image']}") print(f"URL: {metadata['url']}")
undefined
response = requests.post('https://60s.viki.moe/v2/og', json=data) metadata = response.json()
print(f"Title: {metadata['title']}") print(f"Description: {metadata['description']}") print(f"Image: {metadata['image']}") print(f"URL: {metadata['url']}")
undefined

6. WHOIS Lookup

6. WHOIS查询

python
undefined
python
undefined

Domain WHOIS information

Domain WHOIS information

params = {'domain': 'github.com'}
response = requests.get('https://60s.viki.moe/v2/whois', params=params) whois_info = response.json()
print(f"Domain: {whois_info['domain']}") print(f"Registrar: {whois_info['registrar']}") print(f"Created: {whois_info['created_date']}") print(f"Expires: {whois_info['expiration_date']}")
undefined
params = {'domain': 'github.com'}
response = requests.get('https://60s.viki.moe/v2/whois', params=params) whois_info = response.json()
print(f"Domain: {whois_info['domain']}") print(f"Registrar: {whois_info['registrar']}") print(f"Created: {whois_info['created_date']}") print(f"Expires: {whois_info['expiration_date']}")
undefined

7. Password Generation

7. 密码生成

python
undefined
python
undefined

Generate secure password

Generate secure password

params = { 'length': 16, # 6-128 'numbers': True, # include numbers 'lowercase': True, # include lowercase 'uppercase': True, # include uppercase 'symbols': True # include special characters }
response = requests.get('https://60s.viki.moe/v2/password', params=params) password_data = response.json()
print(f"Password: {password_data['password']}") print(f"Strength: {password_data['strength']}")
undefined
params = { 'length': 16, # 6-128 'numbers': True, # include numbers 'lowercase': True, # include lowercase 'uppercase': True, # include uppercase 'symbols': True # include special characters }
response = requests.get('https://60s.viki.moe/v2/password', params=params) password_data = response.json()
print(f"Password: {password_data['password']}") print(f"Strength: {password_data['strength']}")
undefined

Example Use Cases

示例使用场景

Multi-language Chatbot

多语言聊天机器人

python
def auto_translate(text, target_lang='zh'):
    data = {
        'text': text,
        'from': 'auto',
        'to': target_lang
    }
    response = requests.post('https://60s.viki.moe/v2/fanyi', json=data)
    return response.json()['result']
python
def auto_translate(text, target_lang='zh'):
    data = {
        'text': text,
        'from': 'auto',
        'to': target_lang
    }
    response = requests.post('https://60s.viki.moe/v2/fanyi', json=data)
    return response.json()['result']

Usage

Usage

user_input = "Hello, how are you?" translated = auto_translate(user_input, 'zh') print(translated) # 你好,你好吗?
undefined
user_input = "Hello, how are you?" translated = auto_translate(user_input, 'zh') print(translated) # 你好,你好吗?
undefined

URL Shortener with QR Code

带二维码的短链接工具

python
def create_qr_for_url(url, size=200):
    params = {'text': url, 'size': size}
    response = requests.get('https://60s.viki.moe/v2/qrcode', params=params)
    return response.content
python
def create_qr_for_url(url, size=200):
    params = {'text': url, 'size': size}
    response = requests.get('https://60s.viki.moe/v2/qrcode', params=params)
    return response.content

Generate and save

Generate and save

qr_image = create_qr_for_url('https://example.com') with open('url_qr.png', 'wb') as f: f.write(qr_image)
undefined
qr_image = create_qr_for_url('https://example.com') with open('url_qr.png', 'wb') as f: f.write(qr_image)
undefined

Security Tools

安全工具集

python
def check_password_hash(password):
    """Generate multiple hashes for password"""
    algorithms = ['md5', 'sha1', 'sha256', 'sha512']
    hashes = {}
    
    for algo in algorithms:
        data = {'text': password, 'algorithm': algo}
        response = requests.post('https://60s.viki.moe/v2/hash', json=data)
        hashes[algo] = response.json()['hash']
    
    return hashes

def generate_secure_password(length=16):
    params = {
        'length': length,
        'numbers': True,
        'lowercase': True,
        'uppercase': True,
        'symbols': True
    }
    response = requests.get('https://60s.viki.moe/v2/password', params=params)
    return response.json()['password']
python
def check_password_hash(password):
    """Generate multiple hashes for password"""
    algorithms = ['md5', 'sha1', 'sha256', 'sha512']
    hashes = {}
    
    for algo in algorithms:
        data = {'text': password, 'algorithm': algo}
        response = requests.post('https://60s.viki.moe/v2/hash', json=data)
        hashes[algo] = response.json()['hash']
    
    return hashes

def generate_secure_password(length=16):
    params = {
        'length': length,
        'numbers': True,
        'lowercase': True,
        'uppercase': True,
        'symbols': True
    }
    response = requests.get('https://60s.viki.moe/v2/password', params=params)
    return response.json()['password']

Website Preview Card

网站预览卡片

python
def get_link_preview(url):
    """Get rich preview data for a URL"""
    data = {'url': url}
    response = requests.post('https://60s.viki.moe/v2/og', json=data)
    og = response.json()
    
    preview = f"""
    📄 {og['title']}
    📝 {og['description']}
    🖼️ {og['image']}
    🔗 {og['url']}
    """
    return preview
python
def get_link_preview(url):
    """Get rich preview data for a URL"""
    data = {'url': url}
    response = requests.post('https://60s.viki.moe/v2/og', json=data)
    og = response.json()
    
    preview = f"""
    📄 {og['title']}
    📝 {og['description']}
    🖼️ {og['image']}
    🔗 {og['url']}
    """
    return preview

Best Practices

最佳实践

  1. Translation: Use 'auto' for source language when unsure
  2. QR Codes: Keep size between 200-500px for most uses
  3. Hashing: Use SHA256 or SHA512 for security applications
  4. Passwords: Always use all character types for strong passwords
  5. Error Handling: Always validate inputs and handle API errors
  1. 翻译:当不确定源语言时,使用'auto'自动检测
  2. 二维码:大多数场景下,尺寸保持在200-500px之间
  3. 哈希计算:安全场景下优先使用SHA256或SHA512算法
  4. 密码生成:始终启用所有字符类型以生成强密码
  5. 错误处理:务必验证输入并处理API错误

Example Interactions

示例交互

User: "把这段话翻译成英文:你好世界"

用户:"把这段话翻译成英文:你好世界"

python
data = {'text': '你好世界', 'from': 'zh', 'to': 'en'}
response = requests.post('https://60s.viki.moe/v2/fanyi', json=data)
print(response.json()['result'])  # Hello World
python
data = {'text': '你好世界', 'from': 'zh', 'to': 'en'}
response = requests.post('https://60s.viki.moe/v2/fanyi', json=data)
print(response.json()['result'])  # Hello World

User: "生成一个强密码"

用户:"生成一个强密码"

python
params = {'length': 20, 'symbols': True, 'uppercase': True, 'lowercase': True, 'numbers': True}
response = requests.get('https://60s.viki.moe/v2/password', params=params)
print(f"🔐 生成的密码:{response.json()['password']}")
python
params = {'length': 20, 'symbols': True, 'uppercase': True, 'lowercase': True, 'numbers': True}
response = requests.get('https://60s.viki.moe/v2/password', params=params)
print(f"🔐 生成的密码:{response.json()['password']}")

User: "查询这个IP地址的位置:1.1.1.1"

用户:"查询这个IP地址的位置:1.1.1.1"

python
response = requests.get('https://60s.viki.moe/v2/ip', params={'ip': '1.1.1.1'})
info = response.json()
print(f"📍 IP: {info['ip']}")
print(f"🌍 位置: {info['location']}")
print(f"🏢 运营商: {info['isp']}")
python
response = requests.get('https://60s.viki.moe/v2/ip', params={'ip': '1.1.1.1'})
info = response.json()
print(f"📍 IP: {info['ip']}")
print(f"🌍 位置: {info['location']}")
print(f"🏢 运营商: {info['isp']}")

Related Resources

相关资源