Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(5)  |  Derive(0)  |  Import(3)

src/f/u/fusil-1.5/fusil/unicode_generator.py   fusil(Download)
from fusil.bytes_generator import Generator
from ptrace.six import text_type, unichr
from ptrace.six.moves import range as xrange
from random import choice, randint
 
def createCharset(start, stop):
    return set(u''.join( unichr(code) for code in xrange(start, stop+1) ))
    def _createValue(self, length):
        if 1 < len(self.charset):
            return u''.join( choice(self.charset)
                for index in xrange(length) )
        else:

src/f/u/fusil-1.5/fusil/mangle.py   fusil(Download)
from array import array
from fusil.mangle_agent import MangleAgent
from fusil.mangle_op import SPECIAL_VALUES, MAX_INCR
from fusil.tools import minmax
from ptrace.six.moves import range as xrange
    def mangle_insert_bytes(self):
        offset = self.offset()
        count = randint(1, self.config.max_insert_bytes)
        for index in xrange(count):
            self.data.insert(offset, self.generateByte())
            return 0
        count = randint(self.config.min_op, self.config.max_op)
        for index in xrange(count):
            operation = choice(operations)
            operation()

src/f/u/fusil-1.5/fusil/mangle_agent.py   fusil(Download)
from os import fstat
from ptrace.six import string_types
from ptrace.six.moves import range as xrange
from random import choice
from stat import ST_SIZE
    def mangle(self):
        filenames = []
        for file_index in xrange(self.nb_file):
            filename = choice(self.source_filenames)
            data = self.readData(filename, file_index)