#!/usr/bin/env python3

__author__ = "<NAME>"
__copyright__ = "Copyright 2021, ROPD Project"
__license__ = "BSD 2-clause"
__email__ = "<EMAIL>"

from binascii import unhexlify, hexlify
from enum import Enum
from . import Arch

class GadgetBox(object):
    def __init__(self, gadget, value=None):
        self.gadget = gadget
        self.value = value

    def dump(self):
        return 'Using: ' + str(self.value)+ '\n' + self.gadget.dump()


    def __eq__(self, other):
        return type(self) == type(other) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Overrides the default implementation (unnecessary in Python 3)"""
        return not self.__eq__(other)

    def __hash__(self):
        """Overrides the default implementation"""
        return hash(tuple(sorted(self.__dict__.items())))

#!/usr/bin/env python3

__author__ = "<NAME>"
__copyright__ = "Copyright 2021, ROPD Project"
__license__ = "BSD 2-clause"
__email__ = "<EMAIL>"

from binascii import unhexlify, hexlify
from enum import Enum
from . import Arch

class GadgetBox(object):
    def __init__(self, gadget, value=None):
        self.gadget = gadget
        self.value = value

    def dump(self):
        return 'Using: ' + str(self.value)+ '\n' + self.gadget.dump()


    def __eq__(self, other):
        return type(self) == type(other) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Overrides the default implementation (unnecessary in Python 3)"""
        return not self.__eq__(other)

    def __hash__(self):
        """Overrides the default implementation"""
        return hash(tuple(sorted(self.__dict__.items())))

#!/usr/bin/env python3 Overrides the default implementation (unnecessary in Python 3) Overrides the default implementation