马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
继上一个帖子的改良版。
跑了几天,得到了0x8888883F073DA92e731cCCFF3A7ec86d4aaBC23A|0x8b5383d29f7540cbc09c5a914308f9e48abc8e7dc79c1e1af791bce115672ef4 类似于这样的结果
我自己用的跑到了10个8. 真靓号,去评论区求KOL打赏也获得了几千USDT了。
现在在研究另一个挣大钱的项目,源码仅供参考。
import csv
import time
from eth_account import Account
import os
# 获取规则数字,其实可以加入字母,a-f之间如aaaa,abcd,aabb
def get_target():
print("================")
target=str(input('请输入一个规则数字:'))
while not(target):
target=str(input('请别输入空号:'))
print('开始计算')
return target
# 创建1个eth钱包和地址
def create_address():
account=Account.create()
account_privateKey=account.privateKey.hex()
account_address=account.address
return [account_address,account_privateKey]
#日志
def logger(rizhi):
time_format='%Y-%m-%d %X'
time_current = time.strftime(time_format)
with open('logger.txt', 'a+') as f:
f.write(f'%s {rizhi}\n' %time_current)
# 比对数据
def target_generation(_target):
logger(f'开始搜寻符合0x{_target}的地址...')
with open('data.csv','w',newline='') as data_csv:
writer = csv.writer(data_csv)
writer.writerow(['地址', '私钥','生成规则'])
_target_length=len(_target)
if _target_length > 1:
max_target_collisions=1
else:
max_target_collisions=0
count=0
while max_target_collisions < _target_length:
data=create_address()
count+=1
common_target=os.path.commonprefix([data[0][2:],_target])
num_target_collisions=len(common_target)
if count % 20000 ==0:
logger(f"{count}个地址已生成,匹配率{max_target_collisions}/{_target_length}")
print(f"{count}个地址已生成,匹配率{max_target_collisions}/{_target_length}")
if num_target_collisions >= max_target_collisions:
if num_target_collisions > max_target_collisions:
pass
max_target_collisions=num_target_collisions
with open('data.csv','a',newline='') as data_csv:
writer=csv.writer(data_csv)
writer.writerow([data[0],data[1],_target])
if num_target_collisions == _target_length:
logger(f"{count}个地址已生成")
break
def main()->None:
logger("开始运行程序...")
start=time.time()
a=get_target()
target_generation(a)
end=time.time()
logger(f"结束程序运行..一共耗费了 {((end-start)/60):.1f} 分。")
main()
|