Code Monkey home page Code Monkey logo

Comments (5)

CarlOlson avatar CarlOlson commented on July 19, 2024 2

Same issue on Ghidra 9.2

yara.py> Running...
Found : Big_Numbers0 - 0xdadb97 - 0x140db0197L
Traceback (most recent call last):
  File "/home/carl/git/ghidra_scripts/yara.py", line 53, in <module>
    add_bookmark_comment(vaddr, current_rule)
  File "/home/carl/git/ghidra_scripts/yara.py", line 30, in add_bookmark_comment
    cu.setComment(CodeUnit.EOL_COMMENT, text)
AttributeError: 'NoneType' object has no attribute 'setComment'
yara.py> Finished!

It works if I change yara.py:30 to this:

currentProgram.getListing().setComment(gaddr, CodeUnit.EOL_COMMENT, text)

from ghidra_scripts.

ettermyra avatar ettermyra commented on July 19, 2024

Got the same 'NoneType' object has no attribute 'setComment' error for the binwalk extension
Running Ghidra 9.0.2

from ghidra_scripts.

citizenstaar avatar citizenstaar commented on July 19, 2024

Got the same error. Running Ghidra 9.1

from ghidra_scripts.

Te-k avatar Te-k commented on July 19, 2024

Same here with Ghidra 9.1.2.

The error come from a bad conversion from physical address to logical address : yara returns a physical address in the binary, while you need the logical address to add bookmark and comment. The conversion here addr = currentProgram.minAddress.add(addr_int) does not work

from ghidra_scripts.

Te-k avatar Te-k commented on July 19, 2024

I have opened a ticket to check with Ghidra devs if there is a way to do that NationalSecurityAgency/ghidra#2067

from ghidra_scripts.

Related Issues (11)

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.