Welcome, Guest. Please login or register.
November 16, 2009, 02:12:34 AM

Login with username, password and session length

334919 Posts
37056 Topics
83986 Members

Latest Member: cachon_56

Search:     Advanced search | Tag Cloud
+  Welcome to the Comodo Forum
|-+  Archive Boards
| |-+  Comodo Firewall
| | |-+  Help for v2
| | | |-+  Script to Backup CPF v2.4 firewall settings
« previous next »
Pages: 1 ... 5 6 [7] 8 9 ... 11 Go Down Print
Author Topic: Script to Backup CPF v2.4 firewall settings  (Read 84666 times)
Rotty
Global Moderator
Comodo's Hero
*****
Online Online

Posts: 892


http://www.venganza.org/ - Noodly Appendage


« Reply #90 on: February 02, 2007, 07:33:11 AM »

Mmm, an if statement.  I love if statements (-: .  Yes, that is a good idea.

Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
MortenMacFly
Newbie
*
Offline Offline

Posts: 18


« Reply #91 on: February 02, 2007, 02:26:02 PM »

Nice mods to the script. One small suggested change (shown below in red),
Sure... go ahead. What I have changed is basically "all". The first thing was that the target path was for english OS'es only and "cluttered" over the whole script (not offending). So I used a variable to be setup at the beginning for easy modification of the backup target. All the rest is basically "code optimisation" (if you want to call it like that) by removing duplicate statements. So if you ask me for the lines I have changed, I'll answer "all". Do whatever you want to do with it... You can attach it to the first post as "v3" or something I don't really mind.

Mmm, an if statement.  I love if statements (-: .  Yes, that is a good idea.
In fact - I hate, if scripts don't error-check what could go wrong and terminate early and/or give you an error message you don't understand because it's from a tool you use.... ;-)

With regards, Morten.

Ps.: If you talk about Open Source - yes, I'm pretty active in the one or other OS projects... ;-)
Logged
Rotty
Global Moderator
Comodo's Hero
*****
Online Online

Posts: 892


http://www.venganza.org/ - Noodly Appendage


« Reply #92 on: February 02, 2007, 07:39:07 PM »

Before i was out of high-school i would have had time to really optimize the program...  Personally if i was going to optimize it or make it professional i would have written it in anything that can be used to create a GUI.

Thank you for your contribution.

Just out of interest, what programming languages do you know?

Personally have done some programming in Delphi, VB6, Java, JavaScript, HTML and a very small amount of Unix scripting, Objective-C and now Windows scripting.
« Last Edit: February 02, 2007, 07:42:49 PM by Rotty » Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
hilmi
Comodo Family Member
***
Offline Offline

Posts: 98


« Reply #93 on: February 04, 2007, 07:12:19 PM »

Hey Rotty and Ewen,

First time I had the courage to use your great script (I could not try before in case i mock up stg)
version 1.5 and it worked. Thanks guys for great job, it saves a lot of time.

Hilmi
Logged

XP Pro SP2, cable modem, Nod32, SpyWall, COMODO
KajaK
Newbie
*
Offline Offline

Posts: 8


« Reply #94 on: February 07, 2007, 06:21:19 AM »

Is there any way how to export/import just one specific rule?
Great work with that script gentlemans!
Logged
Rotty
Global Moderator
Comodo's Hero
*****
Online Online

Posts: 892


http://www.venganza.org/ - Noodly Appendage


« Reply #95 on: February 08, 2007, 02:15:29 AM »

If someone sends me a backed up .reg file (Please open the reg file with a text editor and make sure there is no personal info not that there should be, but just to make sure) i can find where everything is stored and create one for what you want it to do... (Assuming COMODO stored the entries in a logical fashion  Tongue )

Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 7454


... and I say to myself, "What a wonderful world"


« Reply #96 on: February 08, 2007, 05:28:09 AM »

Hey rotty,

If you have a look in the registry of your own PC, you'll see that the CFP NM rules are stored based on the numerical order that they appear in the CFP GUI. Bummer!

This is the main reason why I can provide pre-packaged rules for games as REG files, as AM rules follow the same logic. This uniqueness is why we need "named" rules, providing the rules are stored in the registry by name, rather than by number.

cheers,
ewen :-)
Logged

As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you don't like it, don't use the forum.
Rotty
Global Moderator
Comodo's Hero
*****
Online Online

Posts: 892


http://www.venganza.org/ - Noodly Appendage


« Reply #97 on: February 08, 2007, 05:34:53 AM »

Psst, i don't have COMODO Firewall installed in any PC i have access to.

Don't tell anyway !! LOL

That will change, just we had major comp problems and since i don't own a computer and use my parents, they are happy just having computers that work for now without anything going wrong (This seems like a blessing considering the problem we had at the time).

{Don't worry anyone using the script, the script gets some testing before releasing versions  Tongue }

Thanks for that info panic, i did not know that.
« Last Edit: February 08, 2007, 05:44:07 AM by Rotty » Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 7454


... and I say to myself, "What a wonderful world"


« Reply #98 on: February 08, 2007, 06:22:56 AM »

Hey rotty,

If you have a look in the registry of your own PC, you'll see that the CFP NM rules are stored based on the numerical order that they appear in the CFP GUI. Bummer!

This is the main reason why I can't provide pre-packaged rules for games as REG files, as AM rules follow the same logic. This missing uniqueness is why we need "named" rules, providing the rules are stored in the registry by name, rather than by number.

cheers,
ewen :-)

Logged

As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you don't like it, don't use the forum.
Rotty
Global Moderator
Comodo's Hero
*****
Online Online

Posts: 892


http://www.venganza.org/ - Noodly Appendage


« Reply #99 on: February 08, 2007, 09:29:02 PM »

Yes, we need named rules in registry, where do we vote to have this implemented?  Tongue
Logged

The opinions expressed in my posts are my own. 
They do NOT necessarily represent or reflect the views of my employer.
benjamminzIS
Newbie
*
Offline Offline

Posts: 5


« Reply #100 on: February 10, 2007, 01:54:14 PM »

Code:
[at]echo off
cls
set BACKUP_ROOT=%USERPROFILE%\Desktop\CPFBackup
echo ********************************************************
echo The settings are backed up to %BACKUP_ROOT%\CPFRUles.REG
echo Merge the "CPFrules.reg" file back, to restore settings
echo.
echo.
echo Please ensure that you have disabled CFP's registry protection
echo and set the firewall to "Allow All" before continuing.
echo ********************************************************
echo To start press enter. To quit press the "x" button on this window
pause >nul:

if not exist "%BACKUP_ROOT%"       goto DoInit
if not exist "%BACKUP_ROOT%\Prior" goto DoInit
goto DoBackup

rem -----
:DoBackup
rem -----
echo Clearing oldest and storing previous backup... please wait.
if exist "%BACKUP_ROOT%\Prior\CPFRUles.REG" move /Y "%BACKUP_ROOT%\CPFRUles.REG %BACKUP_ROOT%\Prior\CPFRUles.REG" >nul:
goto DoSaveReg

rem ---
:DoInit
rem ---
echo Creating backup folders (initialising)... please wait.
if not exist "%BACKUP_ROOT%"       md "%BACKUP_ROOT%"
if not exist "%BACKUP_ROOT%\Prior" md "%BACKUP_ROOT%\Prior"

rem ------
:DoSaveReg
rem ------
echo Archiving current rule set... please wait.
REGEDIT /E "%BACKUP_ROOT%\CPFRUles.REG" "HKEY_LOCAL_MACHINE\SYSTEM\Software\Comodo\Personal Firewall"

echo DONE!
echo Press any key to end
pause >nul:

copy paste this if you happen to use a "Documents and Settings" folder that isn't named such. (ie: mine is "C:\Profilez"
« Last Edit: February 10, 2007, 02:19:32 PM by benjamminzIS » Logged
benjamminzIS
Newbie
*
Offline Offline

Posts: 5


« Reply #101 on: February 10, 2007, 01:57:24 PM »

just noticed you will also need to replace "[at]" with the shift+2 symbol at the very top of the script. nice "feature" this site has, not checking to see if there are letters/numbers before and after to the symbol before replacing it with "[at]"
Logged
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 7454


... and I say to myself, "What a wonderful world"


« Reply #102 on: February 10, 2007, 04:19:22 PM »

just noticed you will also need to replace "[at]" with the shift+2 symbol at the very top of the script. nice "feature" this site has, not checking to see if there are letters/numbers before and after to the symbol before replacing it with "[at]"

Ummm .......

It actually IS a feature.

The nutbags that spew forth all the spam you're getting - where do you think they get the lists of emaill addresses from? One place they get them is public forums like this one. They have specific apps that do what is known as "harvesting". The app automatically runs through forums, typically looking for the [at] symbol and grabbing the details either side of it. Voila, the email address innocently entered in a forum somewhere is now added to the spammers list.

Unfortunately the code that automatically replaces the symbol with "[at]" can't discriminate whether you have used "[at]" in an address or in another context - it just converts them all. Small price to pay to stop harvesting.

The need to replace "[at]" with the correct SHIFT-2 symbol was mentioned in this thread. Possible you missed this?

Hope this helps,
Ewen :-)
Logged

As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you don't like it, don't use the forum.
benjamminzIS
Newbie
*
Offline Offline

Posts: 5


« Reply #103 on: February 10, 2007, 08:23:37 PM »

stop harvesting? haha... they just edit their scripts a little. Maybe slightly slower for them... but anyways... that's not what I was meaning specifically, I meant more that this script doesn't check for a valid email format before replacing the symbol... that was all, I know full well the reason why it replaces it... it's all moot point and was merely just a silly rant... at any rate I appreciate the script very much and have already used it! just wish there was a way to install comodo silent/unattended, that would make it PERFECT!
Logged
panic
Global Moderator
Comodo's Hero
*****
Offline Offline

Posts: 7454


... and I say to myself, "What a wonderful world"


« Reply #104 on: February 10, 2007, 08:31:49 PM »

stop harvesting? haha... they just edit their scripts a little. Maybe slightly slower for them... but anyways... that's not what I was meaning specifically, I meant more that this script doesn't check for a valid email format before replacing the symbol... that was all, I know full well the reason why it replaces it... it's all moot point and was merely just a silly rant... at any rate I appreciate the script very much and have already used it! just wish there was a way to install comodo silent/unattended, that would make it PERFECT!

Even better would be a Comodo client stub on each PC on a LAN that could receive updates and config changes from a centralised "server". One noisy - everyone else silent. Stay tuned ....  Wink
Logged

As your mums would say, "If you can't play nice with all the other kiddies, go home".
All users are asked to please read and abide by the  Comodo Forum Policy.
If you don't like it, don't use the forum.
Tags:
Pages: 1 ... 5 6 [7] 8 9 ... 11 Go Up Print 
« previous next »
Jump to:  

SSL Certificate Free Virus Removal Firewall
Page created in -0 seconds with 20 queries.
Powered by SMF 1.1.10 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Design by 7dana.com