Jump to content



Photo

Free Code: Random User Agents And Random Referrers

free code defines example sample user agent referrer code define local

  • Please log in to reply
6 replies to this topic

#1 AtmoPress

AtmoPress

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 38 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 29 September 2018 - 03:59 PM

Hey there,
 
I posted this on the Skype group last month, but figured this would be a better place to give it away. Nothing ground breaking, but below are two defines that I made for returning random user agents and referrers for an HTTP bot project I was working on.
 
I figured I could give this back to the group in hopes that it might save someone some work. These are popular user agent strings at the moment and the common referrers list you see below I pulled from actual analytics data. Anyways, free for you to use. Hope it helps someone out :-)
 
define $randomUserAgent {
    add list to list(%commonUserAgents,$list from text("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36",$new line),"Delete","Local")
    return($random list item(%commonUserAgents))
}


define $randomReferrer {
    add list to list(%commonReferrers,$list from text("https://www.google.com/
https://www.yahoo.com/
https://www.bing.com/
https://www.twitter.com/
https://www.facebook.com/
https://www.google.ca/
https://www.google.co.uk/
https://www.yahoo.ca/
https://www.facebook.ca/
https://www.reddit.com/
https://m.facebook.com/
https://accounts.google.com/
https://mail.google.com/
https://outlook.live.com/
https://lm.facebook.com/
https://l.facebook.com/
https://www.instagram.com/
https://l.instagram.com/
https://t.co/
https://bit.ly/
https://www.pinterest.com/",$new line),"Delete","Local")
    return($random list item(%commonReferrers))
}

 



#2 SmileyBot

SmileyBot

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 159 posts
  • LocationAustralia
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 30 September 2018 - 03:31 AM

Thanks for sharing dude!



#3 AtmoPress

AtmoPress

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 38 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 30 September 2018 - 06:07 AM

You're welcome Smiley :-)



#4 Jerry Tunin

Jerry Tunin

    Newbie

  • Members
  • Pip
  • 3 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Community Edition

Posted 04 January 2019 - 03:03 PM

Excellent, thank you for the share!



#5 max33069

max33069

    Member

  • Members
  • PipPip
  • 12 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Professional Edition

Posted 09 April 2019 - 10:14 AM

What exactly can this be used for? im a noob and twitter keeps figuring out Im using a bot. I was told to use random user agents. is this what they are talking about and can someone explain if this can help me?



#6 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 3202 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 10 April 2019 - 12:56 PM

What exactly can this be used for? im a noob and twitter keeps figuring out Im using a bot. I was told to use random user agents. is this what they are talking about and can someone explain if this can help me?

 

A user agent tells the website which web browser is browsing the site (Think like Chrome, Firefox, etc but also with version info). So if you change the user agent then that is one piece of information that is different. It's part of a larger strategy of trying to appear as if you are multiple people and not just the same with a bunch of accounts.



#7 AtmoPress

AtmoPress

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 38 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 11 April 2019 - 07:28 PM

Excellent, thank you for the share!

Hey Jerry,

 

You're very welcome!

 

What exactly can this be used for? im a noob and twitter keeps figuring out Im using a bot. I was told to use random user agents. is this what they are talking about and can someone explain if this can help me?

 

 

A user agent tells the website which web browser is browsing the site (Think like Chrome, Firefox, etc but also with version info). So if you change the user agent then that is one piece of information that is different. It's part of a larger strategy of trying to appear as if you are multiple people and not just the same with a bunch of accounts.

Thanks for responding HelloInsomnia :-)

 

I also wanted to add to what Hello said, which is absolutely correct. I wouldn't use random user agents on the same user account. This might seem obvious to veterans, but you say you're a noob, so I wanted to highlight this.

 

Most regular internet users use the exact same web browser, with the same browser addons, etc. So, when you log into an account, it should use the same user agent that you used with it last time. If someone told you to use random user agents on the same account, then they were sorely mistaken.

 

Twitter is a very mature platform, so I wouldn't be surprised if they're using browser fingerprinting and a bunch of other bot detection methods. For instance, the default screen size of a bot is kind of odd, that alone might be a fairly reliable fingerprint for them to figure out. So, I would use different browser window sizes, or at the very least use a maximized browser window size on your bots.

 

Also, learn from my script. Browser agents go out of date kind of quickly, so I would suggest searching up a fresh list (just google "current browser agents" and find an up-to-date list). I would then add new ones and maybe remove others to keep your list more current.

 

Like I said though, one of the most important things you can do is to keep some consistency on your user accounts. If you're using a Chrome 72 User-Agent, then make sure that's the one you always use for the account. Every few months, it might be worth updating to the latest Chrome user-agent (Chrome releases a new version every couple months). Remember, you need your account to look like it's a real person. Real people use the same browser, and they update it pretty reliably (most people anyways). I'm not making blind claims either, check out this chart, the market share for any single chrome browser version doesn't last long at all: http://gs.statcounte...on-market-share which means people update quickly.

 

Hopefully some of these tips help.







Also tagged with one or more of these keywords: free code, defines, example, sample, user agent, referrer, code, define, local

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users