Giter Site home page Giter Site logo

p0fclient's People

Contributors

bonsaiviking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

qboy0000

p0fclient's Issues

Could not make it work..

Just wanted to say first that this idea is really great because it allows me to introduce p0f in any python project.
Maybe I was doing something incorrectly..
I launched :
p0f as sudo ./p0f -i br0 -s "/var/run/p0f.sock" -d -u alis -o /var/log/p0f.log
where ls -la "/var/run/p0f.sock" :
srw-rw-rw- 1 root root 0 Nov 20 22:57 /var/run/p0f.sock

Then, installed p0f-client and launched it as :
p0f-client /var/run/p0f.sock 192.168.2.4
/var/run/p0f.sock
Traceback (most recent call last):
File "/usr/local/bin/p0f-client", line 16, in
info = p0f.query(addr)
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 77, in query
a = ipaddr.IPAddress(ip)
File "/usr/local/lib/python2.7/dist-packages/ipaddr.py", line 78, in IPAddress
address)
ValueError: '/var/run/p0f.sock' does not appear to be an IPv4 or IPv6 address

but if i try without specifying "/var/run/p0f.sock" as :
p0f-client 192.168.2.4

/var/run/p0f.sock
Traceback (most recent call last):
File "/usr/local/bin/p0f-client", line 16, in
info = p0f.query(addr)
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 83, in query
return self.parse_response( self.sock.recv(232) )
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 48, in parse_response
raise CommError, "Bad query"
p0fclient.p0fclient.CommError: Bad query

netstat returns :
sudo netstat -lapn | grep p0f
unix 2 [ ACC ] STREAM LISTENING 702256798 5027/p0f /var/run/p0f.sock

Software is not working, Giving Errors.

As I ran p0f-client 192.168.5.136

I got the following:

Traceback (most recent call last):
File "/usr/local/bin/p0f-client", line 16, in
info = p0f.query(addr)
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 84, in query
return self.parse_response( self.sock.recv(232) )
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 48, in parse_response
raise CommError, "Bad query"
p0fclient.p0fclient.CommError: Bad query

I did not specify the socket because the socket is at the default location.

As I uncommented the try & exception clause I got the following error instead:

Traceback (most recent call last):
File "/usr/local/bin/p0f-client", line 17, in
info = p0f.query(addr)
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 82, in query
return self.parse_response( self.sock.recv(232) )
File "/usr/local/lib/python2.7/dist-packages/p0fclient/p0fclient.py", line 52, in parse_response
info = struct.unpack_from("7L h 2b 32s 32s 32s 32s 32s 32s", blob, 8)
struct.error: unpack_from requires a buffer of at least 252 bytes

I tried to change the buffer size to 252 but that did not work either.

Please help. @bonsaiviking

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.