Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net
- Imports System.Threading
- Imports System.Text.RegularExpressions
- Module Module1
- Sub Main()
- btcupdate()
- scrape()
- Console.ReadLine()
- End Sub
- Dim btcprice As String
- Dim ethereistprice As String
- Dim ltcprice As String
- Sub scrape()
- Console.WriteLine("UID:")
- Dim uid As String = Console.ReadLine()
- Dim wc As New WebClient
- wc.Headers.Add("User-Agent: Mozilla/4.0")
- Dim source As String = wc.DownloadString(String.Format("https://hackforums.net/myawards.php?uid=" & uid.ToString))
- 'awards
- '=================================================================
- Dim emerald As New List(Of String)
- Dim richbitch As New List(Of String)
- Dim benefactor As New List(Of String)
- Dim litecoinage As New List(Of String)
- Dim darkdash As New List(Of String)
- Dim dogecoinage As New List(Of String)
- Dim ethereist As New List(Of String)
- Dim bitcoin As New List(Of String)
- Dim gift As New List(Of String)
- Dim legalizeit As New List(Of String)
- Dim brony As New List(Of String)
- Dim masterdoner As New List(Of String)
- Dim GrandAmethyst As New List(Of String)
- '=================================================================
- 'Emerald
- Dim em As New Regex("<strong>Emerald Donator</strong>")
- For Each Match As Match In em.Matches(source)
- emerald.Add(Match.ToString)
- Next
- 'Rich Bitch
- Dim rb As New Regex("<strong>Rich Bitch</strong>")
- For Each Match As Match In rb.Matches(source)
- richbitch.Add(Match.ToString)
- Next
- 'Benefactor
- Dim bf As New Regex("<strong>Benefactor</strong>")
- For Each Match As Match In bf.Matches(source)
- benefactor.Add(Match.ToString)
- Next
- 'Litecoinage
- Dim lc As New Regex("<strong>Litecoinage</strong>")
- For Each Match As Match In lc.Matches(source)
- litecoinage.Add(Match.ToString)
- Next
- 'DarkDash
- Dim dd As New Regex("<strong>DarkDash</strong>")
- For Each Match As Match In dd.Matches(source)
- darkdash.Add(Match.ToString)
- Next
- 'Dogecoinage
- Dim dc As New Regex("<strong>Dogecoinage</strong>")
- For Each Match As Match In dc.Matches(source)
- dogecoinage.Add(Match.ToString)
- Next
- 'Ethereist
- Dim et As New Regex("<strong>Ethereist</strong>")
- For Each Match As Match In et.Matches(source)
- ethereist.Add(Match.ToString)
- Next
- 'Bitcoin
- Dim btc As New Regex("<strong>Bitcoinage</strong>")
- For Each Match As Match In btc.Matches(source)
- bitcoin.Add(Match.ToString)
- Next
- 'Gift
- Dim G As New Regex("<strong>Gift</strong>")
- For Each Match As Match In G.Matches(source)
- gift.Add(Match.ToString)
- Next
- 'Legalizeit
- Dim li As New Regex("<strong>Legalize It</strong>")
- For Each Match As Match In li.Matches(source)
- legalizeit.Add(Match.ToString)
- Next
- 'Brony
- Dim br As New Regex("<strong>Brony</strong>")
- For Each Match As Match In br.Matches(source)
- brony.Add(Match.ToString)
- Next
- 'Master Doner
- Dim md As New Regex("<strong>Master Donator</strong>")
- For Each Match As Match In md.Matches(source)
- masterdoner.Add(Match.ToString)
- Next
- 'Grand Amethyst
- Dim ga As New Regex("<strong>Grand Amethyst</strong>")
- For Each Match As Match In ga.Matches(source)
- GrandAmethyst.Add(Match.ToString)
- Next
- Console.WriteLine()
- Console.ForegroundColor = ConsoleColor.Magenta
- 'Calculate awards:
- Console.WriteLine("Emerald Donator: $" & emerald.Count * 20)
- Console.WriteLine("Rich Bitch: $" & richbitch.Count * 50)
- Console.WriteLine("Litecoinage: $" & litecoinage.Count * 20)
- Console.WriteLine("Darkdash: $" & darkdash.Count * 20)
- Console.WriteLine("Dogecoinage: $" & dogecoinage.Count * 20)
- Console.WriteLine("Ethereist: $" & ethereist.Count * 20)
- Console.WriteLine("Bitcoinage: $" & bitcoin.Count * btcprice)
- Console.WriteLine("Gift: $" & gift.Count * 25)
- Console.WriteLine("Legalize It: $" & legalizeit.Count * 50)
- Console.WriteLine("Brony: $" & brony.Count * 100)
- Console.WriteLine("Master Doner: $" & masterdoner.Count * 500)
- Console.WriteLine("Grand Amethyst: $" & GrandAmethyst.Count * 1000)
- Console.WriteLine()
- Console.ForegroundColor = ConsoleColor.Cyan
- Console.WriteLine()
- Console.WriteLine("Total: $" & (emerald.Count * 20) + (richbitch.Count * 50) + (litecoinage.Count * 20) + (darkdash.Count * 20) + (dogecoinage.Count * 20) + (ethereist.Count * 20) + (bitcoin.Count * 500) + (gift.Count * 25) + (legalizeit.Count * 50) + (brony.Count * 100) + (masterdoner.Count * 500) + (GrandAmethyst.Count * 1000))
- Console.WriteLine()
- End Sub
- Sub btcupdate()
- Try
- Dim wc As New WebClient
- Dim source As String = wc.DownloadString(String.Format(("http://www.coindesk.com/price/")))
- Dim reg As New Regex("<div class=""bpi-value bpiUSD"">.*?</div>")
- For Each Match As Match In reg.Matches(source)
- btcprice = Match.ToString.Split("$")(1).Split("<")(0)
- Next
- Catch ex As Exception
- End Try
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement