![]() |
|
[.NET] How to make a basic name leecher - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] How to make a basic name leecher (/showthread.php?tid=3229121) |
How to make a basic name leecher - Yui Asuna - Feb 3, 2013 Hi ! I just got the idea of making a little tutorial about "how to make a name leecher in VB.Net", so why not ? In this tutorial, I'm gonna cover: - How to download the source code of the page - How to use RegEx to grab all the name - How to use Threading (Obviously) - How to export the names in a textfile Note that this tutorial will be about #. For over tracker, you'll just need to adapt the RegEx code. I: Making the design We're gonna make something really simple: ![]() Make something like this. II: Time to code Create a new sub, call it something like "GetNames", and add a parameter "page", as Integer. We're gonna use a threadpool to make it faster, so we need to tell to the sub which page it have to grab ! First, let's import some DLL: Code System.NetNow, in the "Grab" button code, we're gonna use launch the tasks, using a ThreadPool, so add this code: Code For i = 0 To NumericUpDown1.ValueNow, let's see our GetNames sub. First of all, we need to get the source code of the page. It's done pretty easily by using the "DownloadString" method of System.Net, so we got: ![]() (Note that I'm not declaring a new Webclient "Dim w as new webclient", but just using "New WebClient()", because we won't have the use of it after, and it's faster than using "Using", (lolz)) Now, let's see the source code of the webpage, and more precisely the source behind the name of the torrent: ![]() So we see Code <a href="/torrent/8098367/ATK_Hairy_-_Babybell_bab004_-_4_-_251_pics_in_1_sets" class="detLink" title="Details for ATK Hairy - Babybell bab004 - 4 - 251 pics in 1 sets">ATK Hairy - Babybell bab004 - 4 - 251 pics in 1 sets</a>We are gonna use RegEx and define a pattern according to this. III: RegEx is so BADASS ! If you don't know what is RegEx, nor how it's work, search for some tutorial, because it's not the point of this tutorial. Spoiler (Click to View) We're gonna declare a new RegEx in our GetNames sub: ![]() The ".*" is used by RegEx to specify "Here, it can be everything, it'll still works". For more information, open a new tab, type Google, and enj0y ! Now, we're gonna look into each match of RegEx into the source. Code For Each m As Match In r.Matches(source)IV: Get all that Names, bitch ! Now, we're gonna get all the names in the line that RegEx gave us ! For that, in the For loop, we're gonna use Split to get the fifth value, between the "". (Because the Fifth value is the name) Code Dim res As String = m.Value.Split("""")(5)Code res = res.Remove(0, 12)We're gonna need an Invoke, because we are in another thread: Code Invoke(New MethodInvoker(Sub() nameList.Items.Add(res)))Enj0y ! Our sub looks like this now: ![]() We're done with the grabber !!1!11!!11!1! Spoiler (Click to View) Now, we're gonna ... V: Export them !!!1! It's pretty easy to export them in a text file, and since I'm bored as fuck right now, here's the code: Code Dim savefile As New SaveFileDialogPut this in the Export button code. Hope you liked my (long) tutorial ! Cheer, PsyCh0TyK, French VB.Net h4xx0r. * - taco2 - Feb 3, 2013 How many names do you grab with this? * - Yui Asuna - Feb 3, 2013 30 per pages. Can't you search by yourself ? * - Spadassin150 - Feb 3, 2013 Nice tutorial mon amis let me bookmark this :) * - AX5 - Feb 3, 2013 like the tutorial man great job :) :) * - intecno - Feb 5, 2013 nice but can you send me the download link its very nice very nice can you send me the download link * - Yui Asuna - Feb 5, 2013 (Feb 5, 2013 03:04 AM)intecno Wrote: nice but can you send me the download link its very nice It a tutorial, if you want it, do it by yourself ? I hate people like you, please, leave this forum. * - B - Feb 5, 2013 Great tutorial, will try this later, but seems like a very easy to follow guild. Also, your English is great. * - Psychotiic - Feb 5, 2013 i like your name, and also I think this might be a really nice tut thanks for the share * - illLusion - Feb 5, 2013 Awesome tutorial, thanks a lot. :) Very useful. * - CyberHoax - Feb 5, 2013 Looks Legitmate! Thanks alot, Nice tut btw ;) * - Daring - Feb 5, 2013 This only gets a single page from TPB, but adding multiple page features isn't hard. * - deiski - Feb 5, 2013 You just taught me how to do what I was looking for, not exactly taking usernames though. * - Ryusaki - Feb 6, 2013 Great work OP :) Btw what would you use it for, exactly? (Eg any relevant practical purpose?) * - Yui Asuna - Feb 7, 2013 (Feb 6, 2013 09:52 AM)Ryusaki Wrote: Great work OP :) Hum, you can use it for ... Urgh ... Spread your malware, by taking a list of name and copy your virus with all the names, and then spread it on some sharing platform, like Apex ? Or in a more legitimate way, use it to learn how RegEx works 🤝 Thanks for the feedbacks everyone ! (Feb 5, 2013 10:52 PM)Daring Wrote: This only gets a single page from TPB, but adding multiple page features isn't hard. Nah, it uses a NumericUpDown to grab multiple pages 👍 |