Giter Club home page Giter Club logo

applysig's People

Contributors

nwmonster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

applysig's Issues

Is this still being maintained?

I noticed there are several outstanding pull requests. Is this script still being maintained? Thanks for your efforts, this is a fantastic script.

TypeError: getBytes(): 2nd arg can't be coerced to int

I took the liberty of patching the relevant code a bit quickly to find the problem:

    while funk is not None:
        funk_start = int(funk.entryPoint.toString(), 16)
        funk_end   = get_function_end(funk)
        print(funk_end)
        print(type(funk_end))
        funk_buf   = getBytes(parseAddress(hex(funk_start).strip('L')), (funk_end - funk_start + 0x100))
        #print('%x - %x' % (funk_start, funk_end))
        match_function(flirt, funk_buf, funk_start, funk_rename)
        funk = getFunctionAfter(funk)

Output:

ApplySig.py> Running...
Load File:/home/cocaine/Downloads/generated/n64-sdk-1.2/n64-sdk-1.2.sig
Parse Flirt File.....
Name:  n64-sdk-1.2
Count: 295
Apply Signatures.....
532676819
<type 'int'>
532677207
<type 'int'>
532678179
<type 'int'>
532678207
<type 'int'>
2751464787
<type 'long'>
Traceback (most recent call last):
  File "/home/cocaine/bin/Ghidra_Scripts/ApplySig.py", line 729, in <module>
    apply_sig(flirt)
  File "/home/cocaine/bin/Ghidra_Scripts/ApplySig.py", line 713, in apply_sig
    funk_buf   = getBytes(parseAddress(hex(funk_start).strip('L')), (funk_end - funk_start + 0x100))
TypeError: getBytes(): 2nd arg can't be coerced to int
ApplySig.py> Finished!

This reveals that funk_end is not guaranteed to be constrained to an int, and getBytes() clearly does not want to take a long as input.

This appears to be relevant when working on N64 titles when trying to apply the n64 SDK signatures to eliminate standard library calls.

Unable to demangle applied names

The demangler will not demangle symbols/labels applied with SourceType.USER_DEFINED. Setting to any other level will resolve this.

Null Pointer Exception

Uncaught Exception!
java.lang.NullPointerException
at org.python.core.Py.dispatchToChecker(Py.java:2490)
at org.python.core.Py.isInstance(Py.java:2347)
at org.python.core.builtin.isinstance(builtin.java:712)
at org.python.core.Py.exceptionToString(Py.java:1372)
at org.python.core.Py.exceptionToBytes(Py.java:1339)
at org.python.core.Py.displayException(Py.java:1316)
at org.python.core.PyException.printStackTrace(PyException.java:89)
at docking.DockingErrorDisplay.buildStackTrace(DockingErrorDisplay.java:146)
at docking.DockingErrorDisplay.createErrorDialog(DockingErrorDisplay.java:114)
at docking.DockingErrorDisplay.doShowDialog(DockingErrorDisplay.java:98)
at docking.DockingErrorDisplay.lambda$showDialog$0(DockingErrorDisplay.java:91)
at docking.DockingErrorDisplay$$Lambda$444/0000000000000000.run(Unknown Source)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:704)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Script fails to run on ghidra 9.1.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.