LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-08-2010, 06:21 PM   #31
barriehie
Member
 
Registered: Nov 2010
Distribution: Debian Lenny
Posts: 136
Blog Entries: 1

Rep: Reputation: 23

The OP's post about having the HTTPS-Everywhere add on prompted me to write a perl script that would take my exported bookmarks.html file and generate the corresponding .xml files for the addon. It wasn't doing much so then I come to find out that the addon isn't supported in my version of FF. Anyhow, here's the script and I *think* it generates the files correctly. It's my first perl program that actually -does- something so keep that in mind please.

It's easy enough to run and I ran it with the bookmarks.html file in the same dir as the program. The .xml files are generated in the same location. You'll have to move them by whatever means you're comfortable with.

Code:
#!/usr/bin/perl -w
use strict;

#
# Script to parse FF/Iceweasel bookmarks.html
# file into xml file(s) for HTTPS-Everywhere
#

#
# Variables
#
my $line = '';
my $ruleset_name = '';
my $rule_from = '';
my $rule_to = '';
my $temp_name = '';
my $xml_fname = '';


if ( ! $ARGV[0] ) {
    print "Usage: httpsE.pl /path/bookmarks.html\n";
    exit 1;
    }

open FILE, "<", "$ARGV[0]" or die $!;
while ( $line = <FILE> ) {
    $line =~ s/^.*<DT><A HREF="//;
    $line =~ s/" ADD_DATE.*$//;
    if ( $line =~ /^http:.*$/ ) {
        $temp_name = $line;
        $temp_name =~ s/^http:\/\/www\.//;
        $temp_name =~ s/^http:\/\///;
        $temp_name =~ s/\/.*$//;
        $temp_name =~ s/\n//;
        $ruleset_name = "<ruleset name=\""."$temp_name"."\">";
        $rule_from = "<rule from=\"^".$line."\"";
        $rule_from =~ s/\n//;
        $rule_to =~ " to=\""."$line";
        $xml_fname = $temp_name.".xml";
        #
        # Create the xml file and write the data.
        #
        open(XML_FILE, ">$xml_fname");

        print "$xml_fname\n";
        print XML_FILE "$ruleset_name\n";
        $temp_name = $line;
        $temp_name =~ s/http/https/;
        $rule_to = " to=\""."$temp_name\"";
        $rule_to =~ s/\n//;
        $rule_from =~ s/\./\\./g;
        print XML_FILE "$rule_from "."$rule_to/>\n";
        print XML_FILE "</ruleset>\n";
        close(XML_FILE);
        }
    }

close FILE;
exit 0

Last edited by barriehie; 12-08-2010 at 06:22 PM. Reason: typo.
 
Old 12-08-2010, 08:26 PM   #32
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Well I decided to just keep Debian for now and install Arch later, when I have the time. So I checked WOT again and realized a mistake I had made immediately. When I had first searched for Web of Trust I had assumed that the first thing that would come up would be the actual add-on, I was half asleep and saw that it only worked with 3.6+. So that was that. It wouldn't work with my current version of Iceweasel. Well this time when I searched again I noticed that the one I saw before was in the category persona. So................

I installed the ACTUAL add-on this time with my current version of Iceweasel 3.5.15. I am checking it out now.

Last edited by Amdx2_x64; 12-08-2010 at 08:28 PM.
 
Old 12-08-2010, 08:46 PM   #33
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
This thread being more about the privacy aspects of being on-line, rather than security, I hope you read the article at http://www.linuxquestions.org/questi...ffing-849111/?
 
1 members found this post helpful.
Old 12-08-2010, 09:00 PM   #34
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by unSpawn View Post
This thread being more about the privacy aspects of being on-line, rather than security, I hope you read the article at http://www.linuxquestions.org/questi...ffing-849111/?

Thank you. This is a great article.

I do have a big concern about ISP's doing the same thing/similar things for commercial profit, etc. The battle with Net Neutrality in the US is going in the ISP's direction. So if that happens Net Neutrality is dead and anything goes for them.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Online Security Help sittykitty Linux - Newbie 4 04-07-2009 01:02 PM
Online security dcmdev Linux - Security 9 09-11-2007 10:27 PM
[SOLVED] Virtualization and Routers for Online Security MBA Whore Linux - Security 5 12-13-2006 03:01 PM
Online banking security issues Cogar Linux - Security 1 11-03-2005 01:50 PM
PHLAK Security Documentation Online? zsejk Linux - Security 6 06-01-2004 02:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration