Skip to content

Instantly share code, notes, and snippets.

View DanEdens's full-sized avatar
💭
RIP Old Linkedin. New one https://www.linkedin.com/in/madtinker/

Dan Edens DanEdens

💭
RIP Old Linkedin. New one https://www.linkedin.com/in/madtinker/
View GitHub Profile
@DanEdens
DanEdens / captcha-bot.md
Created November 16, 2024 18:06 — forked from ruvnet/captcha-bot.md
automate the process of solving CAPTCHAs using a desktop computer, you can combine several approaches involving automation tools

To automate the process of solving CAPTCHAs using a desktop computer, you can combine several approaches involving automation tools, CAPTCHA solving services, and scripting. Here’s a detailed guide on how to set this up:

Using Automation Tools

Power Automate Desktop

You can use Power Automate Desktop (formerly Microsoft Power Automate Desktop) to automate the interaction with the CAPTCHA. Here’s a general outline based on the videos and descriptions provided:

  1. Capture CAPTCHA Image:
    • Use Power Automate Desktop to capture a screenshot of the CAPTCHA challenge.
  • Extract the CAPTCHA image from the screenshot[1][4].
@DanEdens
DanEdens / gist:4586c26f72cbccfc232cdee240824d1f
Created November 30, 2023 03:49
git commit as code prompt
for any thing that isn't code, Please respond as if writing a git commit messages. If a response must be longer then 4 sentences, please break it to into separate commits.
@DanEdens
DanEdens / WinSystemSnapshot.ps1
Created November 5, 2023 22:26
PowerShell script to capture a detailed Windows system snapshot. Collects event logs, installed apps, system info, services, disk space, network config, and user accounts. Consolidates into a master log.
# Define a directory for log files
$logDir = "$env:USERPROFILE\logs\"
$maxEvents = 500 # Number of most recent events to retrieve
if (-not (Test-Path $logDir)) {
New-Item -Path $logDir -ItemType Directory
}
# Function to extract and log events
@DanEdens
DanEdens / __main__.py
Last active July 7, 2023 17:26
simple-mqtt-server-agent
import os
import subprocess
import sys
# Define file directories
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
BIN_DIR = os.path.join(ROOT_DIR)
# Add directories to system path
sys.path.insert(0, ROOT_DIR)
@DanEdens
DanEdens / check_selenium_driver.py
Created June 25, 2023 23:38
install selenium drivers
def check_drivers_powershell():
import os
import subprocess
# Dictionary of web browser drivers and their download URLs
drivers = {
"Chrome": "https://chromedriver.storage.googleapis.com/latest/chromedriver_win32.zip",
"Firefox": "https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-win64.zip",
"Edge": "https://msedgedriver.azureedge.net/LATEST_RELEASE_EDGE",
}
@DanEdens
DanEdens / .rc.cmd
Created June 19, 2023 02:22
Windows persistent aliases
@echo off
@REM autorun.reg
@prompt $m$p$g
@REM Windows Registry Editor Version 5.00
@REM [HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
@REM "Autorun"="%sourcefile%"
@DanEdens
DanEdens / toggleLocalRepo.cmd
Created June 16, 2023 16:51
Git repo Toggle. Will either re-Clone or autocommit and delete. I made this to be able to remove clutter without losing easy access to it. Includes sh and cmd versions
@echo off
setlocal
set repo_url=https://github.com/DanEdens/resume.git
set repo_folder=resume
if not exist "%repo_folder%" (
echo Cloning repository...
git clone "%repo_url%" "%repo_folder%"
cd "%repo_folder%"
@DanEdens
DanEdens / mqtt_handler.py
Created May 12, 2023 13:33
mqtt python logger
import errno
import logging
import os
from datetime import datetime
from pathlib import Path
import paho.mqtt.client as mqtt
import paho.mqtt.publish as publish
# Create utils specific fallback logger for Debugging debug mode
import errno
import html
import logging
import os
import platform
import re
import socket
import subprocess
import time
from datetime import datetime
@DanEdens
DanEdens / PageUtilities.py
Last active August 25, 2023 14:09
Selenium page utilities
import os
import time
from selenium.common import TimeoutException
from selenium.webdriver import ActionChains
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support import expected_conditions as expect
from selenium.webdriver.support.wait import WebDriverWait
#import testKitUtils