Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import string, datetime
myhash = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\\0fpiA:>.qDLuX;(?w <QkSr~3+_7%g2{z!C&)lYn}ZTmxs,5^jF@Nh`\'o$=U/"9MeWH8RJbOG#t]-6BI1y4Pv|[KVca*Ed\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
mydata = 'hY#NBB2}NNa2\xc3\xa92,L2a77Y2~a2F\xc3\xb3>$z{B2hFVa2zYL2z,$~{~Y2Y2z\xc3\xb3~$>Y2a2zY77$R{(hY#NBB2}NNa2\xc3\xa92Y,k7Y2a77Y2~a2F\xc3\xb3>$z{B24,{HkYN2L{$N2~aNNa2aM$Nk$7\xc3\xa3Y02&mEt{7{g\xc3\xa9HNO2aNNa2\xc3\xa92Y2zY~$>
@neriberto
neriberto / hashes.cpp
Created December 20, 2013 17:44
Hashes com OpenSSL
void calc_hash(LPCWSTR lpFileName, const char* algo, char* output)
{
HANDLE hFile = NULL;
DWORD cbRead = 0;
unsigned char *data;
size_t data_size;
hFile = CreateFile(lpFileName,
GENERIC_READ,
FILE_SHARE_READ,
@neriberto
neriberto / multithread.py
Created April 24, 2014 13:48
One attempt to work with multi thread in python
import threading
from time import sleep
finish = False
def thread1():
print "entrando thread1"
global finish
sleep(10)
print "acabou thread1"
@neriberto
neriberto / longpatth.py
Created June 5, 2014 13:49
Descobre o maior caminho no sistema operacional
import os
sizepath = 0;
longpath = None;
def calc(path):
global longpath
global sizepath
length = len(path)
if length > sizepath:
@neriberto
neriberto / MongoDB.md
Last active September 21, 2015 22:56
MongoDB Tips

Apagar um database:

use mydb; 
db.dropDatabase();

Pegar o último registro:

@neriberto
neriberto / bobp-python.md
Created April 26, 2017 23:48 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@neriberto
neriberto / all_hashes.txt
Last active June 12, 2018 20:29
Fake Adobe Reader - Samples and Yara rule
9d76abe0d6e2b32c5ca4b68fb263b9e915d341bea96c8d02a1c372ec60a11b5b
9ab7b12d3fb79f41bfaaf234073722884070445e00178b14a58cbf6611a821e3
3ec46840e0dbbe8b7f79b870344ca20c7653511d98151921ae9aa6e3d1f43fc8
398f0cfa814b31dd8d1483f0d60a2c9bf97ad20b992f14012abb2d4db6f46ca2
d011105bae9fb7a98c128c19389dd988aa83fa0558b8ca519a554b7bd6ee7747
10a49a952aadb510e6da0b87e7267c32bc38cbbbe571027836db75d5acabd8a4
11c87dde6d5900e47d93124624f2b20afcd9b5df4045c865ec582c3c536eec18
1a8e986ae10b6399a9ef7b08edf51c307e054ca43173e87a7c7e9b0c1b4ead65
2af473d18877c93a7acd9185bf38b50da526d56624b3a724894614ae1c9bd99a
fac03a0efd71af5e14f25c0d256e9fbfe80b46ef1b6e75a182afe49ec0b4c723
@neriberto
neriberto / test_apscheduler.py
Last active November 27, 2020 20:42
testing apscheduler
import logging
import os
import time
import pytz
from datetime import datetime
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.jobstores.memory import MemoryJobStore
from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
@neriberto
neriberto / vt_upload.py
Last active May 4, 2021 12:42
simple VT Upload
import os
import sys
import time
import requests
VT_API_KEY = "API_KEY_GOES_HERE"
VT_URL = "https://www.virustotal.com/api/v3/files"