You are not logged in.

#1 2011-11-17 17:57:48

tlvince
Member
Registered: 2010-07-06
Posts: 68
Website

sniffy - Youtube (and friends) without Flash

sniffy monitors network traffic for media hosting websites and streams them in your favourite media player.

More info and source
PKGBUILD

Criticism welcome smile

Offline

#2 2011-11-17 22:40:29

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

Re: sniffy - Youtube (and friends) without Flash

I'm trying to use sniffy (in a framebuffer virtual terminal if that
matters), but this happens:

% sniffy -i wlan0 -m fbff
wlan0: You don't have permission to capture on that device (socket: Operation not permitted)                                                                                                                                       

(fbff is my video player.) I don't think you would have intended users
to run sniffy as root. Do I have to add myself to an appropriate
group?


Registed Linux User 483618

Offline

#3 2011-11-17 23:02:10

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 239
Website

Re: sniffy - Youtube (and friends) without Flash

README wrote:

Usage

Install pypcap and quvi
Run sniffy as root (it'll drop privileges as soon as it can)
Browse the supported sites

Offline

#4 2011-11-17 23:03:00

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: sniffy - Youtube (and friends) without Flash

From the website:

Usage

Install pypcap and quvi
Run sniffy as root (it'll drop privileges as soon as it can)
Browse the supported sites

-- EDIT --

Beaten by a few secs by knopwob...

Last edited by mhertz (2011-11-17 23:04:50)

Offline

#5 2011-11-18 11:21:40

tlvince
Member
Registered: 2010-07-06
Posts: 68
Website

Re: sniffy - Youtube (and friends) without Flash

Sara wrote:

(fbff is my video player.) I don't think you would have intended users to run sniffy as root. Do I have to add myself to an appropriate group?

sniffy/pypcap (rightly) needs root permissions to monitor your network device (but drops root before any damage can be done). Though using groups would be nicer. I have a look into that.

Offline

#6 2011-11-18 12:50:49

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

Re: sniffy - Youtube (and friends) without Flash

tlvince wrote:
Sara wrote:

(fbff is my video player.) I don't think you would have intended users to run sniffy as root. Do I have to add myself to an appropriate group?

sniffy/pypcap (rightly) needs root permissions to monitor your network device (but drops root before any damage can be done). Though using groups would be nicer. I have a look into that.

I tried sniffy, but even with it running, absolutely nothing played.
It's not a problem with my preferred video player, as I installed
mplayer, with the same result. ytmp worked, but the video kept
stopping and starting, as I kept losing my internet connection.
However, playing the (YouTube) video with the link given by
"youtube-dl -g $1", where "$1" was feeded from my browser w3m, played
the entire video flawlessly, without making me lose my internet
connection (I have high-speed, and unlimited data internet.)

Hopefully this isn't a hard issue to fix.

I would have posted some debugging information, but even with using
"-l DEBUG", I didn't get any output from sniffy, except for once or
twice (but I didn't save the output those two times as I expected I
would be able to reproduce the output, and couldn't.)

Last edited by Sara (2011-11-18 12:57:20)


Registed Linux User 483618

Offline

#7 2011-11-18 13:21:56

tlvince
Member
Registered: 2010-07-06
Posts: 68
Website

Re: sniffy - Youtube (and friends) without Flash

I'm in the middle of writing an rc.d script for sniffy and have experienced the same behaviour as you describe. MPlayer reports "vo: couldn't open the X11 display (:0)"  and falls back to vo_caca.

Are you running sniffy with sudo? It works (for me) as intended this way

Offline

#8 2011-11-18 14:29:48

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

Re: sniffy - Youtube (and friends) without Flash

tlvince wrote:

Are you running sniffy with sudo? It works (for me) as intended this way

Yes, with sudo, and more specifically, "sudo sniffy -i wlan0" when I
tried with mplayer, and "sudo sniffy -i wlan0 -m fbff" when I tried
with my default video player.


Registed Linux User 483618

Offline

#9 2011-11-18 19:05:58

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: sniffy - Youtube (and friends) without Flash

Really nice... it seems to work fine, except that my videos have no sound hmm


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#10 2011-11-18 21:30:49

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: sniffy - Youtube (and friends) without Flash

Well, that was unexpected...I had to edit the PKBUILD to allow x86_64 for pypcap-svn...then installed sniffy...then 'sudo sniffy -i wlan0'...then instant kernel panic. Hummm. Love to try it, though!
x86_64, using rt73usb wireless driver.

Scott

Offline

#11 2011-11-19 13:07:04

tlvince
Member
Registered: 2010-07-06
Posts: 68
Website

Re: sniffy - Youtube (and friends) without Flash

Sara wrote:

"sudo sniffy -i wlan0 -m fbff" when I tried with my default video player.

There was a bug whereby "-m" would be ignored and always use mplayer. Try the latest version (not sure what AUR helper you use, but in aurget it's quite easy: aurget --rebuild --devel -S python2-sniffy-git)

Rasi wrote:

Really nice... it seems to work fine, except that my videos have no sound hmm

Do you use an audio system other than ALSA? I suspect this is a problem with drop_privileges(). It's giving me a lot of grief sad

firecat53 wrote:

Well, that was unexpected...I had to edit the PKBUILD to allow x86_64 for pypcap-svn...then installed sniffy...then 'sudo sniffy -i wlan0'...then instant kernel panic.

Lets try to isolate the issue. Does the kernel panic occur if you follow the pypcap example? (You can ignore the dpkt bits).

Last edited by tlvince (2011-11-19 13:09:43)

Offline

#12 2011-11-19 23:12:23

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: sniffy - Youtube (and friends) without Flash

Definitely pypcap...installed fine, imported fine (with sudo ipython2), then as soon as I did pc=pcap.pcap() it panicked.

Scott

Edit: tried on my x86_64 laptop which uses the b43 wireless driver and it worked fine. Must be something with the rt73usb driver. Also, sniffy doesn't seem to play well with dwm...unless I'm just missing an mplayer command line switch somewhere. It freezes one tag for 15-30 seconds before the video finally starts.

Last edited by firecat53 (2011-11-20 00:18:17)

Offline

#13 2011-11-23 11:35:39

tlvince
Member
Registered: 2010-07-06
Posts: 68
Website

Re: sniffy - Youtube (and friends) without Flash

firecat53 wrote:

Definitely pypcap...installed fine, imported fine (with sudo ipython2), then as soon as I did pc=pcap.pcap() it panicked..

In that case, it's either an issue with pypcap, or more likely, the underlying libpcap modules. I'd try contacting the latter.

firecat53 wrote:

Also, sniffy doesn't seem to play well with dwm...

Hmm, I'm using dwm myself and haven't noticed any issues. Does the same happen if you play a video directly in mplayer? How about if you try: sudo sniffy -m mplayer -q default?

Offline

#14 2011-11-23 13:22:35

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: sniffy - Youtube (and friends) without Flash

Mplayer doesn't show up for me but I can hear sound. Same thing with sudo sniffy -m mplayer -q default. Mplayer works if I play a video directly.

Offline

Board footer

Powered by FluxBB