Results 1 to 9 of 9
  1. #1

    Stefan's Avatar
    Member Since
    May 09, 2007
    Location
    UK
    Posts
    116
    Specs:
    2.16Ghz Mac Book Pro
    Question Dealing with ad ware on Macs
    We're all well aware of the Mac's security when it comes to viruses but what about ad ware, trackers and all those other nasties that come with browsing the net? I use Ad-Aware SE on my PC which searches for things like tracking cookies, ad ware etc. Are Macs vulnerable to these as well. If so can anyone recommend any software for dealing with it? I did a quick scan on my PC last night and found 103 nasty little cookies and trackers - i certainly dont want these on my nice MBP.
    "Id rather have a bottle in front of me than a frontal lobotomy"

  2. #2

    mac57's Avatar
    Member Since
    Apr 29, 2006
    Location
    St. Somewhere
    Posts
    4,560
    Specs:
    iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM
    Tracking cookies and the like are an ongoing nuisance that Mac OS X can't protect you from. The only answer that I am aware of is to diligently clean up your cookies on a regular basis.

    For myself, being Linux friendly, and thus Terminal.app friendly, I have written a small Terminal script that does this for me. What I did was manually clean up my cookies until there were just the ones there that I wanted to preserve long term (things like my Mac Forums cookie, certain bank site cookies and so on). Then I went into my Firefox directory (I use Firefox pretty exclusively these days) and made a copy of my cookies.txt file (where Firefox keeps the cookies) called cookies.persist.txt. Then I wrote a small Terminal script called "clean" which basically reverses this process - it copies cookies.persist.txt to cookies.txt, thus wiping out the daily accumulation of cookies with just the ones I want to keep permanently.

    I take care to run this "clean" script at last once daily, and frequently more often than that. I could automate the running of it via cron, but I am in and out of Terminal so much that this step has never seemed necessary for me.

    I have enhanced this "clean" script over time so that it cleans up all sorts of accumulating rubbish - thumbnail caches, recently used file lists, bash history and so on. Keeps everything slim and running quickly.

    BTW, this same approach can be used for Safari, except that instead of cookies.txt in a Firefox dir, you make a copy of Cookies.plist in your home folder's Library/Cookies folder.
    My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
    My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
    My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
    I was on the Mac-Forums honor roll for September 2007

  3. #3

    knightlie's Avatar
    Member Since
    Mar 22, 2007
    Location
    UK
    Posts
    1,463
    Specs:
    Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen
    Could you post that script?
    [URL="http://beadia.net"]Beadia[/URL - Jewelry Business Management Software]
    I judge you when you use poor grammar.

  4. #4

    cwa107's Avatar
    Member Since
    Dec 20, 2006
    Location
    Lake Mary, Florida
    Posts
    26,911
    Specs:
    15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD
    I too would be interested in that script, if you wouldn't mind posting it, Mac57.

    Also, just wanted to add that to date, there is no executable spyware/grayware/adware for OS X.
    Liquid and computers don't mix. It might seem simple, but we see an incredible amount of people post here about spills. Keep drinks and other liquids away from your expensive electronics!

    https://youtu.be/KHZ8ek-6ccc

  5. #5

    baggss's Avatar
    Member Since
    Oct 10, 2004
    Location
    Margaritaville
    Posts
    10,311
    Specs:
    27" 3.4 Ghz i7 iMac-13" C2D Macbook-OSX 10.10.2 -64Gb iPad 2-64 Gb iPhone 6+-ATV 2-14Tb of Storage
    I suppose if you are really paranoid about cookies, you could just turn them off in the browser prefs.


  6. #6

    mac57's Avatar
    Member Since
    Apr 29, 2006
    Location
    St. Somewhere
    Posts
    4,560
    Specs:
    iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM
    Hi All, as requested, here is the script:

    Code:
    # Script to clean up cached data items that tend to accumulate over
    # time on the computer. Cleans several things:
    
    # 1. Clean up cached thumbnails
    
    # 2. Clean up the .bash_history file
    
    # 3. Clean up "recently used" accumulators, playlist histories, etc.
    
    # 4. One step clean up of Firefox cookies, histories, etc.
    
    # 5. One step cleanup of Safari cookies, histories, etc. 
    
    # 1. Thumbnails
    
    rm -f /Users/mac57/.thumbnails/large/*
    rm -f /Users/mac57/.thumbnails/normal/*
    
    # 2. Bash History
    
    rm -f /Users/mac57/.bash_history
    
    # 3. Various "Recently Used" trackers, playlist histories, etc.
    
    rm -rf /Users/mac57/.recently-used
    rm -rf /Users/mac57/.gqview/history
    rm -rf /Users/mac57/.gqview/thumbnails
    cp -f  /Users/mac57/.gimp-2.2/documents.persist /Users/mac57/.gimp-2.2/documents
    
    cd /Users/mac57/Library/Preferences
    cp "Windows Media Player Prefs-default.txt" "Windows Media Player Prefs"
    cd
    
    # 4. Firefox cookies, downloads, history - one step cleanup
    
    cd /Users/mac57/Library/Application\ Support/Firefox/Profiles/sy0jbj2k.default
    cp cookies.persist.txt  cookies.txt
    cp downloads.clear.rdf  downloads.rdf
    cp history.clear.dat    history.dat
    
    # 5. Safari cookies, downloads, history, cache - one step cleanup
    
    cd /Users/mac57/Library/Cookies
    cp cookies.persist.plist cookies.plist
    cd /Users/mac57/Library/Safari
    cp Downloads.plist.persist Downloads.plist
    cp History.plist.persist History.plist
    cd /Users/mac57/Library/Caches
    rm -rf Safari
    mkdir Safari
    
    # Display the result
    
    echo " "
    
    echo "Caches Cleared - Disk Utilization:"
    echo "Filesystem                Size   Used  Avail Capacity  Mounted on"
    df -h | grep -i disk
    
    echo " "
    Note that you will need to change the references to "mac57" to your userid, and you will also need to change the name of the Firefox sub directory where it keeps all the cookies etc. to match your system.

    Also note that I have taken the same approach to Firefox/Safari history and download lists as I have to cookies, saving off a standard minimal one (always named like "something.persist.txt") and then overwriting the existing one with it. In order for this script to work "as is" for you, you will need to do the same.

    Also, I have GIMP loaded on my machine, and have included it's documents list in the clean up too. If you don't have GIMP on your machine, just delete that part of the script.


    To use this script, copy and paste it into a simple text file, and save that file in your home folder as filename "clean" (or whatever name you like). If you are an advanced user and have your own personal bin folder, place it there. If you are not, your home directory is just fine, and is what is assumed in the below.

    Now open a Terminal.app session. Type in "ls" and Enter and you should see your script file there in the list of files. Type the following to make the script executable:

    Code:
    chmod +x clean
    Thats it - all ready to use.

    From now on, when you want to clean out your Firefox, Safari, etc. caches, just startup Terminal.app and type:

    Code:
    ./clean
    As a useful data point, this script prints out your disk usage at the end. You likely won't see it change as a result of this script running, but when I first put the script together, I thought I might, and I have liked to see the result ever since, so I leave it there.

    Enjoy! ...and let me know if you have any questions.
    My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
    My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
    My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
    I was on the Mac-Forums honor roll for September 2007

  7. #7

    cwa107's Avatar
    Member Since
    Dec 20, 2006
    Location
    Lake Mary, Florida
    Posts
    26,911
    Specs:
    15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD
    Quote Originally Posted by mac57 View Post
    Hi All, here is the script:
    Ugh... virtual rep to you, sir - need to spread it around. Thanks a lot.
    Liquid and computers don't mix. It might seem simple, but we see an incredible amount of people post here about spills. Keep drinks and other liquids away from your expensive electronics!

    https://youtu.be/KHZ8ek-6ccc

  8. #8

    knightlie's Avatar
    Member Since
    Mar 22, 2007
    Location
    UK
    Posts
    1,463
    Specs:
    Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen
    Quote Originally Posted by cwa107 View Post
    Ugh... virtual rep to you, sir - need to spread it around. Thanks a lot.
    Same here. That's a great help, mac57. Does the ~ thing for your home folder work in terminal scripts?
    [URL="http://beadia.net"]Beadia[/URL - Jewelry Business Management Software]
    I judge you when you use poor grammar.

  9. #9

    CArmstrong's Avatar
    Member Since
    Feb 25, 2007
    Location
    Pittsburgh, PA, USA
    Posts
    116
    Specs:
    PowerBook G4 15" 1GHz 768MB 60GB
    Excellent script! And knightlie, ~ should indeed reference your home directory.
    "Excuse me, does this effectively hide my thunder?" - Tobias Fünke, Arrested Development

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dealing with .d
    By sdgalbo in forum Running Windows (or anything else) on your Mac
    Replies: 2
    Last Post: 09-07-2011, 04:58 PM
  2. dealing with MacMall
    By nicst47 in forum Schweb's Lounge
    Replies: 9
    Last Post: 12-17-2008, 03:40 AM
  3. Help with dealing with...
    By Waterpolo820 in forum Schweb's Lounge
    Replies: 6
    Last Post: 08-27-2008, 10:06 PM
  4. Dealing with An IT Bully
    By MacHeadCase in forum Schweb's Lounge
    Replies: 8
    Last Post: 04-15-2008, 05:07 PM
  5. Dealing with downloads
    By NanoBite in forum OS X - Operating System
    Replies: 3
    Last Post: 10-28-2005, 07:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •