diff --git a/.gitignore b/.gitignore index 8c7dfe1..99aefea 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,11 @@ yarn-error.log /.nova /.vscode /.zed + +# Python projet +venv +__pycache__ + # Browser app/Browser/console app/Browser/screenshots diff --git a/todo.md b/todo.md index 4343e98..9354762 100644 --- a/todo.md +++ b/todo.md @@ -1,6 +1,7 @@ # TODO +- Fix hellcase, fermer lespopups à chaque nouvelle visite - Voir si le scheduler fonctionne au démmarage - Mettre un timeout pour pas overwhelm le pc au démmarage - Image pour le join de giveaway diff --git a/undetectedChromedriver/chromedriver b/undetectedChromedriver/chromedriver new file mode 100755 index 0000000..36173fd Binary files /dev/null and b/undetectedChromedriver/chromedriver differ diff --git a/undetectedChromedriver/chromedriver-linux b/undetectedChromedriver/chromedriver-old similarity index 100% rename from undetectedChromedriver/chromedriver-linux rename to undetectedChromedriver/chromedriver-old diff --git a/undetectedChromedriver/getChromeDriver.sh b/undetectedChromedriver/getChromeDriver.sh index 5331f8a..7e378a2 100644 --- a/undetectedChromedriver/getChromeDriver.sh +++ b/undetectedChromedriver/getChromeDriver.sh @@ -1 +1,20 @@ -sudo docker run --rm -it -p 3389:3389 -v ./undetectedChromedriver:/root/.local/share/undetected_chromedriver/ ultrafunk/undetected-chromedriver:latest +#!/bin/bash + +# From undetected chromedriver docker +#sudo docker run --rm -it -p 3389:3389 -v ./undetectedChromedriver:/root/.local/share/undetected_chromedriver/ ultrafunk/undetected-chromedriver:latest + +# With undetected chromedriver patcher +# Run the selenium/standalone-chrome:latest with a specific container name in the background +sudo docker run -d --name standalone-chrome selenium/standalone-chrome:latest + +sleep 5 + +# Copy the chromedriver binary from the container to the host +sudo docker cp -L standalone-chrome:/bin/chromedriver ./chromedriver +# Stop the container +sudo docker stop standalone-chrome + +sudo chmod 777 ./chromedriver + +# Patch the chromedriver binary +python3 ./patchChromedriver.py diff --git a/undetectedChromedriver/patchChromedriver.py b/undetectedChromedriver/patchChromedriver.py new file mode 100644 index 0000000..b346c19 --- /dev/null +++ b/undetectedChromedriver/patchChromedriver.py @@ -0,0 +1,8 @@ +#!/bin/python3 + +import undetected_chromedriver as uc + +options = uc.ChromeOptions() +# Chromedriver is in current directory +driver = uc.Chrome(options = options, browser_executable_path="/usr/bin/google-chrome", driver_executable_path="/home/ninluc/Documents/codage/DatBrowser/undetectedChromedriver/chromedriver") +driver.get('https://nowsecure.nl') diff --git a/undetectedChromedriver/seleniumChromedriverDockerfile b/undetectedChromedriver/seleniumChromedriverDockerfile index 34110df..8aa1f2a 100644 --- a/undetectedChromedriver/seleniumChromedriverDockerfile +++ b/undetectedChromedriver/seleniumChromedriverDockerfile @@ -1,6 +1,7 @@ -FROM selenium/standalone-chrome:108.0 AS final +# FROM selenium/standalone-chrome:108.0 AS final +FROM selenium/standalone-chrome:latest AS final -COPY undetectedChromedriver/chromedriver-linux /bin/chromedriver +COPY undetectedChromedriver/chromedriver /bin/chromedriver RUN mkdir -p /home/seluser/profile/ ENV TZ=Europe/Brussels