# Path: voidwalker/framework/patching/composer.py
# class CodeBlock(object):
#     def __init__(self, *instructions):
#         self._instructions = list(instructions)
# 
#     def __len__(self):
#         return len(self._instructions)
# 
#     def hex(self):
#         stream = ByteStream()
#         (x.assemble(stream) for x in self._instructions).next()
#         return ' '.join('%02x' % ord(x)
#                         for x in stream.buffer())
# 
#     def assemble(self):
#         stream = ByteStream()
#         (x.assemble(stream) for x in self._instructions).next()
#         return stream.buffer()
# 
# Path: voidwalker/framework/patching/snippet.py
# class Snippet(object):
#     def architectures(self):
#         raise NotImplementedError
# 
#     def implementation(self, architecture):
#         raise NotImplementedError
# 
#     @staticmethod
#     def description():
#         raise NotImplementedError
# 
#     @staticmethod
#     def name():
#         raise NotImplementedError
# 
# Path: voidwalker/framework/patching/snippet.py
# def register_snippet(cls):
#     _snippet_map[cls.name()] = cls()
#     return cls
# 
# Path: voidwalker/framework/platform/cpu.py
# class Register(object):
#     class StaticRegister(type(register), object):
# class Cpu(object):
# class CpuFactory(object):
# class CpuRepository(object):
#     def __init__(self, name):
#     def name(self):
#     def size(self):
#     def value(self):
#     def str(self):
# def create_static_register(register):
#         def __init__(self, name):
#         def size(self):
#         def value(self):
#     def __init__(self, cpu_factory, registers):
#     def architecture(cls):
#     def register(self, name):
#     def registers(self):
#     def stack_pointer(self):
#     def program_counter(self):
#     def create_cpu(self, architecture):
#     def create_register(self, cpu, register):
#     def __init__(self, cpu_factory):
#     def get_cpu(self, architecture):
# def register_cpu(cls):
# 
# Path: voidwalker/application/cpus/mips_instructions.py
# def nop(instruction):
# 
# Path: voidwalker/application/cpus/x86_instructions.py
# def nop(instruction):


from ...framework.patching.composer import CodeBlock
from ...framework.patching.snippet import Snippet
from ...framework.patching.snippet import register_snippet
from ...framework.platform.cpu import Architecture
from ..cpus import mips_instructions as mips
from ..cpus import x86_instructions as x86
# (void)walker nop snippets
# Copyright (C) 2012 David Holm <dholmster@gmail.com>

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.




@register_snippet
class NopSnippet(Snippet):
    _code = {Architecture.X86: CodeBlock(x86.nop()),

# Path: voidwalker/framework/patching/composer.py
# class CodeBlock(object):
#     def __init__(self, *instructions):
#         self._instructions = list(instructions)
# 
#     def __len__(self):
#         return len(self._instructions)
# 
#     def hex(self):
#         stream = ByteStream()
#         (x.assemble(stream) for x in self._instructions).next()
#         return ' '.join('%02x' % ord(x)
#                         for x in stream.buffer())
# 
#     def assemble(self):
#         stream = ByteStream()
#         (x.assemble(stream) for x in self._instructions).next()
#         return stream.buffer()
# 
# Path: voidwalker/framework/patching/snippet.py
# class Snippet(object):
#     def architectures(self):
#         raise NotImplementedError
# 
#     def implementation(self, architecture):
#         raise NotImplementedError
# 
#     @staticmethod
#     def description():
#         raise NotImplementedError
# 
#     @staticmethod
#     def name():
#         raise NotImplementedError
# 
# Path: voidwalker/framework/patching/snippet.py
# def register_snippet(cls):
#     _snippet_map[cls.name()] = cls()
#     return cls
# 
# Path: voidwalker/framework/platform/cpu.py
# class Register(object):
#     class StaticRegister(type(register), object):
# class Cpu(object):
# class CpuFactory(object):
# class CpuRepository(object):
#     def __init__(self, name):
#     def name(self):
#     def size(self):
#     def value(self):
#     def str(self):
# def create_static_register(register):
#         def __init__(self, name):
#         def size(self):
#         def value(self):
#     def __init__(self, cpu_factory, registers):
#     def architecture(cls):
#     def register(self, name):
#     def registers(self):
#     def stack_pointer(self):
#     def program_counter(self):
#     def create_cpu(self, architecture):
#     def create_register(self, cpu, register):
#     def __init__(self, cpu_factory):
#     def get_cpu(self, architecture):
# def register_cpu(cls):
# 
# Path: voidwalker/application/cpus/mips_instructions.py
# def nop(instruction):
# 
# Path: voidwalker/application/cpus/x86_instructions.py
# def nop(instruction):


# Path: voidwalker/application/patching/nop.py
from ...framework.patching.composer import CodeBlock
from ...framework.patching.snippet import Snippet
from ...framework.patching.snippet import register_snippet
from ...framework.platform.cpu import Architecture
from ..cpus import mips_instructions as mips
from ..cpus import x86_instructions as x86

# (void)walker nop snippets
# Copyright (C) 2012 David Holm <dholmster@gmail.com>

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.




@register_snippet
class NopSnippet(Snippet):
    _code = {Architecture.X86: CodeBlock(x86.nop()),

             Architecture.Mips: CodeBlock(mips.nop())}