Skip to content

Instantly share code, notes, and snippets.

'''
Created on Apr 21, 2009
@author: gr00vy
'''
from sets import Set
from time import sleep
JOB_STATE_FINISHED = 0
@agustingianni
agustingianni / Markov.py
Created November 8, 2009 21:24
Generador de passwords usando Cadenas de Markov
import numpy
import sys
import string
import random
class Markov:
def __init__(self):
self.P = {}
def Parse(self, filename):
137633271a
2609197
alip
i7535
lio
orbor_82
esde
9599660
adretsb
01089c
derivada :: (Double -> Double) -> Double -> Double -> Double
derivada f x0 h = (f (x0 + h) - f x0) / (2*h)
newton :: (Double -> Double) -> Double -> Double
mewton f x0 = x0 - (f x0 / (derivada f x0))
-- Derivada numerica en x0 con paso h
-- http://en.wikipedia.org/wiki/Numerical_differentiation
derivada :: (Double -> Double) -> Double -> Double -> Double
derivada f x0 h = (f (x0 + h) - f x0) / (2*h)
newton :: (Double -> Double) -> Double -> Double
newton f x0 = do
let x1 = x0 - (f x0 / (derivada f x0 0.01))
if abs (x1 - x0) < 0.001 then x1 else newton f x1
[gr00vy@kenny DisassemblerCPP]$ LD_LIBRARY_PATH=./ ./Debug/DisassemblerCPP /home/gr00vy/Code/for
Disassembly of section .init:
{
OPERAND_TYPE_IMMEDIATE | call 0xc | TARGET = 0xc
OPERAND_TYPE_IMMEDIATE | call 0x40 | TARGET = 0x40
OPERAND_TYPE_IMMEDIATE | call 0x108 | TARGET = 0x108
OPERAND_TYPE_IMMEDIATE | call 0x208 | TARGET = 0x208
}
BBlock_61: <61,0>
{
}
BBlock_29: <29,47>
{
call 0x40
call 0x108
call 0x208
pop eax
pop ebx
Disassembly of section .init:
{
BBlock_0: <0,29>
{
0: push ebp
1: mov ebp,esp
3: push ebx
4: sub esp,0x4
7: call 0xc
12: pop ebx
#include <string>
#include <ostream>
#include <sstream>
#include <iostream>
using namespace std;
enum SymbolType
{
SYMBOL_TYPE_NONE,
while (analisysQueue.empty() == false)
{
// Sacamos un entry point
entry_point = analisysQueue.front();
// Obtenemos una referencia a la seccion qeu contiene el entry point
section = sections->getSectionByAddress(entry_point->getValue());
// symbolo no pertenece a ninguna seccion, skippeamos
if (!section)