-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
74 lines (60 loc) · 2.32 KB
/
Program.cs
File metadata and controls
74 lines (60 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using TonSdk.Contracts.Wallet;
using TonSdk.Core;
using TonSdk.Core.Crypto;
Console.WriteLine("TonWalletGenerator v1.0.1");
Console.WriteLine("Write the word(s) you need to find separated by commas. Example: major, blum, ton. You will find your wallets in documents folder.");
string wordsToFindInput = Console.ReadLine();
string[] wordsToFind = wordsToFindInput.Split(',').Select(sValue => sValue.Trim()).ToArray();
string wordsString = string.Empty;
foreach (var word in wordsToFind)
{
wordsString+= word+" ";
}
Console.WriteLine($"Searching for {wordsString}");
string docPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
if(!File.Exists(Path.Combine(docPath, "wallets.txt")))
{
File.WriteAllText(Path.Combine(docPath, "wallets.txt"), "wallets---");
}
if(!File.Exists(Path.Combine(docPath, "wallets2.txt")))
{
File.WriteAllText(Path.Combine(docPath, "wallets2.txt"), "wallets with words not in the end---");
}
new Thread(() => Generate())
.Start();
new Thread(() => Generate())
.Start();
new Thread(() => Generate())
.Start();
new Thread(() => Generate())
.Start();
Console.ReadKey();
async Task Generate()
{
while(true){
Mnemonic mnemonic = new Mnemonic();
WalletV4Options optionsV4 = new WalletV4Options()
{
PublicKey = mnemonic.Keys.PublicKey
};
WalletV4 walletV4R2 = new WalletV4(optionsV4, 2);
var uqAdress = walletV4R2.Address.ToString(AddressType.Base64,new AddressStringifyOptions(false, false, false));
Console.WriteLine($"generated adress: {uqAdress}");
foreach (var wordToFind in wordsToFind)
{
var str = uqAdress.Substring(uqAdress.Length - wordToFind.Length);
string seedPhrase = string.Join(" ",mnemonic.Words);
string[] lines = { $"adress: {uqAdress}", $"seed phrase: {seedPhrase}\n" };
if(str.ToLower().Contains(wordToFind.ToLower()))
{
Console.WriteLine($"FOUND {wordToFind}");
File.AppendAllLines(Path.Combine(docPath, "wallets.txt"), lines);
}
if(uqAdress.ToLower().Contains(wordToFind.ToLower()))
{
Console.WriteLine($"FOUND {wordToFind}");
File.AppendAllLines(Path.Combine(docPath, "wallets2.txt"), lines);
}
}
}
}