Skip to content

Instantly share code, notes, and snippets.

View Aladex's full-sized avatar

Andrey Aladex

View GitHub Profile
@Aladex
Aladex / yadisk_cleanup_gist.py
Created March 17, 2026 11:10
Yandex Disk photounlim bulk delete script — deletes photos invisible to public REST API via internal models-v2 endpoint
#!/usr/bin/env python3
"""
Yandex Disk photounlim cleanup script.
Deletes photos from the "photounlim" section of Yandex.Disk via internal
models-v2 API. Photounlim files are invisible to the public REST API and
can only be managed through the web interface's internal endpoints.
Requirements:
pip install curl_cffi

The provided code is a Golang implementation designed to make HTTP requests with a specific focus on bypassing certain security checks, particularly the TLS fingerprinting that some services use to detect and block bots.

The CustomTransport struct is used to override the default behavior of the HTTP client's transport mechanism. This allows for the setting of a custom User-Agent for every request, which can be essential in bypassing some basic bot detection mechanisms.

A notable feature of the code is its use of the github.com/refraction-networking/utls package, which is a fork of Go's standard TLS library. This package allows for more granular control over the TLS handshake process, enabling the user to mimic the TLS fingerprints of popular browsers. This is a crucial part of bypassing advanced bot detection mechanisms that look at the TLS fingerprint to determine if the client is a real browser or a bot.

Additionally, instead of connecting to the domain name, the code resolves the IP address of the d

@Aladex
Aladex / main.go
Last active May 27, 2020 18:06
GinGonic self-hosted SPA for bindata
go-bindata -o cmd/bindata.go -fs -prefix "app" dist/...
go build -i -o bin/zpix cmd/*