Install privoxy and configure it to use "Fanboy's Adblock List" Adblock Plus list. You can convert these to work with privoxy.
Install proxychains or a program like it, that will send all connections a program makes through the proxy.
Then like start the spotify like
proxychains spotify
Ya, there may not be. It will refress every second.
Just start it and leave it running in a shell. Then start spotify and watch for connections being made.
It works! Thanks!
But I blocked all the urls I can see accessed, and yet some banners still show.
]]>Just start it and leave it running in a shell. Then start spotify and watch for connections being made.
Maybe I made it all to complicated.
Just run this in a shell and watch everything.
netstat -p TCP -veWc
read -p 'what is the name of the program you want to watch? ' pname && netstat -p TCP -veWc |grep $pname
read -p spotify pname && netstat -p TCP -veWc |grep $pname
Is not going to work. That is why I put...
read -p 'what is the name of the program you want to watch? ' pname && netstat -p TCP -veWc |grep $pname
The `read` command is printing...
what is the name of the program you want to watch?
And saving the value of what ever you type to the variable $pname until you hit the enter key
Then runs this command only if the read command compleated without errors
netstat -p TCP -veWc
Then pipes the output into grep, which will parse the output for the value of $pname
]]>$ read -p spotify pname && netstat -p TCP -veWc |grep $pname
spotify
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
$
read -p 'what is the name of the program you want to watch? ' pname && netstat -p TCP -veWc |grep $pname
Really though, it is just grep'ing for the string you enter. So, you could just type http or whatever. The -c flag will update every 1 second.
This may not be exacticaly what you are looking for. However, you can now see that by stringing commands together you will be able to get what you want. You may have better luck with tshark instead of netstat (pacman -S wireshark-cli)
Here is some samle output..
tcp 0 0 archpc:52605 a23-0-12-164.deploy.akamaitechnologies.com:www-http TIME_WAIT root 0 -
tcp 0 0 archpc:37206 165.254.47.120:www-http TIME_WAIT root 0 -
tcp 0 0 archpc:37205 165.254.47.120:www-http TIME_WAIT root 0 -
tcp 0 0 archpc:56170 alderaan.archlinux.org:https ESTABLISHED user 1403647 1904/firefox
tcp 0 0 archpc:37208 165.254.47.120:www-http TIME_WAIT root 0 -
tcp 0 0 archpc:52728 98.124.248.70:https ESTABLISHED user 1401832 1904/firefox
tcp 0 0 archpc:56163 alderaan.archlinux.org:https ESTABLISHED user 1403639 1904/firefox
tcp 0 0 archpc:56171 alderaan.archlinux.org:https ESTABLISHED user 1406176 1904/firefox
tcp 0 0 archpc:56169 alderaan.archlinux.org:https ESTABLISHED user 1406175 1904/firefox
tcp 0 0 archpc:56168 alderaan.archlinux.org:https ESTABLISHED user 1403644 1904/firefox
tcp 0 0 archpc:37207 165.254.47.120:www-http TIME_WAIT root 0 -
tcp 0 0 archpc:56159 alderaan.archlinux.org:https ESTABLISHED user 1403634 1904/firefox
tcp 0 0 archpc:56164 alderaan.archlinux.org:https ESTABLISHED user 1403641 1904/firefox
netstat: no support for `AF INET (sctp)' on this system.
netstat: no support for `AF INET (sctp)' on this system.
netstat: no support for `AF IPX' on this system.
netstat: no support for `AF AX25' on this system.
netstat: no support for `AF X25' on this system.
netstat: no support for `AF NETROM' on this system.
Also make sure not to do any network activity while logging to keep useless hits to a minimum.
]]>