GUIDE: Adblocker for IE8 (from adblock plus) (list updated regularly)

Associate
Joined
3 Jul 2010
Posts
2
Very nice.

Thanks for your job.

It would be so nice to show us how you compile your xml file from adblock plus filter list.

What script to execute into PowerShell ?

Thank you.
 
Last edited:
Associate
OP
Joined
31 Jul 2009
Posts
2,224
Location
127.0.0.1
Very nice.
...What script to execute into PowerShell ?

Thank you.

Sorry, missed your post. Theres was something missing in the original one (highlighted in red). It should be:
Code:
Get-Content input.txt | foreach { $_ = $_.trim(); $_ } | foreach { 
$_ = @"
<item>
    <description>$_</description>
    <wf:blockRegex>
        <![CDATA[$_]]>
    </wf:blockRegex>
<[COLOR="Red"]/[/COLOR]item>
"@; $_ } | foreach { Add-Content output.txt $_ }

Found out the hard way 1st time I ran it :D
I've been reading all the powershell tutorials on technet, its quite a very useful tool

Thanks again for this, I've been telling some associates.

You're welcome :)
 
Soldato
Joined
16 Dec 2005
Posts
14,443
Location
Manchester
It's amazing! :D

And I never make mistakes! You just made that up! :mad:



:p

Actually looking at it again the first foreach block could probably be shortened to

Code:
foreach { $_.trim() }

If the result of a method isn't assigned to anything, it gets dumped out to the pipeline anyway - no need to assign it to $_ just to dump it again.
 
Associate
OP
Joined
31 Jul 2009
Posts
2,224
Location
127.0.0.1
It's amazing! :D

And I never make mistakes! You just made that up! :mad:



:p

Actually looking at it again the first foreach block could probably be shortened to

Code:
foreach { $_.trim() }

If the result of a method isn't assigned to anything, it gets dumped out to the pipeline anyway - no need to assign it to $_ just to dump it again.


:p I modified it and it works, thx :)


I don't suppose this has been updated to take care of the hotmail adds since the face lift that happened today? :(


I just checked it, even with the facelift, the ads are still blocked :)
 
Associate
Joined
3 Jul 2010
Posts
2

Sorry, missed your post. Theres was something missing in the original one (highlighted in red). It should be:
Code:
Get-Content input.txt | foreach { $_ = $_.trim(); $_ } | foreach { 
$_ = @"
<item>
    <description>$_</description>
    <wf:blockRegex>
        <![CDATA[$_]]>
    </wf:blockRegex>
<[COLOR="Red"]/[/COLOR]item>
"@; $_ } | foreach { Add-Content output.txt $_ }

Found out the hard way 1st time I ran it :D
I've been reading all the powershell tutorials on technet, its quite a very useful tool

Thank you to both :p
 
Associate
Joined
21 Sep 2010
Posts
3
Could be, I suppose. Odd considering I use Office/SkyDrive's online storage myself, but I think I might know what's going on (I think my security software is the culprit). Hopefully it'll work. :D
 
Associate
Joined
21 Sep 2010
Posts
3
I forgot to come back and say I got it all sorted out (it seems Comodo's DNS service was the culprit). Everything's working as intended now.

Thanks for the continued updates! :D
 
Back
Top Bottom