Skip to content

Instantly share code, notes, and snippets.

View eioo's full-sized avatar
👨‍💻
­onpas

Kalle eioo

👨‍💻
­onpas
  • Finland
View GitHub Profile
type MessageHandler = (data: any) => void;
interface IMessageHandlers {
[type: string]: MessageHandler[];
};
class SocketWrapper {
ws: WebSocket;
messageHandlers: IMessageHandlers;
@eioo
eioo / spammer.py
Last active February 20, 2019 03:04
import queue
import random
import string
import sys
from threading import Thread
import requests
from user_agent import generate_user_agent
hosts = [
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
)
function(file, callback) {
var HASH_CHUNK_SIZE = 65536, //64 * 1024
longs = [],
temp = file.size;
function read(start, end, callback) {
var reader = new FileReader();
reader.onload = function(e) {
callback.call(reader, process(e.target.result));
};
public class AntibanItem extends ClientAccessor {
public String name;
public int min;
public int max;
public int current;
public boolean disabled;
public abstract void execute();
public AntibanItem(ClientContext ctx) {
super(ctx);
@eioo
eioo / rng.ts
Last active December 19, 2018 19:24
import { promisify } from 'util';
import * as crypto from 'crypto';
import * as path from 'path';
import * as puppeteer from 'puppeteer';
import * as fs from 'fs';
interface ITargets {
targetInfos: any;
}
body {
background: cyan;
}
button {
padding: 20px 10px;
}
interface IExtendedChart extends Chart {
scales: Chart.ChartScales;
chart: Chart;
width: number;
}
interface IExtendedChartConfig extends Chart.ChartConfiguration {
lineAtY: Array<number>;
}
import * as childProcess from 'child_process';
import * as express from 'express';
import * as util from 'util';
const exec = util.promisify(childProcess.exec);
const DEPLOY_FOLDER = 'X:\\Desktop\\Tuplabotti-Jr';
const PORT = 2840;
class WebHook {
lastProcess: childProcess.ChildProcess;
function hexRgb(hexColor) {
const color = hexColor.startsWith('#') ? hexColor.substr(1) : hexColor;
if (color.length === 3) {
return color.match(/.{1,1}/g).map(hex => parseInt(hex + hex, 16));
} else if (color.length === 6) {
return color.match(/.{1,2}/g).map(hex => parseInt(hex, 16));
}
}