立即注册  找回密码
 立即注册
CeraNetworksBGVM服务器主机交流会员请立即修改密码Sharktech防护
查看: 52|回复: 4

无聊写了一个solana靓号地址生成器

[复制链接]

无聊写了一个solana靓号地址生成器

[复制链接]

338

主题

709

回帖

3354

积分

论坛元老

积分
3354
afkool

338

主题

709

回帖

3354

积分

论坛元老

积分
3354
7 天前 | 显示全部楼层 |阅读模式
拿node写的,一秒钟一两千次吧,多线程不会,如果开四五个线程更快

[ol]
  • import { Keypair } from "@solana/web3.js";
  • import fs from "fs";
  • import bs58 from 'bs58';
  • import { Buffer } from 'buffer';
  • //判断前缀4个一样字母的
  • function checkFirstFiveChars(str: string) {
  •     const firstFive = str.slice(0, 4);//前四位一样的,5位的跑了一千万次没有结果
  •     return firstFive.split('').every(char => char === firstFive[0]);
  • }
  • //判断固定单词的前缀
  • const wordList = ["fuck", "wtf", "trump", 'huawei', 'xiaomi'];
  • function isPrefix(str: string, wordList: any) {
  •   
  •     return wordList.some((word: any) => str.startsWith(word));
  • }
  • // 创建钱包
  • let i = 0;
  • while (true) {
  •     const wallet = Keypair.generate();
  •     i++;
  •     // 获取公钥和私钥
  •     const publicKey = wallet.publicKey.toBase58();
  •     const secretKey = wallet.secretKey; // 一个 Uint8Array
  •     // 打印
  •     console.log(`第${i}次`);
  •     // 保存 Uint8Array 私钥到wallet.json里
  •     if (checkFirstFiveChars(publicKey) || isPrefix(publicKey, wordList)) {
  •         fs.appendFileSync("wallet.json", `${publicKey}\n${bs58.encode(secretKey)}\n`);
  •     }
  • }[/ol]复制代码
  • 回复

    使用道具 举报

    1

    主题

    28

    回帖

    93

    积分

    注册会员

    积分
    93
    kof21411

    1

    主题

    28

    回帖

    93

    积分

    注册会员

    积分
    93
    7 天前 | 显示全部楼层
    你是有多无聊才写出这东西
    回复

    使用道具 举报

    338

    主题

    709

    回帖

    3354

    积分

    论坛元老

    积分
    3354
    afkool 楼主

    338

    主题

    709

    回帖

    3354

    积分

    论坛元老

    积分
    3354
    7 天前 | 显示全部楼层

    kof21411 发表于 2025-2-16 15:56

    你是有多无聊才写出这东西

    去年孙割的trx靓号论坛都有人卖钱的

    回复

    使用道具 举报

    3

    主题

    268

    回帖

    681

    积分

    高级会员

    积分
    681
    ===

    3

    主题

    268

    回帖

    681

    积分

    高级会员

    积分
    681
    7 天前 | 显示全部楼层
    不明觉厉。
    回复

    使用道具 举报

    0

    主题

    34

    回帖

    122

    积分

    注册会员

    积分
    122
    Origami

    0

    主题

    34

    回帖

    122

    积分

    注册会员

    积分
    122
    6 天前 | 显示全部楼层
    现在都是拿显卡跑,每秒几十亿次,4090每秒几百亿次
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|小黑屋|HS2V主机综合交流论坛

    GMT+8, 2025-2-23 14:01 , Processed in 0.017081 second(s), 2 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表