BhaskarPanja93 / View-Bot-Client

Fully Functional Adfly View Bot mechanism(Perpetual Client)
MIT License
16 stars 3 forks source link

Shifting to Selenium core #8

Closed BhaskarPanja93 closed 2 years ago

BhaskarPanja93 commented 2 years ago

I dont think current Chrome based bot is working for new AdFly accounts. They get instantly banned. So i am thinking to remake my old Selenium based bot, privately to check if it effects the fact in any way. @Dec1lent I would like to know if your selenium bot works with new accounts, or do they get banned too, if they do, whats the reason?

Dec1lent commented 2 years ago

My selenium bots only gets banned after around 400 views each day per account. But since Push-ads doesnt care if the ip has been used before you can use the same ip for a pretty long time before they suspect anything (like 100 times, it only counts as 5-7 views.) When i use undetected-chromedriver (uc,) I wont get banned at all, but the push-ads earnings are down to just $0.1 - $0.3 per day if it completes a view every minute (1440 times a day.) But I have played around with an idea without "uc", and that is that I dont get banned for 7-10 days and my pushads earnings are $5-10 per account. So you could in theory just run the but on multiple accounts for the last couple of days in a month and withdraw before they ban it. I havent tried it but it should work. I will be home today and then I will share my files with you.

BhaskarPanja93 commented 2 years ago

One thing i can say about push ads and chromedriver is that once you close the chromedriver session, all cookies are cleared, so no more chances of push ads after you close the session, I can get around of that if i need Push ads as the main source of earning.

Also you mean your bot focuses more on view earnings, rather than push ad earnings? If you see my current stats, I get more push ads earning than view ones

view stats push ads stats .

Dec1lent commented 2 years ago

image Without undetected-chromedriver, im getting banned in 2 days and pushads earnings where around 18$. But something have changed with undetected-chromedriver, its like it doesnt recieve push-ads at all. I have been looking at other sites like shorte.st and shrinkearn, as they have other criteria than Adfly.

BhaskarPanja93 commented 2 years ago

Tell me just 1 thing-"Do you get banned with undetected Chromedriver?" Because i know how to get Push Ads on UC. I am making the code for the same, if it doesnt get banned, everything is good, earning is good too.

Dec1lent commented 2 years ago

I have never gotten banned on UC, except when using bad free proxies, never had a problem with premium.

Dec1lent commented 2 years ago

I have never gotten banned on UC, except when using bad free proxies, never had a problem with premium.

Also with selenium you can now run multiple (5) chrome instances on one vm, as Adfly allows 5 views per ip a day. Lowering the amount of vm's you need to get anything meaningful out of it.

BhaskarPanja93 commented 2 years ago

Right now as in v3.d i am getting push ads using UC, I am still using my old bot to make clicks on UC. might be changing that to selenium clicks if the IDs dont get banned.

Dec1lent commented 2 years ago

Looking forward to hear back from you. Highly unlikely that you will ever get banned really. I wasnt able to recieve more than a couple of cents worth of push ads for a whole day using UC. But glad you found out how to :D, also do only way that I could load extensions was from this. https://stackoverflow.com/questions/20782557/load-unpacked-chrome-extension-programmatically

BhaskarPanja93 commented 2 years ago

ok this is a whole new story, let me break things down for you, see if anything helps.

To receive push ads, you need these 3 things:

  1. enable allow popups from chrome settings :check here: chrome://settings/content/popups
  2. enable showing misleading ads (optional) :check here: chrome://settings/content/ads
  3. allow the chrome instance to run in the background (even after the chrome session has ended)

the 1st 2 are disabled by default in any chromium instance.

The problem with you is, you are CREATING a new instance every time, and every time you create a new instance it starts with the default, and as soon as you "driver.close()" the instance is deleted for ever, meaning no scope for keeping the instance running in the background.

Google about the parameter "user_data_dir" in selenium and UC, it is used to use or save selenium profiles into a directory, what i did with it is, i created a profile, changed the settings accordingly, made a few views and left the directory as it is, so that later when i use the same directory again, i can get the old settings and push ads back. (Push ads connections are attached to your chrome instance so the user_data_dir stores all push ads connections and reserves Push ads when you use the same directory again) Simple. Settings preserved, Ads shown.

and also regarding extensions, i didnt need to add extentions by commands, i installed them manually once, and since the chrome profile is saved, the extensions are saved too. :)

So as of now my plan is to get the 1st payment using v3.y bot and once i got the first i will get back to v2 because i assume v2 will give more earning than v3, not sure.

BhaskarPanja93 commented 2 years ago

I kept userdata saved for 15 unique viewer directories, still got banned, maybe i need to simulate a new viewer every time, like your bot does, lets see.

Dec1lent commented 2 years ago

Werid, but I didnt use a profile yet, so maybe thats why. It would make it more annoying to enable pop ups, maybe we could minimize the chrome tab with a delay before closing and then just open another one at the same time. More ressources would be used though, but it wont get banned atleast.

BhaskarPanja93 commented 2 years ago

Yeah thats exactly what i am planning to do. Delay will fetch couple Push Ads, that would be enough.

Dec1lent commented 2 years ago

https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/559 might help, but havent tried. And sorry for not being very active in the last couple of days, I have been busy.

BhaskarPanja93 commented 2 years ago

Ya I see you busy thats fine. Tell one thing, do i need to place the undetected chrome binary in path or no? if yes, where do i find the binary?

BhaskarPanja93 commented 2 years ago

Now that my 3 main ids are banned, i am much devoted towards v3. Firstly i am having trouble starting the undetected_chromedriver, it is because of how python used multiprocessing and all, i am not going into the complexities right now. Secondly, after i am able to start an instance, it shares fingerprint with the real chrome installed in the system. I really expected it to create a new fingerprint everytime. Thirdly, i couldn't manage to install extensions into UC using this: https://stackoverflow.com/questions/20782557/load-unpacked-chrome-extension-programmatically I am thinking to install it using GUI then, not a problem.

@Dec1lent do me a favour, if you have a working code using undetected_chromedriver, kindly send the whole directory and/or any additional files to me, at this point, i am sure v2 makes a lot using Push Ads but the id needs to somehow get 1 monthly payment before i can use v2 on it.

Dec1lent commented 2 years ago

Sorry for the late reply and sorry for not having an 100% working bot. I have looked into the pop-ups in chrome://settings/content/popups and it seems like it works, except what really makes money is window placements chrome://settings/content/notifications, which is blocked on non secure websites (http,) which is what Adfly and most of its ads are using. It was once unblocked last year and I made upwards of 80$ on that, even though I got banned right after it was still fun to watch the numbers climb :D. I havent gotten extension to work in UC v3.1, so webrtc leak, though the only problem I see with, is that Adfly's advertiser will stop sending you some ads (though some will still show.) With selenium I just added driver.minimize_window() and a delay before closing. I also noticed that when closing the UC browser, it wouldnt free up threads. So I just used multiprocessing and copied a line from stackoverflow and wola, it works.

def worker(): if name == 'main': p = mp.Process(target=worker) p.start() p.join()

BhaskarPanja93 commented 2 years ago

does it get banned for using UC? thats the only concern for me right now. All I need is just the 1st payment... and after that i have v2 ($2.5 per day per account).

Dec1lent commented 2 years ago

Doesnt get banned at all, I once ran it for 3 weeks on one vm, the proxies didnt work for me as the code i used was for non authenticated proxies, so it just used my normal ip, I didnt get more than 5 views a day since thats the limit per ip. But the pushads earnings was around 30 cents per day and I think that if the proxies and window placement would work (with proxies I just have to switch to something that works with authenticated proxies) it will make alot more. Then we only have to find an easier way to install extensions without getting banned, so the advetiser system thinks that its a new viewer and therefor also allows for a higher bidder per ad and also it looks like adfly uses Datadome for bot protection. UC takes care of most of it, but they have a system where if the user-agents doesnt match up with the display or graphics driver, it will get detected. Not banned bot detected. The graphics driver you can mostly hide by using --disable-gpu, since alot more people doesnt use the vm graphics (and therefor the graphics should show up as integreted by the cpu?). I think the easy way to get correct user-agents would be to just generate alot of random once and copy everyone that has (windows nt) in it and has the same browser name as Chrome. Datadome would easily detect something if the user-agents says that its an Iphone using chome at 1080x1920 with an x86 cpu and uses a static ip, since most phone ips changes. But those are just smaller improvements in the feature, as it doesnt get banned and that im pretty sure that I will forget.

BhaskarPanja93 commented 2 years ago

cool i never thought of this "user-agents says that its an Iphone using chome at 1080x1920"

Regarding the GPU thing, well web browser cant detect name of the GPU the device is using, but i am not sure how Push Ads work, so idk if they can detect or no. Also Virtual Machines have predefined Video Driver with the name as that of your VM Software (if you open up Device Manager in the VM).

Give reference to any bot that uses UC, so i can know what all is required, like am i supposed to spoof fingerprint, user-agent, what else?

I have a massive list of user-agents. My v2 bot was changing user-agent but it was still getting leaked due to some browser bugs. With my v3 bot i fixed that completely. Fingerprint is spoofed both in v2 and v3 and it works correctly too. I prefer changing IP, because i can, thats it, and i have never seen any proxy work for me, so idk.

Thats it, i will start testing in probably a week, so lets see.

BhaskarPanja93 commented 2 years ago

AdFly needs regular visitors, by spoofing fingerprint, every visitor is unique, which AdFly says as the reason i got banned. At this point, i am having 2 ways of making my bot, 1> Make 1 view per 2-3 hour in the VM (real fingerprint). and then keep Chrome minimised forever to keep receiving Push Ads. This will cause to reduce the number of "unique" viewers you get. 2> Keep 100s of browser profiles in the Host PC and the VMs will share them and run their individual instance, once a while (maybe every month/week) the profiles will be refreshed. So you get views from the same viewer(fingerprint) for quite some time, and not all views will be unique.

ban reason .

Dec1lent commented 2 years ago

I have finally gotten extensions working 100% on UC. Right now the thing that I have to do, is to get the Chrome options to work completely. Right now the "prefs" doesnt work at all, but there is a fork of UC that claims to fix it, I will try it out https://github.com/sebdelsol/undetected-chromedriver. This is an example of a somewhat working UC. v2.0B.zip

Dec1lent commented 2 years ago

Also @BhaskarPanja93, where do you host your vm's? The electric prices here in Europe havent been the best for the server, as its costing me around 90$ a month to run and I was looking to run my game servers and backups in a cheaper way. Also I still havent figured how to get push ads to appear, I have tried what you said about chrome://settings/content/popups, buts its like nothing happened.

BhaskarPanja93 commented 2 years ago

If you want Push ads, get rid of Ghost Spectre. Ghost Spectre blocks 99% ads completely. Switch back to Windows Server or Windows 10 or 11. After that turning on chrome://settings/content/popups will work. Or maybe try this: https://www.youtube.com/watch?v=nvJWyYu2yAU

And regarding hosting servers, I host the servers in a dedicated VM in my desktop(underclocked Ryzen 9 3900x), same where i run the adfly VMs. Electricity costs 0.1usd per kiloWattHour so yeah it doesnt matter much to me. But hosting servers at home here has some downsides, we get a type 4 NAT IP (some description here: https://networkinterview.com/nat-type-1-vs-2-vs-3-detailed-comparison/), so it is impossible to connect to our home server from outsde our home(this is where holepunching helps https://stackoverflow.com/questions/23176800/whats-so-hard-about-p2p-hole-punching). IDK what NAT type is offered in Europe. Also about other hosting platforms, you have choices like AWS(https://aws.amazon.com/) and google (https://cloud.google.com/gcp). If you ask me, i would choose AWS because it is far cheaper than google, also network data in is completely free(just pay for network data out beyond 100GB per month), also you get first 12 months for free per account(on certain terms, but its almost negligible). Go AWS, enjoy the first year, get a new account enjoy another year. AWS have the prices for all their services listed, like per GB network cost, per hour usage cost and all. Google on the other hand offers $300 to spend for the first 3 months, I haven't used google much so cant help with google. Try both and see what works best for you. "Storage is probably an issue if you want backups though" Cloud platforms dont offer much storage, for storage you can get google GDrive suite, unlimted google drive storage, pretty cheap i guess.

Dec1lent commented 2 years ago

image It looks like its trying to connect to the server. The vm shows up in http://0.tcp.in.ngrok.io:19008/ for the first view, but then stops entirely. @BhaskarPanja93

BhaskarPanja93 commented 2 years ago

Yes i am aware of this v2 specific bug, but i dont think i will be fixing it anytime soon. I am working on shifting things to v3, where this issue wont happen at all. Also some upcoming hints... With v3, you will need to run a script in the host machine, this script will be responsible for serving all the image files to individual VMs, reducing data usage. Also with this script, you will be able to live control your VMs, start or stop them, set timers and lot more. Also i will be deprecating the user_login.py file since that function will also be dealt by this new script....

Dec1lent commented 2 years ago

I see. Now please dont hype us up man 😆, thats a lot of things you got going behind the scenes. Looking forward to it.