Coder Social home page Coder Social logo

souravrs999 / faucetcryptobot Goto Github PK

View Code? Open in Web Editor NEW
111.0 11.0 47.0 2.29 MB

A bot for FaucetCrypto a cryptocurrency faucet. The bot can currently claim PTC ads, main reward and all the shortlinks except exe.io and fc.lc.

License: MIT License

Python 100.00%
faucet bot selenium python cryptocurrency automation faucet-crypto brave-browser cryptocurrency-faucet shortlinks

faucetcryptobot's Introduction

Faucet Crypto Bot logo



A bot for the high paying popular cryptocurrency faucet Faucet Crypto. The bot is built using Python and Selenium, currently it is under active development and, can do tasks like PTC ads, main rewards, and shortlinks except exe.io and fc.lc

made with python Selenium webdriver Brave browser chromium driver for selenium


Bot status

Status

  • Seems like Faucet Crypto has started using a bot detection system so you may need to obfuscate your driver to prevent it's detection. Please see below for the detailed instructions.

  • The xpaths have been updated and new xpaths have been written to xpath.py you can replace the new file with the old file. Since i had to rush throught this if i missed something please let me know

  • The layout of Faucet Crypto has changed and the bot won't work anymore you can wait for me to release the updated xpath file or you can add them manually to the xpath.py file.

  • The issue of the bot was unable to find the claim button was fixed. The reason was due to an update in Faucet Crypto website. New xpaths have been updated you can copy the new xpaths to your old xpaths file. (keep and eye on the bot status for further changes and updates that might occur.)

Disclaimer

Please be note that this is the first major automation project for me. I am by no means responsible for any usage of this tool, Account bans or Nuclear winter. Use it on your own behalf. I'm also not responsible if your account get's banned.Therefore, if the Faucet Crypto devs catches you and get you banned,then don't point your fingers at me, for getting your account deleted? I will rolling on the floor laughing at you.

Faucet Crypto

Faucet Crypto landing page

If you found this repo useful please don't forget to give me a ⭐

Brave Browser

The browser of choice for this project is Brave browser due to its native ad-blocking scripts which are pretty good and prevents random popup openings, which can mess with the bots proper execution.

If you don't have Brave browser installed you can download it from here.

Changes

v2.98
  • Added much better error codes
  • If the bot is run in headless mode it wont load images imporving load times significantly
  • Instructions for driver obfuscations have been provided
  • Much efficent compared to the previous versions
  • Achievements collector has also been added but its only experimental and is disabled by default in the bot.py file you can use this feature by uncommenting it
  • Also added a feature where the bot screenshots the stupid popup ads that creep in from time to time.
  • If the bot detects that the captcha is being triggered it will sleep for an hour before executing again.
  • Fake User Agent has been added
  • Option for completing fc.lc shortlinks added but disabled by default, cause it dosen't work always you can test it out by uncommenting the sections below it in FaucetCryptoBot/fcbot.py.
  • Bot automatically closes the modal and chat which was an issue in the previous version.
  • Resolved the issue where the watch button for sh.faucetcrypot.com was covered by the chat button and throwed an error.
  • Removed the annoying 'NoneType' object has no attribute 'text' errors.
  • Replaced pickle5 with pickle-mixin cause pickle5 was causing issues for windows users.
  • Changes in requirements.txt file
v2.88
  • Added logic to save cookies and use them for logging in. This prevents using the default profile directory of your browser and dosen't mess it up.

  • Added logic to close the welcome modal and chat which covered the dashboard visibilty.

  • Cookies are now saved to a cookie file if it is not present in the directory the bot will automatically login with the user email and password provided on the config file and generate a new cookie file.

  • Added proxy incase you want to generate some referrals. This method is not recommended yet and try this at your own risk.

  • Fixed the issue when the browser was running in normal mode the bot closing all the open tabs.

Installation

create a virtual environment with virtualenv

virtualenv env

Activate the virtual environment

source env/bin/activate

Install all the necessary packages

pip install -r requirements.txt

Important

The following is important to better hide your chromedriver

Replacing cdc_ string

You can use vim or perl to replace the cdc_ string in chromedriver. Using vim or perl prevents you from having to recompile source code or use a hex-editor.

Make sure to make a copy of the original chromedriver before attempting to edit it.

Our goal is to alter the cdc_ string, which looks something like $cdc_lasutopfhvcZLmcfl.

Using Vim
vim /path/to/chromedriver

After running the line above, you'll probably see a bunch of gibberish. Do the following:

  • Replace all instances of cdc_ with dog_ by typing :%s/cdc_/dog_/g. dog_ is just an example. You can choose anything as long as it has the same amount of characters as the search string (e.g., cdc_), otherwise the chromedriver will fail.

  • To save the changes and quit, type :wq! and press return. If you need to quit without saving changes, type :q! and press return.

Using Pearl
  • The line below replaces all cdc_ occurrences with dog_.
perl -pi -e 's/cdc_/dog_/g' /path/to/chromedriver
  • Make sure that the replacement string (e.g., dog_) has the same number of characters as the search string (e.g., cdc_), otherwise the chromedriver will fail.

Setup

Set the correct path for your brave browser in the config file config.py

[Browser]
browser-mode =              #takes two parameters headless or leave it empty
driver-path =               #path to your chrome driver
browser-binary-location =   #path to your browser binary location

[User]
mail =                      #Your faucet crypto account mail
password =                  #your faucet crypto account password

[Misc]
debug =                     #takes two arguments True of False
proxy =                     #proxy address and port try not to use a proxy
                            #and leave this empty

Run

Run the bot by

python bot.py

Bot terminal

Account setup

If it's your first time running the bot you need to login to Faucet crypto. Run the bot in normal-mode(default) it will redirect to login page where you can login, the bot will do the rest from there by collecting from all the ads. (Note) The bot can't yet do the exe.io and fc.lc shortlinks so you would have to help it do that. If you've logged in successfully then you can run the bot in headless mode from then on you can set the bot to headless mode by setting the "headless" flag in the config file.

browser-mode = "headless"

Contributions

Feel free to contribute to this project and help me improve this project

Thank You,
Sourav

faucetcryptobot's People

Contributors

souravrs999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faucetcryptobot's Issues

bot not working anymore

The ptc ads and shortlinks are not working anymore because the bot can´t solve the captchas which is required to claim the rewards. Does anyone now a way around this ?

Only sleeping

Hello everyone!
When I start the bot, it works without errors but seems to be only sleeping.

[ 2021-05-26 20:12:22 ] [BROWSER] starting browser session: XYZ123 [ 2021-05-26 20:12:24 ] [ BOT ] Sleeping for 1m [ 2021-05-26 20:13:27 ] [ BOT ] Sleeping for 1m [ 2021-05-26 20:14:29 ] [ BOT ] Sleeping for 1m [ 2021-05-26 20:15:31 ] [ BOT ] Sleeping for 1m [ 2021-05-26 20:16:34 ] [ BOT ] Sleeping for 1m [ 2021-05-26 20:17:36 ] [ BOT ] Sleeping for 1m [ 2021-05-26 20:18:38 ] [ BOT ] Sleeping for 1m

What did I do wrong? Or did I miss anything? The Wiki link only brings me to code.

ValueError: Not a boolean

Got issues when try running the bot, i no have idea what happened with this logs.

Traceback (most recent call last):
File "bot.py", line 27, in
faucet_bot()
File "bot.py", line 5, in faucet_bot
bot = FaucetCryptoBot()
File "C:\Users\Mypc\Desktop\FaucetCryptoBot-main\FaucetCryptoBot\fcbot.py", line 19, in init
self.debug = self._configParser()[5]
File "C:\Users\Mypc\Desktop\FaucetCryptoBot-main\FaucetCryptoBot\fcbot.py", line 117, in _configParser
debug = config.getboolean("Misc", "debug")
File "c:\users\Mypc\appdata\local\programs\python\python38-32\lib\configparser.py", line 828, in getboolean
return self._get_conv(section, option, self._convert_to_boolean,
File "c:\users\Mypc\appdata\local\programs\python\python38-32\lib\configparser.py", line 808, in _get_conv
return self._get(section, conv, option, raw=raw, vars=vars,
File "c:\users\Mypc\appdata\local\programs\python\python38-32\lib\configparser.py", line 803, in _get
return conv(self.get(section, option, **kwargs))
File "c:\users\Mypc\appdata\local\programs\python\python38-32\lib\configparser.py", line 1163, in _convert_to_boolean
raise ValueError('Not a boolean: %s' % value)
ValueError: Not a boolean:

Always Sleeping 1 min

bro. Initially this went well, but the next day the bot did not want to run normally, it only outputs "sleep 1m" over and over again, I checked the non headless condition also remained the same. even though all ads have not been claimed, is the bot not working now?
thanks bro

Sleeping for 1m

Hello,
It seems PTC ADS doesn't work for me.
I always have the same message :

PTC ADS
Sleeping for 1m

No coins earned.

Tried with and whithout headless mode.
Tried to disable brave ad blocker.
I don't see blocking captcha or others things.

Also, Is it really important to use virtualenv ?

Thank you.

Question

I see you sleep for an hour when a captcha is encountered, do the captcha's go away after an hour? Or is this just to give you time to solve the captcha?

Install on a VPS

Hello,

Is it possible to set up the bot on a VPS running on CentOS 7 only CLI ? How do I make the first login if i don't have the graphical for the browser ?

Thanks

Not picking up Main Reward

when trying to collect the main reward the following error is displayed..

[ BOT ] MAIN REWARD
[SUCCESS] Main reward is available
[ BOT ] Waiting for 3 sec
[WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div/div/p"}

The xpath for this must have changed..

timeout trying to find captcha block

Hello everyone!
When I start the bot, it works without errors but it doesn't seem to be able to find captcha block.

[ 2021-09-12 21:46:35 ] [ BOT ] User balance: 0.00 Coins/0.00000000 BTC
[ 2021-09-12 21:46:35 ] [ BOT ] User level: Lvl 1 / B 0.125%/ 0%
[ 2021-09-12 21:46:35 ] [ BOT ] Coin rate: 1.1504 Coins
[ 2021-09-12 21:46:35 ] [ BOT ] MAIN REWARD
[ 2021-09-12 21:46:40 ] [SUCCESS] Main reward is available
[ 2021-09-12 21:46:51 ] [WARNING] Message: timeout trying to find captcha block

What did I do wrong? Or did I miss anything? The Wiki link only brings me to code.

I have a suggestion about xpath

Hi, how if you make xpath code more flexible, not based on position but by search.
something like this :
"//*[contains(text(), 'Get Reward')]"
instead of this :
/html/body/div[1]/div[2]/main/div/div/div[3]/div[1]/div[2]/div[2]/div[1]/div/div/div[2]/button

xpaths issue

Hi
Somebody got few minutes to help me with shortlinks xpaths? I cant get it to work :/ Tried everything and now have no idea how to repair it. Today I get a new error :/

[ 2021-04-14 14:09:52 ] [WARNING] Message: element click intercepted: Element <span class="inline-flex rounded-md shadow-sm">...</span> is not clickable at point (1490, 718). Other element would receive the click: <div class="absolute inset-0 w-full bg-gray-500 dark:bg-gray-700 opacity-75" style=""></div> (Session info: headless chrome=89.1.22.71)

timeout trying to find ad title

with debug = True:

[ 2021-02-25 12:13:47 ] [  BOT  ] PTC ADS
[ 2021-02-25 12:13:50 ] [  BOT  ] Total ads amount: 23
[ 2021-02-25 12:13:50 ] [  BOT  ] Completed ads: 0
[ 2021-02-25 12:13:50 ] [  BOT  ] Available ads: 23
[ 2021-02-25 12:13:50 ] [  BOT  ] Earnable coins: 433.62
[ 2021-02-25 12:13:50 ] [  BOT  ] Ad [1] Earn Crypto Today!
[ 2021-02-25 12:13:50 ] [  BOT  ] Ad completion time: 40 sec
[ 2021-02-25 12:13:50 ] [  BOT  ] Ad reward: 26.28 Coins coins
[ 2021-02-25 12:13:50 ] [  BOT  ] clicking on ptc watch button
[ 2021-02-25 12:14:01 ] [WARNING] Message: timeout trying to find captcha block

[ 2021-02-25 12:14:06 ] [WARNING] Message: timeout trying to find ad title

Seems like paths are changed again..

Invalid Access to memory

Hi,

I'm just about to start the bot but I keep running into this problem, see below. I feel like there's something simple I'm missing? I haven't been able to find a solution to this invalid memory access.

Traceback (most recent call last):
File "D:\FaucetCryptoBot-main\bot.py", line 27, in
faucet_bot()
File "D:\FaucetCryptoBot-main\bot.py", line 5, in faucet_bot
bot = FaucetCryptoBot()
File "D:\FaucetCryptoBot-main\FaucetCryptoBot\fcbot.py", line 35, in init
self.driver = Chrome(options=self._get_opts(), executable_path=self.driver_path)
File "C:\Users\joe\AppData\Local\Programs\Python\Python39\Scripts\env\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\joe\AppData\Local\Programs\Python\Python39\Scripts\env\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "c:\users\joe\appdata\local\programs\python\python39\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\users\joe\appdata\local\programs\python\python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 998] Invalid access to memory location

Bot crashed

Traceback (most recent call last):
  File "bot.py", line 27, in <module>
    faucet_bot()
  File "bot.py", line 5, in faucet_bot
    bot = FaucetCryptoBot()
  File "/root/FaucetCryptoBot/FaucetCryptoBot/fcbot.py", line 35, in __init__
    self.driver = Chrome(options=self._get_opts(), executable_path=self.driver_path)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/chromium-browser unexpectedly exited. Status code was: 1

Any idea?

'NoneType' object has no attribute 'text'

[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div/div/div[1]/div[2]/div/div[2]/span/a"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

[ 2021-02-17 21:56:02 ] [WARNING] 'NoneType' object has no attribute 'text'
[ 2021-02-17 21:56:02 ] [WARNING] Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div[2]/main/div/div/div[3]/div[3]/div[1]/div[1]/h3"}
  (Session info: chrome=ipadressxxxx)

Raspberry Problems

I start the Bot and get this ....

File "bot.py", line 1, in
from FaucetCryptoBot import FaucetCryptoBot
File "/home/pi/FaucetCryptoBot/FaucetCryptoBot/init.py", line 1, in
from .fcbot import FaucetCryptoBot
File "/home/pi/FaucetCryptoBot/FaucetCryptoBot/fcbot.py", line 29
"browser", f"starting browser session: {self.driver.session_id}"

Pls help !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.