Back

The Ibay Adventure

2021-05-25 . Written by fishie

Featured Image

Be Me

as all of my stories this started when i wanted to stalk someone. but i didnt know their ibay page. i knew it existed i just didnt know what it was. so after very little research i noticed that ibay has an interesting url


https://ibay.com.mv/index.php?page=profile&id=0


as you can see at the end is an ID. the Id is given to the user when an account is created. the way ids work is it starts with 0 and for every account that's created it adds a +1


now that we got that out of the way lets look at the code. now i do not publish the full code to any of my projects as i dont want some script kiddy to just rip it and go around abusing it so i wont be discussing the full code here. only the basics


for the basis i used Html Agility Pack. its a library im comfortable using

using HtmlAgilityPack;

the concept is pretty simple first i make a loop

      for (int i = 0; i < 100000; i++)

then i have the url point to the var i. and then just scrap way

var Url = $"https://ibay.com.mv/index.php?page=profile&id={i}"; //construct url
        var htmlDoc = web.Load(Url); //get html string
        if (htmlDoc.Text != "Bad User ID") //check to see if user exists
        {
          Username = htmlDoc.DocumentNode.Descendants("span").Where(
            node => node.GetAttributeValue("style", "").Equals("margin: 0px;font-size:1.5em;font-weight:bold;")).FirstOrDefault()?.InnerText; //get the username text
          Username = Regex.Replace(Username, @"\t|\n|\r| ", ""); //clean up text
          Console.ForegroundColor = ConsoleColor.White;
        }

now there is a reason for why it checks for the string "Bad User ID" this is cause the user doesn't exist. so ibay gives a error saying "Bad User ID".

after this is done i move on to saving the data to a csv file

sb.AppendFormat("\n{0},{1}", Url, Username); //convert to csv format
        Console.WriteLine("Url: " + Url + " | User: " + Username); //output to console
        File.AppendAllText("data.csv", sb.ToString()); //write to file
        sb.Clear(); //clear string for next loop

its as simple as that. just leave this bad boy running for a few days and you should have a list of all ibay accounts.



now yes i didnt include any error handling in case of a time out. the reason is i was just running this code in the background and anytime it crashed i just manually changed the start of the loop to continue from the place it left off. i did not find the need to make it fully automated


the src file is on my Github