Jump to content
UBot Underground

Free Code: Random User Agents And Random Referrers


Recommended Posts

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))
}

 

  • Like 4
Link to post
Share on other sites
  • 3 months later...
  • 3 months later...

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?

  • Like 1
Link to post
Share on other sites

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.

  • Like 1
Link to post
Share on other sites

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.statcounter.com/browser-version-market-share which means people update quickly.

 

Hopefully some of these tips help.

Link to post
Share on other sites
  • 9 months later...

I can recommend this detection site:

 

User Agent Detection

 

https://developers.whatismybrowser.com/useragents/parse/?analyse-my-user-agent=yes

 

It also features an extensive database with many lists of current user agents:

 

Extensive List of current User Agents

 

https://developers.whatismybrowser.com/useragents/explore/

Link to post
Share on other sites
  • 2 weeks later...

I can recommend this detection site:

 

User Agent Detection

 

https://developers.whatismybrowser.com/useragents/parse/?analyse-my-user-agent=yes

 

It also features an extensive database with many lists of current user agents:

 

Extensive List of current User Agents

 

https://developers.whatismybrowser.com/useragents/explore/

thank you very much

Link to post
Share on other sites
  • 2 months later...

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...