Private browsing

Tips and Tricks for Networking

Moderator: jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Private browsing

Postby viking60 » 26 Mar 2012, 17:35

I also remembered the flash cookies (LSO=Local Shared Objects). These cookies are rude, and ignore your "I do not want cookies" settings. These cookies can even be used to restore those normal cookies that you have blocked. It seems fitting to mention them here and inform everybody that those cookies are stored in:

Code: Select all

~/.macromedia/Flash_Player/#SharedObjects/


Flash cookies are traditionally used to tell others what flash movies you are watching. And they can be used for bad things too.
I have noticed a tendency among spammers to promote harmless internet flash games. They get a lot of info about what you like to play from those cookies and hopefully nothing more.

Now FireFox has the Better privacy plugin - and that is now obsolete and not compatible with Firefox 10 (Just when you felt safe again :-D ). This will happen from time to time so the best way of dealing with it is to delete the #SharedObjects directory with a cron job.

Code: Select all

EDITOR=nano crontab -e

and add the line

Code: Select all

*/30 * * * * rm -R /home/thomas/.macromedia/Flash_Player/#SharedObjects

This will erase the LSO's every half hour and you will not miss them (maybe with the exception of Skype).
They will be auto-created the moment you start playing a flash game or something again (that places LSO's)
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: Private browsing

Postby rolf » 27 Mar 2012, 00:00

rm -R /home/<user>/.macromedia/Flash_Player/#SharedObjects


Don't you need the -f option? Whenever I rm w/o -f, I get prompted to confirm the removal of every file that is found in the given path. :confused

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Private browsing

Postby viking60 » 27 Mar 2012, 00:17

Hmm that makes sense :think: But (strangely) it works without any confirmation. Using -f could not hurt . just to make sure.
But in any case you inspired me. If you chmod the directory so it is unwritable then the supercookies will be kept out forever I guess. Must try that......

Sneaky little bastards; chmoding does not stop them:

Code: Select all

chmod -R o-r '#SharedObjects'

Code: Select all

chmod -R -r '#SharedObjects'

does not help, supercookies are created anyway is my chmod command wrong?
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: Private browsing

Postby rolf » 27 Mar 2012, 02:01

Maybe Better Privacy is still working for you?

Code: Select all

[rolf@localhost tmp]$ mkdir -p 1/2/3/4/5
[rolf@localhost tmp]$ touch 1/2/3/4/5/file
[rolf@localhost tmp]$ rm -R 1
rm: descend into directory `1'? y
rm: descend into directory `1/2'? y
rm: descend into directory `1/2/3'? y
rm: descend into directory `1/2/3/4'? y
rm: descend into directory `1/2/3/4/5'? y
rm: remove regular empty file `1/2/3/4/5/file'? y
rm: remove directory `1/2/3/4/5'? y
rm: remove directory `1/2/3/4'? y
rm: remove directory `1/2/3'? y
rm: remove directory `1/2'? y
rm: remove directory `1'? y
:whistle:

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Private browsing

Postby viking60 » 27 Mar 2012, 02:12

Caramba!
Yes on this box it does (not on the other Mandriva box I tested earlier - I think). This is strange in FF10 Better Privacy does not work and has status as deactivated, and in FF11 it does work again. :confused
Deactivating Better Privacy on this box and trying again.....

Code: Select all

[thomas@heidi-lap Flash_Player]$ ls
'#SharedObjects'/  macromedia.com/
[thomas@heidi-lap Flash_Player]$ rm -R /home/thomas/.macromedia/Flash_Player/#SharedObjects
[thomas@heidi-lap Flash_Player]$ ls
macromedia.com/
[thomas@heidi-lap Flash_Player]$

Better Privacy is deactivated :-D I wonder if there is some built in evil in that directory. On every other directory you are right of course.
To check go to this site and play a game that one of our dear spammers is recommending. In Dolphin/Nautilus you will see directories popping up in
/home/<user>/.macromedia/Flash_Player/#SharedObjects if you do a

Code: Select all

rm -R /home/rolf/.macromedia/Flash_Player/#SharedObjects


They will disappear - If they don't I'll eat my socks! (Of course the directory will pop right back again once you start a new game. :f )
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: Private browsing

Postby dedanna1029 » 27 Mar 2012, 05:25

rolf wrote:Don't you need the -f option? Whenever I rm w/o -f, I get prompted to confirm the removal of every file that is found in the given path. :confused

Interesting it does that to you. The -f option makes it to ignore nonexistent files:
rm --help wrote:-f, --force ignore nonexistent files, never prompt

My own impression is that -f would make it never prompt for nonexistent files. I wonder if that's why it does that to you without it? I don't know?
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Private browsing

Postby viking60 » 27 Mar 2012, 10:36

I believe forcing is the main function of -f so our Guru is right in principle (he always is), but not in this case afaict.
But this is a rather academic discussion; to make all happy we can do the cronjob like this:
:A

Code: Select all

*/30 * * * * rm -R -f /home/<USER>/.macromedia/Flash_Player/#SharedObjects

That is probably the best thing to do - who are we to question the Guru (He did demonstrate that he is right above - this directory must be special).
In fact it is better to delete the standard Flash_Player directory too that keeps track of the other LSO's so this is even better:

Code: Select all

*/30 * * * * rm -R -f /home/<USER>/.macromedia/Flash_Player
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: Private browsing

Postby rolf » 27 Mar 2012, 13:30

Code: Select all

[rolf@localhost ~]$ alias rm
alias rm='rm -i'


That explains one confusion. Mandr[ake|iva] has always made this alias for 'rm' for safety's sake.

From the manual,

Code: Select all

-i     prompt before every removal


Also,

Code: Select all

-f, --force
              ignore nonexistent files, never prompt


Those are two separate effects of the -f switch. However,

Code: Select all

If the -I or --interactive=once option is given, and there are more than three files or the -r,
       -R,  or  --recursive are given, then rm prompts the user for whether to proceed with the entire
       operation.  If the response is not affirmative, the entire command is aborted.


and that seems to state that -R will trigger prompting for confirmation. :confused

Sometimes, I find the manual to be not in agreement with how the command is currently working, sometimes, there is something like an alias working behind the scenes, or, since this is a cron job, maybe you are just not seeing a prompt for confirmation or cron has special effects....

Can you put a file in that directory and run your original command w/o -f on cli, show the evidence of what happens? :coffee_cup:

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Private browsing

Postby viking60 » 27 Mar 2012, 14:07

Ah yes good find! Funny thing I do not have that alias in my Mandriva 2010.2 wich was originally installed as 2009 and has been upgraded since.
But it is a default alias in Mandriva 2011. :confused
as you can see the files are removed without -f

Code: Select all

.:[ thomas@thomas-pc : 15:17:55 : ~/.macromedia/Flash_Player ]:.
:) ls
'#SharedObjects'/  macromedia.com/
.:[ thomas@thomas-pc : 15:18:01 : ~/.macromedia/Flash_Player ]:.
:) cd '#SharedObjects'
.:[ thomas@thomas-pc : 15:18:32 : ~/.macromedia/Flash_Player/#SharedObjects ]:.
:) ls
RSRDWEEJ/
.:[ thomas@thomas-pc : 15:18:36 : ~/.macromedia/Flash_Player/#SharedObjects ]:.
:) rm -R /home/thomas/.macromedia/Flash_Player/
.:[ thomas@thomas-pc : 15:19:32 : ~/.macromedia/Flash_Player/#SharedObjects ]:.
:) ls
.:[ thomas@thomas-pc : 15:19:36 : ~/.macromedia/Flash_Player/#SharedObjects ]:.
:)

Now I am going to do it with the rm alias.........
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: Private browsing

Postby rolf » 27 Mar 2012, 14:17

viking60 wrote:Funny thing I do not have that alias in my Mandriva 2010.2 wich was originally installed as 2009 and has been upgraded since.
But it is a default alias in Mandriva 2011. :confused
Going on with my homework now....


Well, my memory might be faulty but I can't remember a time when I didn't have to add -f or deal with the prompt to verify. No pannekakers until you finish your homework. :gimme

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Private browsing

Postby viking60 » 27 Mar 2012, 14:35

finishing ...

Code: Select all

.:[ thomas@thomas-pc : 15:24:35 : ~/.macromedia/Flash_Player ]:.
:) ls
macromedia.com/  '#SharedObjects'/
.:[ thomas@thomas-pc : 15:24:36 : ~/.macromedia/Flash_Player ]:.
:) cd '#SharedObjects'
.:[ thomas@thomas-pc : 15:24:51 : ~/.macromedia/Flash_Player/#SharedObjects ]:.
:) ls
574PR3MN/
.:[ thomas@thomas-pc : 15:24:54 : ~/.macromedia/Flash_Player/#SharedObjects ]:.
:) cd..
.:[ thomas@thomas-pc : 15:25:06 : ~/.macromedia/Flash_Player ]:.
:) ls
macromedia.com/  '#SharedObjects'/
.:[ thomas@thomas-pc : 15:25:07 : ~/.macromedia/Flash_Player ]:.
:) rm -R /home/thomas/.macromedia/Flash_Player/
rm: descend into directory «/home/thomas/.macromedia/Flash_Player»?

And there we have it; the prompting that you describe making the cronjob hopeless +1

Now with the -f switch forcing the action:

Code: Select all

.:[ thomas@thomas-pc : 15:28:51 : ~/.macromedia/Flash_Player ]:.
:) ls
macromedia.com/  '#SharedObjects'/
.:[ thomas@thomas-pc : 15:28:56 : ~/.macromedia/Flash_Player ]:.
:) rm -R -f /home/thomas/.macromedia/Flash_Player/
.:[ thomas@thomas-pc : 15:29:08 : ~/.macromedia/Flash_Player ]:.
:) ls
.:[ thomas@thomas-pc : 15:29:15 : ~/.macromedia/Flash_Player ]:.
:)

As you can see it went smoothly (there was content in the removed directories). So you are absolutely right it is the alias alias rm='rm -i' that causes this to happen.
SInce it is a security feature of a major distro ( can't remember that I ever removed that alias though :think: ) your are then by definition also right that the cronjob should look like this to fit globaly on all distros:

Code: Select all

*/30 * * * * rm -R -f /home/<USER>/.macromedia/Flash_Player


Pannekaker please :gimme
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: Private browsing

Postby rolf » 27 Mar 2012, 15:30

You earned it, Little Thomas :A

Image

but better not dawdle!

Image


Return to “Networking”