def do(self, arg): ".exchain - Show the SEH chain" thread = self.get_thread_from_prefix() print "Exception handlers for thread %d" % thread.get_tid() print table = Table() table.addRow("Block", "Function") bits = thread.get_bits() for (seh, seh_func) in thread.get_seh_chain(): if seh is not None: seh = HexDump.address(seh, bits) if seh_func is not None: seh_func = HexDump.address(seh_func, bits) table.addRow(seh, seh_func) print table.getOutput()
def do(self, arg): ".exchain - Show the SEH chain" thread = self.get_thread_from_prefix() print "Exception handlers for thread %d" % thread.get_tid() print table = Table() table.addRow("Block", "Function") bits = thread.get_bits() for (seh, seh_func) in thread.get_seh_chain(): if seh is not None: seh = HexDump.address(seh, bits) if seh_func is not None: seh_func = HexDump.address(seh_func, bits) table.addRow(seh, seh_func) print table.getOutput()
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. from winappdbg import Table # Instance a Table object. table = Table() # Add a few rows. table.addRow( "Right justified column text", "Left justified column text" ) table.addRow( "---------------------------", "--------------------------" ) table.addRow( "example", "text" ) table.addRow( "jabberwocky", "snark" ) table.addRow( "Trillian", "Zaphod", "Arthur Dent" ) # one extra! table.addRow( "Dalek", "Cyberman" ) # By default all columns are left justified. Let's change that. table.justify( 0, 1 ) # column 0 is now right justified # Let's find out how wide the table is. print "Table width: %d" % table.getWidth() # Let's find out how many bytes would it be if written to a file. print "Text size in characters: %d" % len( table.getOutput() ) # Show the table contents on screen. print table.show(),