I'm not 100% sure, and don't take my word for it, but I think all flash cookies (offline flash data/ application settings, etc) are stored in .sol files. I actually just finished some c++ code for myself a few minutes ago (not specifically for this post lol) to find and delete all .sol files found. It scans from the current directory it was executed from, going as far as 50 sub-directory levels down, to scan for ANYTHING ending in .sol.
Once again, i'm not sure if this is the safest method, but I've used it and nothing bad has happened yet that I can notice. I'd say the code is sloppy, but it works lol.
To use, just compile the code below, with g++:
Code:
g++ filename.cpp -o deflash
(if you don't have g++, issue a "sudo apt-get install g++" command.
replacing filename.cpp with the name of the code you save below.
Then copy the executable to /usr/bin as root, as so:
Code:
sudo cp deflash /usr/bin
after this, "cd" to your home directory, and use the command:
Feel free to mod this to your needs.
THE CODE:
Code:
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <unistd.h>
using namespace std;
int main(int argc, char *argv[])
{
int numlines = 0;
int countlp = 0;
int flipper = 0;
system("find -maxdepth 50 -type f -name \\*.sol > flashlist.dat"); /*creates a file listing each found file ending with jpg,
starting with the current directory, extending as
far as 10 sub-directories. You can change the "-maxdepth" option to what suits you */
cout << "\n-> Created found flash cookies\\objects list...";
cout << "\n---------> Calculating...";
ifstream calclines("flashlist.dat");
if(!calclines)
{
cout << "\n-> !!! Error. flashlist.dat inaccessible or not created. Terminating.\n";
exit(0);
}
else
{
while(!calclines.eof())
{
string temp;
getline(calclines,temp);
numlines++;
}
calclines.close();
}
cout << "\n" << numlines << " files found.";
system("sleep 1");
cout << "\nNow shredding and removing...";
system("sleep 1");
ifstream filelist("flashlist.dat");
if(!filelist)
{
cout << "\n-> !!! Error. flashlist.dat inaccessible or not created. Terminating.\n";
exit(0);
}
else
{
while(!filelist.eof())
{
countlp++;
flipper++;
system("clear");
string location;
string concatenated = "shred -f -u -z \""; /* this securely deletes the files. learn more by looking up the "shred" command */
getline(filelist, location);
location.erase(0,2);
cout << "\n\n -- -- --Shredding and removing " << location << ".\n|\nL-- -- -- " << countlp << " of " << numlines << " flash objects deleted -- -- --";
concatenated += location;
concatenated += "\"";
system(concatenated.c_str());
}
system("clear");
system("shred -f -u -z flashlist.dat");
cout << "\n---FINISHED---\n" << numlines << " files removed.\n\n";
}
filelist.close();
return 0;
}
Bookmarks