hukun123/test main
PYTHON
Verdict: BENIGN
AI
Legitimate websocket test script
Local reference
Suspicious dependency
Inferred
| 1 |
# test_ws_full.py |
|
| 2 |
import asyncio |
|
| 3 |
import websockets |
WebSocket library or handler API reference |
| 4 |
import os |
|
| 5 |
|
|
| 6 |
# 设置代理环境变量 |
|
| 7 |
os.environ['HTTP_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128' |
Cleartext http:// URL |
| 8 |
os.environ['HTTPS_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128' |
|
| 9 |
|
|
| 10 |
async def test(): |
|
| 11 |
uri = "wss:… |
|
| 12:2 |
… print(f"正在连接到 {uri}...") |
|
| 13 |
try: |
|
| 14 |
async with websockets.connect(uri) as websocket: |
Python websockets connect call |
| 15 |
print("连接成功!") |
|
| 16 |
await websocket.send("ping") |
|
| 17 |
response = await w… |
|
| 18:4 |
… print(f"收到响应: {response}") |
|
| 19 |
except Exception as e: |
|
| 20 |
print(f"连接失败: {e}") |
|
| 21 |
# 打印更详细的错误信息 |
|
| 22 |
import traceback |
|
| 23 |
traceback.print_exc() |
|
| 24 |
|
|
| 25 |
asyncio.run(test()) |
|
Micro-behaviors
| 1 |
# test_ws_full.py |
|
| 2 |
import asyncio |
|
| 3 |
import websockets |
|
| 4 |
import os |
|
| 5 |
|
|
| 6 |
# 设置代理环境变量 |
|
| 7 |
os.environ['HTTP_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128' |
|
| 8 |
os.environ['HTTPS_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128' |
|
| 9 |
|
|
| 10 |
async def test(): |
|
| 11 |
uri = "wss:… |
|
| 1 |
# test_ws_full.py |
|
| 2 |
import asyncio |
|
| 3 |
import websockets |
|
| 4 |
import os |
|
| 5 |
|
|
| 6 |
# 设置代理环境变量 |
|
| 7 |
os.environ['HTTP_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128' |
|
| 8 |
os.environ['HTTPS_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128' |
|
| 9 |
|
|
| 10 |
async def test(): |
|
| 11 |
uri = "wss:… |
|
| 12:2 |
… print(f"正在连接到 {uri}...") |
|
| 13 |
try: |
|
| 14 |
async with websockets.connect(uri) as websocket: |
|
| 15 |
print("连接成功!") |
|
| 16 |
await websocket.send("ping") |
|
| 17 |
response = await w… |
|
| 18:4 |
… print(f"收到响应: {response}") |
|
| 19 |
except Exception as e: |
|
| 20 |
print(f"连接失败: {e}") |
|
| 21 |
# 打印更详细的错误信息 |
|
| 22 |
import traceback |
|
| 23 |
traceback.print_exc() |
|
| 24 |
|
|
| 25 |
asyncio.run(test()) |
|
| 18:4 |
… print(f"收到响应: {response}") |
|
| 19 |
except Exception as e: |
|
| 20 |
print(f"连接失败: {e}") |
|
| 21 |
# 打印更详细的错误信息 |
|
| 22 |
import traceback |
|
| 23 |
traceback.print_exc() |
|
| 24 |
|
|
| 25 |
asyncio.run(test()) |
|
Metadata
-
0
# test_ws_full.py
import asyncio
import websockets
import os
# 设置代理环境变量
os.environ['HTTP_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128'
os.environ['HTTPS_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128'
async def test():
uri = "wss:
-
0
# test_ws_full.py
import asyncio
import websockets
import os
# 设置代理环境变量
os.environ['HTTP_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128'
os.environ['HTTPS_PROXY'] = 'http://httpproxy-headless.kubebrain.svc.pjlab.local:3128'
async def test():
uri = "wss:
×2
Identity
| SHA-256 |
cde01dfb82d9150ffd8d00284343c3eaa6cd39a9a38f0c66dcd4d6fdf2117e8c |
| Filename |
test_ws_full.py |
| Package |
hukun123/test |
| Version |
main |
| PURL |
pkg:huggingface/hukun123/test@main |
Timeline
| First seen |
6 Aug 2026 10:58 UTC |
| First analyzed |
20 Aug 2026 01:33 UTC |
| Last analyzed |
20 Aug 2026 01:33 UTC |
| Last updated |
20 Aug 2026 01:33 UTC |
Labeling
| Label |
unknown |
| Label source |
forager |