mirror of
https://git.axenov.dev/mirrors/cursor-free-vip.git
synced 2026-01-03 09:19:27 +03:00
Update version to 1.7.16, add Bulgarian language support, enhance GitHub + Cursor AI registration automation, and improve user prompts. Update CHANGELOG with new features and fixes.
This commit is contained in:
375
new_tempemail.py
375
new_tempemail.py
@@ -131,58 +131,45 @@ class NewTempEmail:
|
||||
return False
|
||||
|
||||
def create_email(self):
|
||||
"""创建临时邮箱"""
|
||||
"""create temporary email"""
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.visiting_site')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 正在访问 smailpro.com...{Style.RESET_ALL}")
|
||||
|
||||
# 加载被屏蔽域名列表
|
||||
# load blocked domains list
|
||||
self.blocked_domains = self.get_blocked_domains()
|
||||
|
||||
# Instead of using the default email generation, let's create a custom one
|
||||
# First try creating a custom email with legitimate-looking patterns
|
||||
try:
|
||||
legitimate_email = self.create_legitimate_looking_email()
|
||||
if legitimate_email:
|
||||
return legitimate_email
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.custom_email_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 创建自定义邮箱失败: {str(e)}, 尝试使用默认方式{Style.RESET_ALL}")
|
||||
|
||||
# Fallback to standard email generation if custom fails
|
||||
# 访问网站
|
||||
# visit website
|
||||
self.page.get("https://smailpro.com/")
|
||||
time.sleep(2)
|
||||
|
||||
# 点击创建邮箱按钮
|
||||
# click create email button
|
||||
create_button = self.page.ele('xpath://button[@title="Create temporary email"]')
|
||||
if create_button:
|
||||
create_button.click()
|
||||
time.sleep(1)
|
||||
|
||||
# 点击弹窗中的 Create 按钮
|
||||
# click Create button in popup
|
||||
modal_create_button = self.page.ele('xpath://button[contains(text(), "Create")]')
|
||||
if modal_create_button:
|
||||
modal_create_button.click()
|
||||
time.sleep(2)
|
||||
|
||||
# 获取邮箱地址 - 修改选择器
|
||||
# get email address - modify selector
|
||||
email_div = self.page.ele('xpath://div[@class="text-base sm:text-lg md:text-xl text-gray-700"]')
|
||||
if email_div:
|
||||
email = email_div.text.strip()
|
||||
if '@' in email: # 验证是否是有效的邮箱地址
|
||||
# 检查域名是否被屏蔽
|
||||
if '@' in email: # check if it's a valid email address
|
||||
# check if domain is blocked
|
||||
domain = email.split('@')[1]
|
||||
if self.blocked_domains and domain in self.blocked_domains:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.domain_blocked')}: {domain}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 域名已被屏蔽: {domain},尝试重新创建邮箱{Style.RESET_ALL}")
|
||||
# 重新创建邮箱
|
||||
# create email again
|
||||
return self.create_email()
|
||||
|
||||
if self.translator:
|
||||
@@ -203,350 +190,24 @@ class NewTempEmail:
|
||||
print(f"{Fore.RED}❌ 创建邮箱出错: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def create_legitimate_looking_email(self):
|
||||
"""Create a legitimate-looking email address using a service like mailforspam.com or mail.tm"""
|
||||
try:
|
||||
# List of services to try in order of preference
|
||||
services = [
|
||||
self.try_tempmail, # Try temp-mail.org (highly rated)
|
||||
self.try_10minutemail, # Try 10minutemail.com (looks legitimate)
|
||||
self.try_emailondeck, # Try EmailOnDeck (professional looking)
|
||||
self.try_yopmail, # Try YOPmail (allows custom domains)
|
||||
self.try_throwawaymail, # Try ThrowAwayMail (48 hour lifespan)
|
||||
self.try_mailforspam, # Try mailforspam.com (current implementation)
|
||||
self.try_mailtm, # Try mail.tm (current implementation)
|
||||
self.try_tempmail_plus # Try tempmail.plus (current implementation)
|
||||
]
|
||||
|
||||
# Try each service until one works
|
||||
for service in services:
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.trying_provider', provider=service.__name__.replace('try_', ''))}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 尝试使用 {service.__name__.replace('try_', '')} 创建邮箱...{Style.RESET_ALL}")
|
||||
|
||||
email = service()
|
||||
if email and '@' in email:
|
||||
# Check domain against blocked list
|
||||
domain = email.split('@')[1]
|
||||
if self.blocked_domains and domain in self.blocked_domains:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.domain_blocked')}: {domain}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 域名已被屏蔽: {domain},尝试另一个服务{Style.RESET_ALL}")
|
||||
continue
|
||||
|
||||
# Log success
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.create_success')}: {email}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 创建邮箱成功: {email}{Style.RESET_ALL}")
|
||||
return email
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {service.__name__} failed: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ {service.__name__} 失败: {str(e)}{Style.RESET_ALL}")
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.legitimate_email_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 创建可信邮箱失败: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def generate_realistic_username(self):
|
||||
"""Generate a realistic-looking email username that appears legitimate"""
|
||||
# First names for more realistic looking usernames
|
||||
first_names = [
|
||||
"john", "sara", "michael", "emma", "david", "jennifer", "robert", "lisa", "william", "emily",
|
||||
"james", "olivia", "benjamin", "sophia", "daniel", "ava", "matthew", "mia", "andrew", "charlotte",
|
||||
"joseph", "amelia", "christopher", "harper", "ryan", "evelyn", "nicholas", "abigail", "tyler", "ella",
|
||||
"alex", "grace", "nathan", "zoe", "ethan", "hannah", "jason", "lily", "kevin", "natalie"
|
||||
]
|
||||
|
||||
# Last names for more realistic looking usernames
|
||||
last_names = [
|
||||
"smith", "johnson", "williams", "brown", "jones", "miller", "davis", "garcia", "wilson", "martinez",
|
||||
"anderson", "taylor", "thomas", "moore", "jackson", "martin", "lee", "perez", "thompson", "white",
|
||||
"harris", "sanchez", "clark", "ramirez", "lewis", "robinson", "walker", "young", "allen", "king",
|
||||
"wright", "scott", "green", "baker", "adams", "nelson", "hill", "rivera", "campbell", "mitchell"
|
||||
]
|
||||
|
||||
# Words that make names look professional
|
||||
professional_words = [
|
||||
"work", "pro", "business", "office", "design", "dev", "tech", "media", "creative", "digital",
|
||||
"studio", "systems", "solutions", "consulting", "info", "contact", "support", "service", "help"
|
||||
]
|
||||
|
||||
# Generate random components
|
||||
first = random.choice(first_names)
|
||||
last = random.choice(last_names)
|
||||
year_full = random.randint(1970, 2001)
|
||||
year_short = year_full % 100
|
||||
random_num = random.randint(1, 999)
|
||||
|
||||
# Create patterns that look like legitimate personal email usernames
|
||||
patterns = [
|
||||
f"{first}.{last}", # john.smith
|
||||
f"{first}{last}", # johnsmith
|
||||
f"{first}.{last}{year_short:02d}", # john.smith89
|
||||
f"{first}{last}{random_num}", # johnsmith123
|
||||
f"{first}{year_short:02d}", # john89
|
||||
f"{first[0]}{last}", # jsmith
|
||||
f"{first}.{last}.{year_short:02d}", # john.smith.89
|
||||
f"{first}_{last}", # john_smith
|
||||
f"{first}{year_full}", # john1989
|
||||
f"{last}.{first}", # smith.john
|
||||
f"{first}.{last}.{random.choice(professional_words)}", # john.smith.work
|
||||
f"{first}{last}{year_short:02d}", # johnsmith89
|
||||
f"{first[0]}{last}{year_short:02d}", # jsmith89
|
||||
f"{first}-{last}" # john-smith
|
||||
]
|
||||
|
||||
return random.choice(patterns)
|
||||
|
||||
def try_tempmail(self):
|
||||
"""Try to create an email using temp-mail.org (one of the top rated services)"""
|
||||
try:
|
||||
self.page.get("https://temp-mail.org/")
|
||||
time.sleep(3)
|
||||
|
||||
# Check if there's a "Change" button which means we already have an email
|
||||
change_button = self.page.ele('xpath://button[contains(text(), "Change")]') or self.page.ele('xpath://a[contains(text(), "Change")]')
|
||||
if change_button:
|
||||
# Already have an email, get it from the input field
|
||||
email_field = self.page.ele('xpath://input[@id="mail"]')
|
||||
if email_field:
|
||||
email = email_field.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
# If we didn't get an email yet, look for it on the page
|
||||
email_field = self.page.ele('xpath://input[@id="mail"]')
|
||||
if email_field:
|
||||
email = email_field.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.tempmail_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ temp-mail.org 创建失败: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def try_10minutemail(self):
|
||||
"""Try to create an email using 10minutemail.com"""
|
||||
try:
|
||||
self.page.get("https://10minutemail.com/")
|
||||
time.sleep(3)
|
||||
|
||||
# Look for the email address
|
||||
email_field = self.page.ele('xpath://input[@id="mailAddress"]')
|
||||
if not email_field:
|
||||
email_field = self.page.ele('xpath://div[contains(@class, "mail-address-container")]/input')
|
||||
|
||||
if email_field:
|
||||
email = email_field.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
# Try alternative selector
|
||||
email_div = self.page.ele('xpath://span[@class="animace"]')
|
||||
if email_div:
|
||||
email = email_div.text
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.10minutemail_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 10minutemail.com 创建失败: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def try_emailondeck(self):
|
||||
"""Try to create an email using EmailOnDeck"""
|
||||
try:
|
||||
self.page.get("https://www.emailondeck.com/")
|
||||
time.sleep(3)
|
||||
|
||||
# Look for "Get Email" button
|
||||
get_email_button = self.page.ele('xpath://button[contains(text(), "Get Email")]')
|
||||
if get_email_button:
|
||||
get_email_button.click()
|
||||
time.sleep(3)
|
||||
|
||||
# Look for the email field
|
||||
email_field = self.page.ele('xpath://input[@id="email"]')
|
||||
if email_field:
|
||||
email = email_field.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
# Alternative selector
|
||||
email_div = self.page.ele('xpath://span[@id="email"]')
|
||||
if email_div:
|
||||
email = email_div.text
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.emailondeck_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ EmailOnDeck 创建失败: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def try_yopmail(self):
|
||||
"""Try to create an email using YOPmail"""
|
||||
try:
|
||||
# Generate a better looking username first
|
||||
username = self.generate_realistic_username()
|
||||
|
||||
# Navigate to YOPmail
|
||||
self.page.get("https://yopmail.com/")
|
||||
time.sleep(2)
|
||||
|
||||
# Try to find the email input field
|
||||
email_field = self.page.ele('xpath://input[@id="login"]')
|
||||
if email_field:
|
||||
email_field.click()
|
||||
time.sleep(0.5)
|
||||
self.page.type(username)
|
||||
time.sleep(1)
|
||||
|
||||
# Click the check button
|
||||
check_button = self.page.ele('xpath://button[@title="Check Inbox" or @class="sbut" or contains(@onclick, "ver")]')
|
||||
if check_button:
|
||||
check_button.click()
|
||||
time.sleep(2)
|
||||
return f"{username}@yopmail.com"
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.yopmail_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ YOPmail 创建失败: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def try_throwawaymail(self):
|
||||
"""Try to create an email using ThrowAwayMail"""
|
||||
try:
|
||||
self.page.get("https://throwawaymail.com/")
|
||||
time.sleep(3)
|
||||
|
||||
# Look for the email element
|
||||
email_element = self.page.ele('xpath://div[contains(@class, "email")]') or self.page.ele('xpath://input[@id="email"]')
|
||||
if email_element:
|
||||
email = email_element.text or email_element.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
|
||||
return None
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.throwawaymail_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ ThrowAwayMail 创建失败: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def try_mailforspam(self):
|
||||
"""Create an email using mailforspam.com"""
|
||||
try:
|
||||
self.page.get("https://mailforspam.com/")
|
||||
time.sleep(3)
|
||||
|
||||
# Try to find the email address element
|
||||
email_elements = self.page.eles('xpath://input[contains(@class, "emailbox-addr")]')
|
||||
if email_elements and len(email_elements) > 0:
|
||||
email = email_elements[0].attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
return None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def try_mailtm(self):
|
||||
"""Create an email using mail.tm"""
|
||||
try:
|
||||
self.page.get("https://mail.tm/en/")
|
||||
time.sleep(3)
|
||||
|
||||
# Generate a better looking username
|
||||
username = self.generate_realistic_username()
|
||||
|
||||
# Click on the username field and enter the username
|
||||
username_field = self.page.ele('xpath://input[@id="address"]')
|
||||
if username_field:
|
||||
username_field.click()
|
||||
time.sleep(0.5)
|
||||
self.page.type(username)
|
||||
time.sleep(1)
|
||||
|
||||
# Click the Create button
|
||||
create_button = self.page.ele('xpath://button[contains(text(), "Create account")]')
|
||||
if create_button:
|
||||
create_button.click()
|
||||
time.sleep(3)
|
||||
|
||||
# Try to find the email address element
|
||||
email_element = self.page.ele('xpath://input[@id="address"]')
|
||||
if email_element:
|
||||
email = email_element.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
return None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def try_tempmail_plus(self):
|
||||
"""Create an email using tempmail.plus"""
|
||||
try:
|
||||
self.page.get("https://tempmail.plus/en/")
|
||||
time.sleep(3)
|
||||
|
||||
# Find and click the random username button
|
||||
random_button = self.page.ele('xpath://button[@title="Generate random email address"]')
|
||||
if random_button:
|
||||
random_button.click()
|
||||
time.sleep(2)
|
||||
|
||||
# Get the email address
|
||||
email_element = self.page.ele('xpath://input[@id="email"]')
|
||||
if email_element:
|
||||
email = email_element.attr('value')
|
||||
if email and '@' in email:
|
||||
return email
|
||||
return None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def close(self):
|
||||
"""关闭浏览器"""
|
||||
"""close browser"""
|
||||
if self.page:
|
||||
self.page.quit()
|
||||
|
||||
def refresh_inbox(self):
|
||||
"""刷新邮箱"""
|
||||
"""refresh inbox"""
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}🔄 {self.translator.get('email.refreshing')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}🔄 正在刷新邮箱...{Style.RESET_ALL}")
|
||||
|
||||
# 点击刷新按钮
|
||||
# click refresh button
|
||||
refresh_button = self.page.ele('xpath://button[@id="refresh"]')
|
||||
if refresh_button:
|
||||
refresh_button.click()
|
||||
time.sleep(2) # 等待刷新完成
|
||||
time.sleep(2) # wait for refresh to complete
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.refresh_success')}{Style.RESET_ALL}")
|
||||
else:
|
||||
@@ -569,16 +230,16 @@ class NewTempEmail:
|
||||
def check_for_cursor_email(self):
|
||||
"""检查是否有 Cursor 的验证邮件"""
|
||||
try:
|
||||
# 查找验证邮件 - 使用更精确的选择器
|
||||
# find verification email - use more accurate selector
|
||||
email_div = self.page.ele('xpath://div[contains(@class, "p-2") and contains(@class, "cursor-pointer") and contains(@class, "bg-white") and contains(@class, "shadow") and .//b[text()="no-reply@cursor.sh"] and .//span[text()="Verify your email address"]]')
|
||||
if email_div:
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.verification_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 找到验证邮件{Style.RESET_ALL}")
|
||||
# 使用 JavaScript 点击元素
|
||||
# use JavaScript to click element
|
||||
self.page.run_js('arguments[0].click()', email_div)
|
||||
time.sleep(2) # 等待邮件内容加载
|
||||
time.sleep(2) # wait for email content to load
|
||||
return True
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.verification_not_found')}{Style.RESET_ALL}")
|
||||
@@ -596,7 +257,7 @@ class NewTempEmail:
|
||||
def get_verification_code(self):
|
||||
"""获取验证码"""
|
||||
try:
|
||||
# 查找验证码元素
|
||||
# find verification code element
|
||||
code_element = self.page.ele('xpath://td//div[contains(@style, "font-size:28px") and contains(@style, "letter-spacing:2px")]')
|
||||
if code_element:
|
||||
code = code_element.text.strip()
|
||||
@@ -630,7 +291,7 @@ def main(translator=None):
|
||||
else:
|
||||
print(f"\n{Fore.CYAN}📧 临时邮箱地址: {email}{Style.RESET_ALL}")
|
||||
|
||||
# 测试刷新功能
|
||||
# test refresh function
|
||||
while True:
|
||||
if translator:
|
||||
choice = input(f"\n{translator.get('email.refresh_prompt')}: ").lower()
|
||||
|
||||
Reference in New Issue
Block a user