utility-tools
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUtility 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
可用工具
- IP Address Lookup - Get location and ISP info for any IP
- Text Translation - Translate between multiple languages
- QR Code Generation - Create QR codes for any text/URL
- Hash Calculation - Calculate MD5, SHA1, SHA256, SHA512
- OG Metadata Extraction - Extract Open Graph metadata from URLs
- WHOIS Lookup - Domain registration information
- Password Generation - Generate secure random passwords
- IP地址查询 - 查询任意IP的地理位置及ISP信息
- 文本翻译 - 支持多语言互译
- 二维码生成 - 为任意文本/URL生成二维码
- 哈希计算 - 计算MD5、SHA1、SHA256、SHA512哈希值
- OG元数据提取 - 从URL中提取Open Graph元数据
- WHOIS查询 - 查询域名注册信息
- 密码生成 - 生成安全随机密码
API Endpoints
API接口
| Tool | Endpoint | Method |
|---|---|---|
| IP Lookup | | GET |
| Translation | | POST |
| QR Code | | GET |
| Hash | | POST |
| OG Metadata | | POST |
| WHOIS | | GET |
| Password | | GET |
| 工具 | 接口地址 | 请求方法 |
|---|---|---|
| IP地址查询 | | GET |
| 文本翻译 | | POST |
| 二维码生成 | | GET |
| 哈希计算 | | POST |
| OG元数据提取 | | POST |
| WHOIS查询 | | GET |
| 密码生成 | | GET |
1. IP Address Lookup
1. IP地址查询
python
import requestspython
import requestsLookup 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()
undefinedmy_ip = requests.get('https://60s.viki.moe/v2/ip').json()
undefined2. Text Translation
2. 文本翻译
python
undefinedpython
undefinedTranslate 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...
```pythondata = {
'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` - 俄语
- 更多...
```pythonGet supported languages
Get supported languages
response = requests.post('https://60s.viki.moe/v2/fanyi/langs')
languages = response.json()
undefinedresponse = requests.post('https://60s.viki.moe/v2/fanyi/langs')
languages = response.json()
undefined3. QR Code Generation
3. 二维码生成
python
undefinedpython
undefinedGenerate 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)
undefinedwith open('qrcode.png', 'wb') as f:
f.write(response.content)
undefined4. Hash Calculation
4. 哈希计算
python
undefinedpython
undefinedCalculate 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']}")
undefineddata = {
'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']}")
undefined5. OG Metadata Extraction
5. OG元数据提取
python
undefinedpython
undefinedExtract Open Graph metadata from URL
Extract Open Graph metadata from URL
data = {'url': 'https://github.com/vikiboss/60s'}
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']}")
undefineddata = {'url': 'https://github.com/vikiboss/60s'}
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']}")
undefined6. WHOIS Lookup
6. WHOIS查询
python
undefinedpython
undefinedDomain 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']}")
undefinedparams = {'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']}")
undefined7. Password Generation
7. 密码生成
python
undefinedpython
undefinedGenerate 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']}")
undefinedparams = {
'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']}")
undefinedExample 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) # 你好,你好吗?
undefineduser_input = "Hello, how are you?"
translated = auto_translate(user_input, 'zh')
print(translated) # 你好,你好吗?
undefinedURL 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.contentpython
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.contentGenerate 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)
undefinedqr_image = create_qr_for_url('https://example.com')
with open('url_qr.png', 'wb') as f:
f.write(qr_image)
undefinedSecurity 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 previewpython
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 previewBest Practices
最佳实践
- Translation: Use 'auto' for source language when unsure
- QR Codes: Keep size between 200-500px for most uses
- Hashing: Use SHA256 or SHA512 for security applications
- Passwords: Always use all character types for strong passwords
- Error Handling: Always validate inputs and handle API errors
- 翻译:当不确定源语言时,使用'auto'自动检测
- 二维码:大多数场景下,尺寸保持在200-500px之间
- 哈希计算:安全场景下优先使用SHA256或SHA512算法
- 密码生成:始终启用所有字符类型以生成强密码
- 错误处理:务必验证输入并处理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 Worldpython
data = {'text': '你好世界', 'from': 'zh', 'to': 'en'}
response = requests.post('https://60s.viki.moe/v2/fanyi', json=data)
print(response.json()['result']) # Hello WorldUser: "生成一个强密码"
用户:"生成一个强密码"
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']}")