Jump to content
UBot Underground

Bot Beginnings?  

3 members have voted

  1. 1. How do you begin most of your complex bots?

    • Jump right in and start coding.
      0
    • Lots of pre-planning.
    • A little bit of planning and then start coding.


Recommended Posts

I'm starting to build another complex bot, and up until now I have pretty much just started coding from the beginning and sort of let the bot take form as I went along. This time, however I have decided to do a lot of pre-planning and hopefully save some time along the way.

 

I was just curious as to how most of you begin your more complex bots.

Link to post
Share on other sites

I tend to make definitions starting off with the really basic ones (change proxies/useragent/clear cookies), followed by definitions that are specific to a task. 

This way I can test each definition and make sure they work before putting it all together. If I need to make changes I can find the specific definition and manage that way. 

Link to post
Share on other sites

Here is a TIP.

 

Start by writing your new bot in a TAB, pretty much like in pseudocode (write names of functions and commands that you didn't write yet, but descriptive to what they would have to do)

 

Example:

 

comment("MAIN Program Logic LOOP")
loop(1) {
    comment("Initializing LOOP")
    loop(1) {
        comment("Clear ALL Variables")
        clearVariables()
        comment("Clear ALL Lists")
        clearLists()
        comment("Clear ALL Tables")
        clearTables()
        comment("Clear Environment")
        clearALLCookies()
    }
    divider
    comment("Navigate & Login LOOP")
    loop(1) {
        comment("Fake Referrer & Stuff")
        fakeRefAndSetProxy()
        comment("Fake SERP Navigation")
        fakeSERPNav()
        comment("Login to Website")
        loginFaceBook()
    }
}
stop script

Now, you have an idea of what are the logical steps your bot needs to take and you can start taking EACH of the not-yet-written commands and start coding them.

 

Another tip is to always keep the pieces of code you can re-use for other bots and reuse the code, of course.

 

To be able to do so, try to code your DEFINEs (custom commands and functions) as generic as possible.

 

When you need to scrape something or input text into fields, try to be as less specific as possible.  Instead of using an EXACT selector for that particular page, look carefully at the page code, see if aren't there some classes or IDs that re prone to be used accross multiple websites or in the event the particular website changes their underlying page.

 

Normally, an email input field would have some coding, for instance, that would have the word "email" in it somewhere... could be within its element id (#emailinput or #email1 etc...) or class, etc... So instead of using the selector as "email" rather use it with wildcards "*email*" so that would fit ANY future changes of denominations and/or changes from class to id, etc... in which case, of course, choose outerhtml instead of class or id or name as the selector parameter and replace everything with * and keep only the beginning <input*email*> for instance, out of the whole outerhtml.

 

This type of coding allowed me, for instance, to write a fake SERP traffic command that is able to input search strings in all Google, Bing and Yahoo searches using the SAME command... :)

 

The more generic and structured your code is, the easier is to reuse it and become more productive.

 

Good luck!

  • Like 3
Link to post
Share on other sites
I tend to make definitions starting off with the really basic ones (change proxies/useragent/clear cookies), followed by definitions that are specific to a task. 

 

This way I can test each definition and make sure they work before putting it all together. If I need to make changes I can find the specific definition and manage that way. 

 This is sort of how I have done it before. I work on specific pieces of the bot in different tabs and then put them all together at the end.

 

Most of my scripts that I tend to use over and over I save in the private bot bank so they are really easy to recall when I need them.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...