diff --git a/.vs/Crypto_Wallets_Scanner/v16/.suo b/.vs/Crypto_Wallets_Scanner/v16/.suo index 6c02305..8d83e4f 100644 Binary files a/.vs/Crypto_Wallets_Scanner/v16/.suo and b/.vs/Crypto_Wallets_Scanner/v16/.suo differ diff --git a/Crypto_Wallets_Scanner/Main.cs b/Crypto_Wallets_Scanner/Main.cs index 1957a2f..88a58e5 100644 --- a/Crypto_Wallets_Scanner/Main.cs +++ b/Crypto_Wallets_Scanner/Main.cs @@ -60,7 +60,8 @@ private void Worker_DoWork(object sender, DoWorkEventArgs e) "https://snowtrace.io/address/", "https://moonriver.moonscan.io/address/", "https://moonscan.io/address/", - "https://cronoscan.com/address/" + "https://cronoscan.com/address/", + "https://blockchair.com/bitcoin/address/" }; Wallets_Scanner ws = new Wallets_Scanner(); @@ -118,11 +119,16 @@ private void Worker_DoWork(object sender, DoWorkEventArgs e) blockch = "MoonBeam"; result = ws.GetWalletBallance(wallet, blockchains[b], blockch, "availableBalanceDropdown"); } - else + else if(b == 7) { blockch = "Cronos"; result = ws.GetWalletBallance(wallet, blockchains[b], blockch, "availableBalanceDropdown"); } + else + { + blockch = "BTC"; + result = ws.GetWalletBallance(wallet, blockchains[b], blockch, "account-hash__balance__values"); + } // Report progress and result to the UI thread worker.ReportProgress((progress * 100) / totalWallets, result); diff --git a/Crypto_Wallets_Scanner/Wallets_Scanner.cs b/Crypto_Wallets_Scanner/Wallets_Scanner.cs index 754cea7..090c045 100644 --- a/Crypto_Wallets_Scanner/Wallets_Scanner.cs +++ b/Crypto_Wallets_Scanner/Wallets_Scanner.cs @@ -9,6 +9,7 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Net; +using System.Windows; namespace Crypto_Wallets_Scanner { @@ -30,18 +31,38 @@ public string GetWalletBallance(string wallet,string blockchaine,string blockch, HtmlAgilityPack.HtmlWeb web = new HtmlWeb(); HtmlAgilityPack.HtmlDocument doc = web.Load(blockchaine + wallet); System.Threading.Thread.Sleep(2000); - var bnb = doc.GetElementbyId(id); - //string tokens = bnb.InnerText.Substring('\n'); - if (bnb != null) + if (blockchaine.Contains("bitcoin")) { - string balance = bnb.InnerText.TrimEnd('\n') + " Tokens"; - result = blockch + " Network , Wallet : " + wallet + " | Balance : " + balance + "\n_____________________________________________\n"; + var bnb = doc.DocumentNode.SelectSingleNode("//span[contains(@class, '" + id + "')]"); + + if (bnb != null) + { + string balance = bnb.InnerText.Trim(); + result = blockch + " Network, Wallet: " + wallet + " | Balance: " + balance.Replace(" ","").Replace("\n","").Replace("{{Math.abs(change)}}%","") + " \n_____________________________________________\n"; + } + else + { + result = "Element with class '" + id + "' not found.\n"; + } return result; } + else { - return result; + var bnb = doc.GetElementbyId(id); + //string tokens = bnb.InnerText.Substring('\n'); + if (bnb != null) + { + string balance = bnb.InnerText.TrimEnd('\n') + " Tokens"; + result = blockch + " Network , Wallet : " + wallet + " | Balance : " + balance + "\n_____________________________________________\n"; + return result; + } + else + { + return result; + } } + } } } diff --git a/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.exe b/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.exe index 96aaba2..38502ab 100644 Binary files a/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.exe and b/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.exe differ diff --git a/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.pdb b/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.pdb index 25576ba..92a3a0f 100644 Binary files a/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.pdb and b/Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.pdb differ diff --git a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.AssemblyReference.cache b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.AssemblyReference.cache index b5714ef..f5e894a 100644 Binary files a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.AssemblyReference.cache and b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.AssemblyReference.cache differ diff --git a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.CoreCompileInputs.cache b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.CoreCompileInputs.cache index ba7f13a..31bc077 100644 --- a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.CoreCompileInputs.cache +++ b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -669f2b4dc7890ff7cfd810a1024e2cbd89980709 +d4c7c65d09dcc22074bb42364db7b0abf7309222 diff --git a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.FileListAbsolute.txt b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.FileListAbsolute.txt index d3bd8bc..0fb66ff 100644 --- a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.FileListAbsolute.txt +++ b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.FileListAbsolute.txt @@ -27,3 +27,17 @@ C:\Users\sahba\OneDrive\Desktop\Work\Dev\Crypto-Wallets-Scanner\Crypto_Wallets_S C:\Users\sahba\OneDrive\Desktop\Work\Dev\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.Properties.Resources.resources C:\Users\sahba\OneDrive\Desktop\Work\Dev\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.csproj.CoreCompileInputs.cache C:\Users\sahba\OneDrive\Desktop\Work\Dev\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.csproj.CopyComplete +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\bin\Debug\Crypto_Wallets_Scanner.exe.config +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\bin\Debug\Crypto_Wallets_Scanner.exe +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\bin\Debug\Crypto_Wallets_Scanner.pdb +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\bin\Debug\HtmlAgilityPack.dll +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\bin\Debug\HtmlAgilityPack.pdb +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\bin\Debug\HtmlAgilityPack.xml +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.csproj.AssemblyReference.cache +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.Main.resources +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.Properties.Resources.resources +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.csproj.GenerateResource.cache +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.csproj.CoreCompileInputs.cache +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.csproj.CopyComplete +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.exe +C:\Users\PC\Desktop\Wroking_on_it\Crypto-Wallets-Scanner\Crypto_Wallets_Scanner\obj\Debug\Crypto_Wallets_Scanner.pdb diff --git a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.GenerateResource.cache b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.GenerateResource.cache index 6a9741c..7a82252 100644 Binary files a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.GenerateResource.cache and b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.csproj.GenerateResource.cache differ diff --git a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.exe b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.exe index 96aaba2..38502ab 100644 Binary files a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.exe and b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.exe differ diff --git a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.pdb b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.pdb index 25576ba..92a3a0f 100644 Binary files a/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.pdb and b/Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.pdb differ diff --git a/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 4111691..f4a99c2 100644 Binary files a/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 99fc7c5..0634dc7 100644 Binary files a/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Crypto_Wallets_Scanner/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ