diff --git a/browser-automation-ts/configs/sites/windsurf-adapter.ts b/browser-automation-ts/configs/sites/windsurf-adapter.ts index da23900..9e915b9 100644 --- a/browser-automation-ts/configs/sites/windsurf-adapter.ts +++ b/browser-automation-ts/configs/sites/windsurf-adapter.ts @@ -99,9 +99,7 @@ export class WindsurfAdapter extends BaseAdapter { async afterWorkflow(context: any, result: any): Promise { console.log('✅ Windsurf workflow completed'); - // TODO: 保存数据到数据库 - // const db = this.getTool('database'); - // await db.save('accounts', context.data.account); + // 数据库保存已在 yaml 中通过 saveToDatabase handler 完成 } /** diff --git a/browser-automation-ts/src/tools/card/CardGeneratorTool.ts b/browser-automation-ts/src/tools/card/CardGeneratorTool.ts index 0612e1d..2310372 100644 --- a/browser-automation-ts/src/tools/card/CardGeneratorTool.ts +++ b/browser-automation-ts/src/tools/card/CardGeneratorTool.ts @@ -142,13 +142,15 @@ export class CardGeneratorTool extends BaseTool { if (canUseAdvancedStrategies) { const rand = Math.random(); - if (rand < 0.2) { + if (rand < 0.5) { + // 50% 权重生成(严格按照70张成功案例的统计规律) return this.generateByWeights(selectedPrefix, digitsNeeded, length); } - if (rand < 0.8) { + if (rand < 0.9) { + // 40% 变异生成(从成功案例变异1-2位) return this.generateByMutation(selectedPrefix, successfulPatterns || [], generation.mutationDigits || [1, 1], digitsNeeded, length); } - // 其余概率走纯随机策略 + // 10% 纯随机(保持多样性) } if (useLuhn) { @@ -289,15 +291,10 @@ export class CardGeneratorTool extends BaseTool { return generateLuhnNumber(prefix, totalLength); } - // 基于60个成功案例的位置权重(频率分布) + // 基于70个真实成功案例的位置权重(后2位,不含校验位) const positionWeights = [ - [7, 5, 8, 2, 5, 7, 6, 7, 6, 7], // 位置1 - [7, 5, 7, 4, 11, 4, 2, 8, 8, 4], // 位置2 - [5, 4, 4, 9, 6, 7, 7, 6, 5, 7], // 位置3 - [12, 5, 8, 7, 7, 5, 4, 6, 5, 1], // 位置4: 数字0占20% - [9, 6, 7, 3, 5, 6, 3, 9, 7, 5], // 位置5 - [10, 4, 5, 9, 7, 8, 4, 5, 6, 2], // 位置6 - [7, 3, 7, 2, 9, 6, 4, 6, 9, 7], // 位置7 + [12, 7, 10, 7, 8, 5, 5, 9, 6, 1], // 百位: 0占17.1% + [9, 7, 8, 3, 6, 7, 3, 10, 9, 8] // 十位: 7占14.3% ]; if (digitsNeeded > positionWeights.length) { diff --git a/browser-automation-ts/src/tools/card/config.ts b/browser-automation-ts/src/tools/card/config.ts index fc3de37..835bcbf 100644 --- a/browser-automation-ts/src/tools/card/config.ts +++ b/browser-automation-ts/src/tools/card/config.ts @@ -30,6 +30,21 @@ export const CARD_TYPES: Record = { unionpay: { name: '中国银联 (UnionPay)', // 农业银行622836开头的13位BIN(可生成6,500张) + successfulPatterns: [ + // 原始基础数据(16张) + '8127', '4196', '4577', '9496', '4005', '1058', '0809', '6490', '7194', + '1288', '3748', '4235', '8483', '1070', '0063', '0548', + // 今天通过的所有卡号后缀(54张) + '5779', '4030', '8788', '1205', '0744', '8010', '0364', '4288', '2579', + '1755', '3235', '4435', '0627', '5204', '3734', '6732', '0302', '7201', + '7808', '2734', '0148', '0520', '3197', '0049', '1561', '4926', '7000', + '2860', '1592', '2853', '4858', '2832', '3658', '6988', '3159', '8576', + '0064', '3252', '3785', '9976', '0032', '8937', '0241', '0784', '6843', + '2551', '7914', '7930', '1796', '2809', '1254', '7146', '8903', '4460' + ], + generation: { + mutationDigits: [1, 2] // 变异1-2位数字 + }, prefixes: [ { bin: '6228367540023', weight: 1, issuer: '中国农业银行', country: 'MO' }, { bin: '6228367540057', weight: 1, issuer: '中国农业银行', country: 'MO' },