Code Monkey home page Code Monkey logo

ebpfshield's Introduction

ebpfshield's People

Contributors

sagarbhure 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ebpfshield's Issues

some minor issues and their resolution

There's a dependency not mentioned for this to be installed: argcomplete (Python package), or via apt it's python3-argcomplete

The last line in update_feeds.sh requires a lower case -v command line parameter, not the upper case for the list of web crawlers.

helpers.py needs a minor tweak to make it work with empty lines and comment lines in the web crawler file:

-            if line and line[0] == "#":
-                continue
-
-            self.addresses.append(self.ip2int(line))
+            if line and line[0] != "#":
+                self.addresses.append(self.ip2int(line))

ImportError: cannot import name 'BPF' from 'bcc' (unknown location)

I have built bcc from source.
The directory where it was built was:
/home/pegasus_vm/Documents/eBPFShield/bcc/build
When I try to run python main.py -h
It throws the following error:
ImportError: cannot import name 'BPF' from 'bcc' (unknown location)
How to fix it?

ValueError: invalid literal for int() with base 10: 'curl 8'

When I try to run the first example I found the following errors:

pegasus_vm@pegasusvm:~/Documents/eBPFShield$ python3 main.py  --feature ebpf_ipintelligence --block kill
Traceback (most recent call last):
  File "/home/pegasus_vm/Documents/eBPFShield/main.py", line 350, in <module>
    lists.append(TaggedIpList(feed, handle))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pegasus_vm/Documents/eBPFShield/ebpfshield/helpers.py", line 14, in __init__
    self.addresses.append(self.ip2int(line))
                          ^^^^^^^^^^^^^^^^^
  File "/home/pegasus_vm/Documents/eBPFShield/ebpfshield/helpers.py", line 36, in ip2int
    return reduce(lambda out, x: (out << 8) + int(x), ip.split('.'), 0)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pegasus_vm/Documents/eBPFShield/ebpfshield/helpers.py", line 36, in <lambda>
    return reduce(lambda out, x: (out << 8) + int(x), ip.split('.'), 0)
                                              ^^^^^^
ValueError: invalid literal for int() with base 10: 'curl 8'

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.