Skip to content

Instantly share code, notes, and snippets.

#include <time.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define ALPHABET_POWER 255
char *KeyGen(char *str){
size_t i;
char *key = (char *) malloc(sizeof(char) * strlen(str) + 1);
@dorosch
dorosch / email_exists.py
Last active March 27, 2016 16:07
Checking the mailbox existence for python2.x
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import smtplib
from os import system
def get_address_host(host):
""" Save all possible server to query """
@dorosch
dorosch / proxy.py
Created August 22, 2016 23:15
Proxy class
class Host(object):
"""
The class of for the object host-address.
Arguments:
host (str) - the target ip-address.
"""
def __init__(self, host):
self.ip = host
@dorosch
dorosch / tor-proxy.py
Created October 18, 2016 18:07
Использование Tor-а для доступа к сети .onion
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import socket
import urllib
import socks
url = "http://hss3uro2hsxfogfq.onion"
# -*- coding: utf-8 -*-
import os.path
import shelve
class Database(object):
"""Класс реализующий интерфейс к базе данных"""
import random
def group(sequence, by):
"""Случайно группирует последовательность по by-элементом"""
temp_sequence = sequence[:]
random.shuffle(temp_sequence)
return zip(*[iter(temp_sequence)] * by)
@dorosch
dorosch / heartbleed.py
Created April 6, 2017 19:34 — forked from eelsivart/heartbleed.py
Heartbleed (CVE-2014-0160) Test & Exploit Python Script
#!/usr/bin/python
# Modified by Travis Lee
# Last Updated: 4/21/14
# Version 1.16
#
# -changed output to display text only instead of hexdump and made it easier to read
# -added option to specify number of times to connect to server (to get more data)
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc...
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port)
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include "includes.h"
/**
* DT_DIR is defined in the file <unistd.h>, but it is not supported in ANSI C.
*/
#define DT_DIR 4
#define DT_FILE 8
#!/usr/bin/env ruby
class Graph
def initialize
@graph = {}
end
# Added as '{node => {some_node => weight, ...}}'
def add_node=(nodes)
base = nodes.keys[0]
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
import glob
def run_in_docker():
docker = [
'/etc/dpkg/dpkg.cfg.d/docker-*',
'/etc/apt/apt.conf.d/docker-*',
]