Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
privacy mode
Posted by: disrupted
Date: September 10, 2008 03:33PM

creates privacy mode browsing session: (nothing stored on disk)

1. go to your application data\k-meleon folder

2. open profiles.ini (in notepad)

3. create new profile e.g:
[Profile1]
Name=privacy
Path=privacy
IsRelative=1

4. no need for default entry, because the main profile will always be default, save file

5. IMPORTANT! after saving the file, right-click on it, choose properties and change attributes to read-only.

6. create privacy(profile) folder \Application Data\K-Meleon\privacy

7. copy all files from your default folder to your new privacy folder(so you don't need to customise your preferences and settings from scratch)


save to k-meleon's macros folder.
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ----------launch k-meleon in privacy mode---------------------------------------------------------------------------
#
# Dependencies : main.kmm (Go)
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------


privacymode{
menu = "Privacy Mode";
exec("G:\\applications-x\\KMplus\\k-meleon.exe -new -P privacy");
}

privacymodelink{
menu = "Privacy Mode";
exec("G:\\applications-x\\KMplus\\k-meleon.exe -new -P privacy " . $LinkURL);
}

privacymode_BuildMenu{

# tools menu
# link context
setmenu("&Tools",inline,_privacymode_Page,WebServices);
setmenu(_privacymode_Page,macro,"Privacy Mode",privacymode);
setmenu(LinkSave,macro,"Privacy Mode..",privacymodelink);
}


$OnInit=$OnInit."privacymode_SetAccels;privacymode_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."privacymode;";



9.IMPORTANT!
change this path in macro: G:\\applications-x\\KMplus\\k-meleon.exe
to where your kmeleon is installed. save macro with your path.

10. fire kmeleon, launch privacy mode from either tools menu/or link contextmenu

11. PRIVACY SETTINGS: in privacy mode instance, open preferences
privacy security>history> uncheck keep a list, unckech enable history plugin
urlbar history> uncheck keep a list
cache> uncheck cache files on disk, uncheck cache website icons
(i.e. edit browsing preferences to whatever you deem as private/secure.. e.g clear automatically all data at shutdown etc)
IMPORTANT!kmeleon plugins>macro extensions>uncheck privacymode.kmm

12. interface: in privacy mode instance, open preferences:
gui appearance> general> window title: type privacy mode in buffer
(you can also use a different skin for that profile..or same skin with different colours etc)



Options: ReplyQuote
Re: privacy mode
Posted by: panzer
Date: September 10, 2008 04:51PM

Complicated. If I saw correctly, Aurora has privacy mode also. And you can enable it with 1 click.

Am I correct?

Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: September 10, 2008 06:33PM

yes, arora has built-in privacy mode.. this is an alternative way to surf with privacy in kmeleon. it's not very complicated; basically just creating a second profile with more privacy settings and launching it from within the default instance.

Options: ReplyQuote
Re: privacy mode
Posted by: desga2
Date: September 11, 2008 11:16AM

Thanks disrupted, it's a simple good idea. I'm sure that this can be usefull for someone.

K-Meleon in Spanish

Options: ReplyQuote
Re: privacy mode
Posted by: mdunkan
Date: September 11, 2008 02:17PM

What's Aurora?

Options: ReplyQuote
Re: privacy mode
Posted by: desga2
Date: September 11, 2008 03:38PM

@ mdunkan:
Arora not Aurora. smiling smiley

It's a new browser in developement with WebKit engine (like Safari).

K-Meleon in Spanish

Options: ReplyQuote
Re: privacy mode
Posted by: nico
Date: February 03, 2009 06:15PM

thank you disrupted the function and brilliant, plus it can be coupled with NoScript smiling smiley

Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: February 05, 2009 12:45AM

thank you nico, glad you like it... here's privacy mode skin(yellow buttons based on lo-fi skin by al-originally by gashu)
http://kmeleon.holaservers.com/disrupted/privacy.7z
(rightclick-savelinktarget as: extract in skins folder

Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: February 23, 2009 09:46AM

there's a problem with privacy mode in that if you have already launched privacy mode and privacy mode profile window is running and then you retured back to the main window/profile and try to launch privacy mode again; you will get an error :"the selected profile can't be loaded..already in use.." and kmeleon will proceed to launch the profile manager dialog.

a work around this is by using a simple autoit script to check if privacy mode profile is running or not and executes the command accordingly


extract in kmeleon's folder(privacymode.exe goes in the tools folder|privacymode.kmm in the macros folder)

macro:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ----------launch k-meleon in privacy mode---------------------------------------------------------------------------
#
# Dependencies : main.kmm (Go)
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------------------------------------------------------------

$_tool_path=getfolder(RootFolder)."\\Tools";
$_km_path=getfolder(RootFolder)."\\k-meleon.exe";
$_pr_path=getfolder(RootFolder)."\\k-meleon.exe -new -P privacy";

privacymode{
menu = "Privacy Mode";
exec($_tool_path."\\privacymode.exe \"".$_km_path."\" \"".$_pr_path."\" " . $URL);
}

privacymodelink{
menu = "Privacy Mode";
exec($_tool_path."\\privacymode.exe \"".$_km_path."\" \"".$_pr_path."\" " . $LinkURL);
}

privacymode_BuildMenu{

# tools menu
# link context
setmenu(PrivacySecurity,macro,"Privacy Mode",privacymode,0);
setmenu(LinkSave,macro,"Privacy Mode..",privacymodelink);
}


$OnInit=$OnInit."privacymode_SetAccels;privacymode_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."privacymode;";



autoit src:
;AutoIt Version: 3.0:
;Author: yannis
;
;
#NoTrayIcon
#Include <String.au3>

$Pmode=(" -new -P privacy ")
$ExPar=_StringInsert($Pmode, $CmdLine[3], -1)

if WinExists("[REGEXPTITLE: PRIVACY-MODE]", "") Then
ShellExecute($CmdLine[1], $CmdLine[3])

else
ShellExecute($CmdLine[1], $ExPar)
EndIf
exit


IMPORTANT! in privacy mode the window titlebar must be named:' PRIVACY-MODE ' cause that's how the script checks if p-m profile is running
in privacy mode, open preferences(F2)
GUI appearance>window tile: PRIVACY-MODE

EXTRA: special proxy file for privacy mode:

function FindProxyForURL(url, host)
{
// variable strings to return
var proxy_yes = "PROXY 194.36.10.154:3128";
var proxy_yes = "DIRECT";
if (shExpMatch(url, "127.0.0.1")) { return proxy_yes; }
if (shExpMatch(url, "*www.*")) { return proxy_yes; }
if (shExpMatch(url, "*.*")) { return proxy_yes; }
if (shExpMatch(url, "https://*"winking smiley) { return proxy_yes; }
if (shExpMatch(url, "ftp://*"winking smiley) { return proxy_yes; }
if (shExpMatch(url, "gopher*")) { return proxy_yes; }
return proxy_yes;
}


this uses a highly-anonymous codeen proxy..so not only your surfing doesn't leave any tracks on your pc but more importantly you don't leave any tracks on www.. like google won't be able to identify you or trace your ip.

save privacy.pac in root c:\
in privacy mode profile preferences, proxy> new configuration>
name configuration: privacymode
use the following url: file:///c|/privacy.pac
then select new privacy proxy from tools>proxy



Options: ReplyQuote
Re: privacy mode
Posted by: nico
Date: February 23, 2009 04:36PM

how to make a test of the effectiveness of proxy ?

Options: ReplyQuote
Re: privacy mode
Posted by: guenter
Date: February 23, 2009 09:02PM

have a look at www.browserspy.dk a page with much info anything about...



Edited 1 time(s). Last edit at 02/23/2009 09:46PM by guenter.

Options: ReplyQuote
Re: privacy mode
Posted by: nico
Date: February 23, 2009 09:13PM

there is an error in the proxy
the last line
}

Options: ReplyQuote
Re: privacy mode
Posted by: guenter
Date: February 23, 2009 09:49PM

Quote
nico
}

Where is {

They are pairs {}

Can be nothing or {}

If I did not count wrong, all open pairs were closed. Try to complete (inside statements), btw. try make () around needed, beginning with last.

p.s. Sorry I am no dev - no help - except for little things. Its trial &error 4 me.



Edited 3 time(s). Last edit at 02/23/2009 10:11PM by guenter.

Options: ReplyQuote
Re: privacy mode
Posted by: nico
Date: February 23, 2009 10:53PM

is not a mistake but an oversight, sorry :s

function FindProxyForURL(url, host)
{
// variable strings to return
var proxy_yes = "PROXY 194.36.10.154:3128";
var proxy_yes = "DIRECT";
if (shExpMatch(url, "127.0.0.1")) { return proxy_yes; }
if (shExpMatch(url, "*www.*")) { return proxy_yes; }
if (shExpMatch(url, "*.*")) { return proxy_yes; }
if (shExpMatch(url, "[*"]winking smiley) { return proxy_yes; }
if (shExpMatch(url, "[*"]winking smiley) { return proxy_yes; }
if (shExpMatch(url, "gopher*")) { return proxy_yes; }
return proxy_yes;
}

Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: February 24, 2009 02:38AM

sorry yes, couple of errors in the pac file.. and this
var proxy_yes = "DIRECT"; should be var proxy_no = "DIRECT";

test:
http://projectip.com/

proxy lists:
http://samair.ru/proxy/

Options: ReplyQuote
Re: privacy mode
Posted by: nico
Date: February 24, 2009 11:49AM



Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: May 06, 2010 08:17AM

privacymode update, user no longer required to make new profile or fiddle with profiles.ini.. autotits will detect if privacymode has been set or not, if not will create neew privacy profile with same settings as your main profile(same skin, options etc) only with cache disabled(no disk or meory caching) and no history and no urlbar history..and titlebar wll be called 'privacy-mode'

additionally if user changes settings in main profile or skin etc or wprivacymode mode profile got corrupted for whatever reason, user can easily fix or update the privacymode with changes from their main profile(privacymode settings for cache and history will not be affected)
edit>configuration>update privacymode

browsing:
link context>privacy mode(opens selected link in privacy mode)
tools>privacy mode (opens current page url in privacymode)
http://kmext.sourceforge.net/files/privacymode.7z
(maximum upx compression 200kb)

source
; AutoIt Version: 3.3.0
; Language: English
; Platform: Win9x/NT
; Author: yanni

#NoTrayIcon
#Include <Misc.au3>
#Include <file.au3>
#Include <string.au3>

If _Singleton("privacymode", 0)=0 Then
Exit
EndIf

if $cmdline[0]=0 then
exit
endif

;reference $ascmdlin=("I:\applications\webres\dev\testversion\Profiles\3rh9s1la.default")
$getspos=StringInStr($CmdLine[2], "\" , 0, -1)
$porfidr=StringMid($CmdLine[2], 1, $getspos)
$profileini=($porfidr & "profiles.ini")
$privacyd=($porfidr & "privacymode")
$privprefs=($porfidr & "privacymode\prefs.js")

if $cmdline[3]=("-update") then
makepriv()
else
normpriv()
endif

func normpriv()
if FileExists($privacyd) then
FileWriteLine($privprefs, 'user_pref("kmeleon.display.title", "PRIVACY-MODE");' )
FileWriteLine($privprefs, 'user_pref("kmeleon.plugins.macros.modules.privacymode.load", false);' )
privacymode()
else
setprivacy()
endif
endfunc

func setprivacy()
$checkprof1=IniRead($profileini, "Profile1", "Name", "" )
$checkprof2=IniRead($profileini, "Profile2", "Name", "" )
$checkprof3=IniRead($profileini, "Profile3", "Name", "" )
;msgbox(48, $checkprof1, $checkprof1)
if $checkprof1=("privacymode") or $checkprof2=("privacymode") or $checkprof3=("privacymode") then
makepriv()
else
if $checkprof1=("") then
createpriv1()
else
if $checkprof1<>("") and $checkprof2=("") then
createpriv2()
else
if $checkprof1<>("") and $checkprof2<>("") and $checkprof3=("") then
createpriv3()
else
createpriv4()
endif
endif
endif
endif
endfunc

func createpriv1()
FileSetAttrib ($profileini, "-R")
Iniwrite($profileini, "Profile1", "Name", "privacymode" )
Iniwrite($profileini, "Profile1", "Path", "privacymode" )
Iniwrite($profileini, "Profile1", "IsRelative", "1" )
FileSetAttrib ($profileini, "+R")
makepriv()
endfunc

func createpriv2()
FileSetAttrib ($profileini, "-R")
Iniwrite($profileini, "Profile2", "Name", "privacymode" )
Iniwrite($profileini, "Profile2", "Path", "privacymode" )
Iniwrite($profileini, "Profile2", "IsRelative", "1" )
FileSetAttrib ($profileini, "+R")
makepriv()
endfunc

func createpriv3()
FileSetAttrib ($profileini, "-R")
Iniwrite($profileini, "Profile3", "Name", "privacymode" )
Iniwrite($profileini, "Profile3", "Path", "privacy" )
Iniwrite($profileini, "Profile3", "IsRelative", "1" )
FileSetAttrib ($profileini, "+R")
makepriv()
endfunc

func createpriv4()
FileSetAttrib ($profileini, "-R")
Iniwrite($profileini, "Profile4", "Name", "privacymode" )
Iniwrite($profileini, "Profile4", "Path", "privacymode" )
Iniwrite($profileini, "Profile4", "IsRelative", "1" )
FileSetAttrib ($profileini, "+R")
makepriv()
endfunc

func makepriv()
;msgbox(48, "Privacy mode setup", "Kmeleon will be restarted. ", 4)
While ProcessExists("k-meleon.exe")
WinClose("[CLASS:KMeleon Browser Window]", "");
sleep(100);
If WinActive("K-Meleon") Then
Send("{Enter}")
EndIf
Wend
processwaitclose("k-meleon.exe")
DirCopy($CmdLine[2], $privacyd , 1)
DirCopy($CmdLine[2], $privacyd , 1)
FileWriteLine($privprefs, 'user_pref("kmeleon.display.URLbarTitle", "pmode");' )
FileWriteLine($privprefs, 'user_pref("kmeleon.display.title", "PRIVACY-MODE");' )
FileWriteLine($privprefs, 'user_pref("kmeleon.favicons.cached", false);' )
FileWriteLine($privprefs, 'user_pref("browser.cache.disk.enable", false);' )
FileWriteLine($privprefs, 'user_pref("browser.cache.memory.enable", false);' )
FileWriteLine($privprefs, 'user_pref("browser.history_expire_days", 0);' )
FileWriteLine($privprefs, 'user_pref("kmeleon.plugins.history.load", false);' )
FileWriteLine($privprefs, 'user_pref("kmeleon.MRU.maxURLs", 0);' )
FileWriteLine($privprefs, 'user_pref("kmeleon.plugins.macros.modules.privacymode.load", false);' )
sleep(444)
run($CmdLine[1])
endfunc

func privacymode()
$Pmode=(" -new -P privacymode ")
$ExPar=_StringInsert($Pmode, $CmdLine[3], -1)
if WinExists("[REGEXPTITLE:PRIVACY-MODE]", "") Then
ShellExecute($CmdLine[1], $CmdLine[3])
else
ShellExecute($CmdLine[1], $ExPar)
EndIf
exit
endfunc


Options: ReplyQuote
Re: privacy mode
Posted by: km2
Date: June 22, 2010 06:32PM

last time
don't load Privacy Mode

pref.js - - >

user_pref("kmeleon.display.title", "PRIVACY-MODE");
user_pref("kmeleon.plugins.macros.modules.privacymode.load", false);

Any ideas what happened?

(if delete "privacymode" profile, - working...)

p.s. Thank you, for this great tool.

Options: ReplyQuote
Re: privacy mode
Posted by: desga2
Date: June 22, 2010 09:18PM

@ disrupted:
Check to fix this difference in identical functions:
func createpriv2()
FileSetAttrib ($profileini, "-R")
Iniwrite($profileini, "Profile2", "Name", "privacymode" )
Iniwrite($profileini, "Profile2", "Path", "privacymode" )
Iniwrite($profileini, "Profile2", "IsRelative", "1" )
FileSetAttrib ($profileini, "+R")
makepriv()
endfunc

func createpriv3()
FileSetAttrib ($profileini, "-R")
Iniwrite($profileini, "Profile3", "Name", "privacymode" )
Iniwrite($profileini, "Profile3", "Path", "privacy" )
Iniwrite($profileini, "Profile3", "IsRelative", "1" )
FileSetAttrib ($profileini, "+R")
makepriv()
endfunc

But I don't think this solved km2 problem.

K-Meleon in Spanish

Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: June 23, 2010 12:06PM

no i don't think that's the problem..this just checks the location of privacymode profile in the profiles.ini so must be kept 'privacymode'. what happened is the privacy profile got corrupted and because the command is specifically calling it to use that profile it didn't launch. km2, if that happens again, simply go to edit>configuration>update privacymode and that should fix it.

there's a script i use before running kmeleon which auto detects if the main profile got corrupted(missing prefs or mangled up prefs.js) and if true..it automatically restores profile from a backup before it runs kmeleon..ensuring kmeleon will always run a good main profile and avoids creating a new profile.. i think i can use same script before launching privacy mode to check for the integrity for prefs and not just f the profile folder exists or listed in profiles.ini

; Script Function:
#include <file.au3>
#NoTrayIcon

if processexists("k-meleon.exe") then
winactivate("[CLASS:KMeleon Browser Window]", "")
else
checkinte()
endif
exit

func checkinte()
If FileExists("C:\Users\LEEDS\Application Data\K-Meleon\DEFAULT\prefs.js") Then
checkintegrity()
Else
ProgressOn("Corrupted Profile Detected", "Restoration in progress..")
For $i = 10 to 100 step 40
DirCopy("G:\applications-x\KMplus\profilebkup\K-Meleon", "C:\Users\LEEDS\Application Data\K-Meleon", 1)
sleep(400)
	ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Profile Restored successfully")
sleep(500)
ProgressOff()
sleep(400)
run(@scriptdir & "\k-meleon.exe")
EndIf
exit
endfunc

func checkintegrity()
$proper=("# Mozilla User Preferences")
$checker=FileReadLine("C:\Users\LEEDS\Application Data\K-Meleon\DEFAULT\prefs.js" ,1)
if $checker=$proper then
run(@scriptdir & "\k-meleon.exe")
else
;msgbox(48, "corrupted", "corrupted")
ProgressOn("Corrupted Prefs Detected", "Restoration in progress..")
For $i = 10 to 100 step 40
DirCopy("G:\applications-x\KMplus\profilebkup\K-Meleon", "C:\Users\LEEDS\Application Data\K-Meleon", 1)
sleep(400)
	ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Profile Restored successfully")
sleep(500)
ProgressOff()
sleep(400)
run(@scriptdir & "\k-meleon.exe")
EndIf
exit
endfunc


Options: ReplyQuote
Re: privacy mode
Posted by: km2
Date: June 23, 2010 07:50PM

"simply go to edit>configuration>update privacymode and that should fix it."
Yes. Fix it. Thanks disrupted.

Options: ReplyQuote
Re: privacy mode
Posted by: disrupted
Date: June 26, 2010 06:04PM

you're very welcome

update:
http://kmext.sourceforge.net/files/privacymode.7z
sets tab.close button to false in privacy mode profile (avoid crash bug with site icons disabled)

Options: ReplyQuote


K-Meleon forum is powered by Phorum.