Giter Site home page Giter Site logo

Comments (6)

haoliutj avatar haoliutj commented on June 17, 2024 1

Hi,

Thank you so much! truly appreciate!
I actually don't understand the grammar or the functionality here of this line "lief_adv: lief.PE.Binary = lief.PE.parse(x_adv[0])". I guess it will convert a list of integer (the input I have) to a PE file (but in which format).
and in "lief_adv: lief.PE.Binary" really confused me, what the ":" for ?

Again, thank you! excellent project here!

from secml_malware.

haoliutj avatar haoliutj commented on June 17, 2024

the error derails:

"compute_black_box_optimization
fitnesses = [self.problem.fitness(np.array(t)) for t in pop]
File "/secml_malware/secml_malware/attack/blackbox/ga/c_base_genetic_engine.py", line 167, in
fitnesses = [self.problem.fitness(np.array(t)) for t in pop]
File "
/secml_malware/secml_malware/attack/blackbox/c_blackbox_problem.py", line 51, in fitness
candidate = self.apply_feasible_manipulations(t, self._original_x)
File "/~/secml_malware/secml_malware/attack/blackbox/c_gamma_sections_evasion.py", line 58, in apply_feasible_manipulations
lief_adv: lief.PE.Binary = lief.PE.parse(x_adv[0])
TypeError: [77.0, 90.0, 144.0, ...] "

from secml_malware.

zangobot avatar zangobot commented on June 17, 2024

Hi!
Thank you for the issue, I will investigate this very soon.
Lief only works with either a list of integers, either with a path... so I need to investigate what's happening there.
Stay tuned!

from secml_malware.

zangobot avatar zangobot commented on June 17, 2024

It's Python type annotation.
Since I use an IDE for writing code, it is useful to let the software know thee type of this object, and so it helps me with auto-completion.
I will work on that bug as soon as possible!

from secml_malware.

zangobot avatar zangobot commented on June 17, 2024

So, I'm debugging a bit, I'll let you know!

Thank you for making me notice! :)

from secml_malware.

zangobot avatar zangobot commented on June 17, 2024

Fixed!
There was a wrong reshape.
Thank you again!

from secml_malware.

Related Issues (20)

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.