Skip to content

Instantly share code, notes, and snippets.

View dvygolov's full-sized avatar
🤖
Replacing YOU with robots

Daniel Vygolov dvygolov

🤖
Replacing YOU with robots
View GitHub Profile
@dvygolov
dvygolov / firemetapixel.html
Created May 14, 2024 15:36
Example of how to fire Meta Pixel event on button click
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example Page</title>
<script>
function fireMetaPixel(id, event) {
// Создание тега <img> с заданными параметрами
var img = document.createElement("img");
@dvygolov
dvygolov / exporttgfolder.py
Created May 11, 2024 20:27
This script can export all of your TG-channels from one folder into OPML format that can be imported into any RSS-reader. RSSHub.app is used for rss-friendly urls.
import sys
import xml.etree.ElementTree as ET
from telethon import TelegramClient
from telethon.tl.functions.messages import GetDialogFiltersRequest
from telethon.tl.types import InputPeerChannel, DialogFilter, DialogFilterDefault, DialogFilterChatlist
api_id = '<YOUR_APP_ID>'
api_hash = '<YOUR_APP_HASH>'
# Set up the Telethon client
@dvygolov
dvygolov / captchassense.html
Created April 30, 2024 09:14
White page with "press and hold" action to filter bots
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Access to this page has been denied.</title> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet"> <style> html, body { margin: 0; padding: 0; font-family: 'Open Sans', sans-serif; color: #000; } a { color: #c5c5c5; text-decoration: none; } .container { align-items: center; display: flex; flex: 1; justify-content: space-between; flex-direction: column; height: 100%; } .container > div { width: 100%; display: flex; justify-content: center; } .container > div > div { display: flex; width: 80%; } .customer-logo-wrapper { padding-top: 2rem; flex-grow: 0; background-color: #fff; visibility: visible; } .customer-logo { border-bottom: 1px solid #000; } .customer-logo > img { padding-bottom: 1rem; max-height: 50px; max-width: 100%; } .page-title-wrapper { flex-grow: 2; } .page-title { flex-direction: column-reverse; } .content-wrapper { flex-grow: 5;
@dvygolov
dvygolov / android10k.php
Created April 8, 2024 15:48
This script shows how to get real version of Android and other CH headers
<?php
header("Critical-CH: Sec-CH-UA-Full-Version-List,Sec-CH-UA-Mobile,Sec-CH-UA-Platform,Sec-CH-UA-Platform-Version,Sec-CH-UA-Bitness,Sec-CH-UA-Model");
// Extract each of the client hints from the request
$fullVersionList = $_SERVER['HTTP_SEC_CH_UA_FULL_VERSION_LIST'] ?? 'Not provided';
$mobile = $_SERVER['HTTP_SEC_CH_UA_MOBILE'] ?? 'Not provided';
$platform = $_SERVER['HTTP_SEC_CH_UA_PLATFORM'] ?? 'Not provided';
$platformVersion = $_SERVER['HTTP_SEC_CH_UA_PLATFORM_VERSION'] ?? 'Not provided';
$bitness = $_SERVER['HTTP_SEC_CH_UA_BITNESS'] ?? 'Not provided';
$model = $_SERVER['HTTP_SEC_CH_UA_MODEL'] ?? 'Not provided';
@dvygolov
dvygolov / popunder.js
Created March 9, 2024 20:10
simplest onclick popunder possible
class Popunder {
constructor(url) {
this.targetUrl = url || "http://google.com";
this.cookieName = "popunder";
this.clicksRequired = 1;
this.expirationHours = 24;
this.cookiePath = ";path=/";
this.eventName = "click";
this.documentRoot = document.documentElement;
this.init();
@dvygolov
dvygolov / ywactivitytracker.js
Last active April 7, 2024 22:22
Script that measures interactions on your landing page. If the user is active for "checkTime" seconds - an interval is valid, if total count of valid seconds = totalTime - the goal is reached and sent to Yandex.Metrika.
class ActivityTracker {
constructor(totalTime, checkTime, metrikaId, debug = false) {
this.events = [
"touchmove",
"blur",
"focus",
"focusin",
"focusout",
"load",
"resize",
@dvygolov
dvygolov / downloadadlibraryvideo.js
Created February 2, 2024 14:32
Script adds Download button to videos in Facebook Ads Library
//FOR CONSOLOE
setInterval(function (){
var videos = document.getElementsByTagName("video");
for (var i = 0; i < videos.length; i++) {
var video = videos[i];
if (video.parentNode.querySelector(".download-button")) {
continue;
}
@dvygolov
dvygolov / getrealidfrompfbid.js
Created November 26, 2023 15:13
This script redirects you to a post with real ID from the post page with pfbid.... Just run it in browser's console on the pfbid... post's page.
async function fetchFacebookPostId() {
const inputUrl = window.location.href;
if (!inputUrl || !inputUrl.includes("pfbid")) {
alert("No pfbid found in URL!");
return;
}
const fetchUrl = `https://www.facebook.com/plugins/post.php?href=${encodeURIComponent(inputUrl)}`;
@dvygolov
dvygolov / LikeYourPageWithOtherPages.js
Last active November 20, 2023 12:48
This script adds likes to one page from all of the other pages from your account, run it in the browser's console in Ads Manager
const GRAPH_API_URL = "https://graph.facebook.com/v18.0";
class FacebookManager {
constructor() {
this.adsManagerToken = __accessToken;
this.defaultFetchOptions = {
mode: "cors",
method: "GET",
credentials: "include",
redirect: "follow",
@dvygolov
dvygolov / dynamictype.html
Created November 6, 2023 13:17
This is an example of dynamic word erasion and typeing. Can be used on your landers.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dynamic Typing Header Example</title>
<style>
#dynamic-header {
display: inline;
}