Skip to content

Commit 6ff81cf

Browse files
投稿: 骚扰电话☎️ — by 俄总统
1 parent 8e38c00 commit 6ff81cf

2 files changed

Lines changed: 124 additions & 2 deletions

File tree

script_library/index.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"format_version": 1,
3-
"data_version": 29,
4-
"updated": "2026-03-27T09:16:55.631Z",
3+
"data_version": 30,
4+
"updated": "2026-03-27T10:08:56Z",
55
"announcement": null,
66
"categories": [
77
{
@@ -751,6 +751,30 @@
751751
"updated": null,
752752
"status": "active",
753753
"lines": 116
754+
},
755+
{
756+
"id": "community_骚扰电话__by_俄总统",
757+
"name": "骚扰电话☎️ — by 俄总统",
758+
"name_en": "骚扰电话☎️ — by 俄总统",
759+
"desc": "[投稿] 骚扰电话☎️ — by 俄总统",
760+
"desc_en": "[投稿] 骚扰电话☎️ — by 俄总统",
761+
"category": "basic",
762+
"file": "scripts/ui/script_mn8qerq9.py",
763+
"thumbnail": null,
764+
"version": 1,
765+
"file_type": "py",
766+
"author": "社区投稿",
767+
"author_en": "社区投稿",
768+
"tags": [
769+
"community",
770+
"basic"
771+
],
772+
"requires": [],
773+
"min_app_version": "1.5.0",
774+
"added": "2026-03-27",
775+
"updated": null,
776+
"status": "active",
777+
"lines": 98
754778
}
755779
]
756780
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import time
2+
import random
3+
4+
class AutoCaller:
5+
def __init__(self, target_number):
6+
self.target = target_number
7+
self.call_count = 0
8+
self.is_running = True
9+
10+
def make_call(self):
11+
"""模拟拨打电话(实际需对接真实电话API)"""
12+
self.call_count += 1
13+
print(f"\n{'='*50}")
14+
print(f"📞 第 {self.call_count} 次拨打: {self.target}")
15+
print(f"⏰ 时间: {time.strftime('%Y-%m-%d %H:%M:%S')}")
16+
17+
# 拨号中
18+
print("📞 拨号中...")
19+
time.sleep(1)
20+
21+
# 振铃中
22+
print("🔔 振铃中...")
23+
time.sleep(2)
24+
25+
# 随机模拟对方行为(实际使用时替换为真实通话状态检测)
26+
# 这里用随机模拟,真实场景需要对接电话API
27+
actions = ['answer', 'hangup', 'busy', 'no_answer']
28+
weights = [0.2, 0.5, 0.2, 0.1] # 20%接听, 50%挂断, 20%忙线, 10%无人接听
29+
result = random.choices(actions, weights=weights)[0]
30+
31+
if result == 'answer':
32+
print("💬 对方接听!通话中...")
33+
duration = random.randint(5, 30)
34+
time.sleep(duration)
35+
print(f"✅ 通话结束 (通话时长: {duration}秒)")
36+
print("🎉 通话成功完成,停止重拨")
37+
self.is_running = False
38+
return 'answered'
39+
40+
elif result == 'hangup':
41+
print("❌ 对方挂断")
42+
return 'hangup'
43+
44+
elif result == 'busy':
45+
print("📵 对方忙线")
46+
return 'busy'
47+
48+
else:
49+
print("⏰ 无人接听")
50+
return 'no_answer'
51+
52+
def start(self, interval=30, max_attempts=None):
53+
"""开始自动重拨"""
54+
print("="*50)
55+
print("🚀 自动重拨已启动")
56+
print(f"📱 目标号码: {self.target}")
57+
print(f"⏱️ 重拨间隔: {interval}秒")
58+
print(f"🔁 最大次数: {'无限' if max_attempts is None else max_attempts}")
59+
print("="*50)
60+
61+
while self.is_running:
62+
if max_attempts and self.call_count >= max_attempts:
63+
print(f"\n⚠️ 已达到最大重拨次数 ({max_attempts}),停止重拨")
64+
break
65+
66+
result = self.make_call()
67+
68+
if result == 'answered':
69+
break
70+
71+
if self.is_running:
72+
print(f"\n⏳ 等待 {interval} 秒后自动重拨...")
73+
for i in range(interval, 0, -1):
74+
print(f" 剩余 {i} 秒", end='\r')
75+
time.sleep(1)
76+
print("\n" + " "*20 + "\n")
77+
78+
if __name__ == "__main__":
79+
print("="*40)
80+
print("📞 自动重拨系统")
81+
print("="*40)
82+
83+
# 直接在这里填写要拨打的手机号
84+
phone = "17751377766" # 👈 改成你要拨打的号码
85+
86+
interval = 10 # 挂断后等待10秒重拨
87+
max_attempts = 5 # 最多重拨5次,None表示无限
88+
89+
print(f"目标号码: {phone}")
90+
print(f"重拨间隔: {interval}秒")
91+
print(f"最大重拨: {max_attempts}次")
92+
print("-"*40)
93+
94+
caller = AutoCaller(phone)
95+
try:
96+
caller.start(interval=interval, max_attempts=max_attempts)
97+
except KeyboardInterrupt:
98+
print("\n\n⚠️ 用户手动停止")

0 commit comments

Comments
 (0)