Skip to content

Commit

Permalink
Add BTC network
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdeLhalimSB committed Aug 28, 2023
1 parent 28d3fce commit 6df4511
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 9 deletions.
Binary file modified .vs/Crypto_Wallets_Scanner/v16/.suo
Binary file not shown.
10 changes: 8 additions & 2 deletions Crypto_Wallets_Scanner/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
33 changes: 27 additions & 6 deletions Crypto_Wallets_Scanner/Wallets_Scanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net;
using System.Windows;

namespace Crypto_Wallets_Scanner
{
Expand All @@ -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;
}
}

}
}
}
Binary file modified Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.exe
Binary file not shown.
Binary file modified Crypto_Wallets_Scanner/bin/Debug/Crypto_Wallets_Scanner.pdb
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
669f2b4dc7890ff7cfd810a1024e2cbd89980709
d4c7c65d09dcc22074bb42364db7b0abf7309222
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file not shown.
Binary file modified Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.exe
Binary file not shown.
Binary file modified Crypto_Wallets_Scanner/obj/Debug/Crypto_Wallets_Scanner.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 6df4511

Please sign in to comment.