<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jolttz&#039;s blog</title>
	<atom:link href="http://blog.kaabel.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.kaabel.net</link>
	<description>#!/usr/bin/perl</description>
	<lastBuildDate>Sun, 18 Jul 2010 14:20:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[Perl] Highlight notification in Irssi</title>
		<link>http://blog.kaabel.net/?p=128</link>
		<comments>http://blog.kaabel.net/?p=128#comments</comments>
		<pubDate>Sun, 18 Jul 2010 14:03:51 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Tech blog]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=128</guid>
		<description><![CDATA[I wrote a simple script that shows you a little notification on the top-right corner of your screen when someone highlights you. It uses notify-send to display the notification. If you don't have it just install "notify-osd" with your package manager. There are two things you might want to change: the icon for notification and [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a simple script that shows you a little notification on the top-right corner of your screen when someone highlights you. It uses notify-send to display the notification. If you don't have it just install "notify-osd" with your package manager. There are two things you might want to change: the icon for notification and the duration it displays the notification. The duration is in milliseconds so 1000ms = 1s.</p>
<p>Here's the script in action: </p>
<div class="wp-caption aligncenter" style="width: 305px"><img alt="irssi-notification perl script by jolttz" src="http://loder.pri.ee/up/irssimessage.png " title="irssi-notification.pl" width="295" height="67" /><p class="wp-caption-text">irssi-notification</p></div>
<p>You need to save the script to "~/.irssi/scripts/autorun" or where ever your Irssi folder is located and load it by writing "/script load scripts/autorun/irssi-notification" inside Irssi.</p>
<pre class="brush:perl">
#!/usr/bin/perl
#           irssi-notification.pl
#  Sun Jul 18 16:54:32 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#

use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
Irssi::signal_add('print text', 'notify');

my $icon = "/usr/share/icons/gnome/scalable/actions/mail-message-new.svg"; # Path to icon file
my $duration = "4000"; # Duration in milliseconds

$VERSION = "0.02";
%IRSSI = (
    authors     => 'jolttz',
    contact     => 'jolttz{at}gmail[dot]com',
    name        => 'irssi-notification.pl',
);

sub notify {
    my ($dest, $text, $stripped) = @_;
    my $server = $dest->{server};

    return if (!$server || !($dest->{level} &#038; MSGLEVEL_HILIGHT));

    system("notify-send -i ". $icon ." -t ". $duration ." '$dest->{target}' '$stripped'");
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=128</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick FTP file/directory upload script</title>
		<link>http://blog.kaabel.net/?p=107</link>
		<comments>http://blog.kaabel.net/?p=107#comments</comments>
		<pubDate>Tue, 13 Apr 2010 14:06:31 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[fast]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[net]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[quick]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=107</guid>
		<description><![CDATA[Sorry for not posting for a while, school's keeping me busy.
I wrote a small Perl script today to upload a file or a directory to FTP server by command line. Usually I use FileZilla but sometimes you just need something small uploaded fast and don't want to run those resource wasting and slow GUI applications. [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for not posting for a while, school's keeping me busy.<br />
I wrote a small Perl script today to upload a file or a directory to FTP server by command line. Usually I use FileZilla but sometimes you just need something small uploaded fast and don't want to run those resource wasting and slow GUI applications. With my script you just have to pop-up Terminal and type "./up2ftp.pl myimage.png" for example and the file gets uploaded and link to the file gets printed to you.<br />
I also started learning some C#. I'm not much of a Microsoft guy but .Net is getting quite popular.</p>
<p>So here's the FTP upload script:</p>
<pre class="brush:perl">
#!/usr/bin/perl
#           up2ftp.pl
#  Tue Apr 13 15:09:02 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#
use strict;
use File::Basename;
use Net::FTP;

# Configuration
my $ftp_adr = "loder.pri.ee"; # FTP address
my $ftp_usr = "username"; # FTP username
my $ftp_pwd = "password"; # Password
my $http_dir = "/public_html"; # Public directory
my $up_dir = "/uploads"; # Upload directory
# Config end

# If $link doesn't get a new value it displays this
my $link = "Error generating link!";

# Connect to host
my $ftp = Net::FTP->new($ftp_adr, Debug => 1)
    or die "Can't connect to hostname: $@";

# Identify
$ftp->login($ftp_usr, $ftp_pwd)
    or die "Can't login ", $ftp->message;

# Change directory to upload directory
$ftp->cwd($http_dir . $up_dir)
    or die "Can't change working directory ", $ftp->message;

# Set binary mode or uploaded images can't be displayed
$ftp->binary();

if ($ARGV[0] eq "-R") {
    my $dir = $ARGV[1];
    my @dirs = split(/\//, $dir);
    my $newdir = @dirs[@dirs-1];

    $ftp->mkdir($newdir); # Make new directory
    $ftp->cwd($newdir); 

    # Open local directory to upload
    opendir (DIR, $dir) || die "Error in opening dir $dir\n";
    while (my $file = readdir(DIR)) {
        # If exist upload every file in dir.
        if (!-d $file) {
            $ftp->put("$dir/$file");
        }
    }

    closedir(DIR);

    # Generate link
    $link = "http://" . $ftp_adr . $up_dir . "/" . $newdir;
} else {
    my $file = $ARGV[0];
    my @dirs = split(/\//, $file);
    my $filename = @dirs[@dirs-1];

    if (!-d $file) {
        $ftp->put($file);

        $link = "http://" . $ftp_adr . $up_dir . "/" . $filename;
    }
}

$ftp->quit();
print "\n" . $link . "\n";
</pre>
<p>Directory upload syntax:</p>
<pre class="brush:text">jolttz@archbox ~ $ perl up2ftp.pl -R /dir/to\ the/dir</pre>
<p>File upload syntax:</p>
<pre class="brush:text">jolttz@archbox ~ $ perl up2ftp.pl myfile</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=107</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoyed of spam?</title>
		<link>http://blog.kaabel.net/?p=99</link>
		<comments>http://blog.kaabel.net/?p=99#comments</comments>
		<pubDate>Thu, 18 Mar 2010 12:43:28 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[annoy]]></category>
		<category><![CDATA[crawler]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spider]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=99</guid>
		<description><![CDATA[Most of us have complained about the spam landing on our inboxes. Spam is a huge problem for mailservers and actually for all of us but now let's have look back.
Have you ever set your e-mail visible on some forums or website you are registering to (in some cases it's even a default option)? Have [...]]]></description>
			<content:encoded><![CDATA[<p>Most of us have complained about the spam landing on our inboxes. Spam is a huge problem for mailservers and actually for all of us but now let's have look back.<br />
Have you ever set your e-mail visible on some forums or website you are registering to (in some cases it's even a default option)? Have you ever thought about unchecking the box that says, "Subscribe for weekly newsletter etc."? Have you ever posted your or your friends e-mail address on some forums, portal or even your own website?</p>
<p>These acts may sound very innocent but can actually be the main reason you get spam e-mails. There are 24/7 spiders/crawlers running around the web, searching for e-mails in the form of "you@mail.com" or more advanced crawlers even disguised e-mails like you[at]mail.com etc.<br />
To pervent the crawlers adding your email to the "spam list" is to disguise it so it's easily understandable for human brain but can't be picked up by the crawlers. For example: you{at}mail{dot}com. Second solution would be adding an e-mail form so your e-mail won't be shown but people can still mail you. Also, if you have a company, stop having easily guessable e-mails like "info@yourcompany.com", instead use "information@yourcompany.com" or "cust-support@yourcompany.com" etc.</p>
<p>I wanted to know how easily the e-mails could be gathered so I wrote a small web crawler in Perl. It starts from some random page, gets all the e-mails on it and all the links refering to other pages/sites. Then it adds them to a MySQL database. After that it visits the links that are on the database next and does it all over again. It also filters the links that surely have no e-mails inside, like binary files (png, jpg, gif, exe, pdf etc.) and also pervents websites like google and yahoo that probably have no legit e-mails either. I ran it all night (about 10 hours). It went through 150000 websites and got over 5000 e-mails and I didn't even have to do anything. It's still far from advanced web crawlers but 5000+ e-mails shows how powerful it can be.</p>
<p>I'm not going to post the source here for your own good but if you e-mail me a really good reason, why I should give it to you, I might consider it <img src='http://blog.kaabel.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
If you knew all this, sorry for wasting your time but I hope I got someone thinking with this post.<br />
tl;dr - gtfo.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=99</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YouTube Music Discovery Project</title>
		<link>http://blog.kaabel.net/?p=92</link>
		<comments>http://blog.kaabel.net/?p=92#comments</comments>
		<pubDate>Wed, 17 Feb 2010 14:48:19 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[artist]]></category>
		<category><![CDATA[disco]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[playlist]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[similar]]></category>
		<category><![CDATA[youtube]]></category>
		<category><![CDATA[yt]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=92</guid>
		<description><![CDATA[An interesting project from YouTube. You just search for an artist and It'll create a playlist from YouTube videos containing your artist and some similar artists. It also shows all songs that can be found from YT by that artist and you can make your own playlist if you want.
I find it quite useful, finally [...]]]></description>
			<content:encoded><![CDATA[<p>An interesting project from YouTube. You just search for an artist and It'll create a playlist from YouTube videos containing your artist and some similar artists. It also shows all songs that can be found from YT by that artist and you can make your own playlist if you want.<br />
I find it quite useful, finally YT has come up with something good <img src='http://blog.kaabel.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Link: <a href="http://www.youtube.com/disco">http://www.youtube.com/disco</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert all AVI&#8217;s from a directory to MP4 using ffmpeg and Perl</title>
		<link>http://blog.kaabel.net/?p=64</link>
		<comments>http://blog.kaabel.net/?p=64#comments</comments>
		<pubDate>Fri, 12 Feb 2010 22:51:12 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[avi2mp4]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[marge]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[silver]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=64</guid>
		<description><![CDATA[I recently bought a new iPod (nano 5G) and I couldn't find a script that converts multiple AVI's from a directory to MP4 quickly so I wrote one myself. It uses ffmpeg to convert so you need to have it installed. 170MB AVI should be like 80MB as MP4.
#!/usr/bin/perl
#       [...]]]></description>
			<content:encoded><![CDATA[<p>I recently bought a new iPod (nano 5G) and I couldn't find a script that converts multiple AVI's from a directory to MP4 quickly so I wrote one myself. It uses ffmpeg to convert so you need to have it installed. 170MB AVI should be like 80MB as MP4.</p>
<pre class="brush:perl">#!/usr/bin/perl
#           avi2mp4.pl
#  Sun Feb 12 22:41:46 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#
use strict;

my $dirname = $ARGV[$0];
my ($width, $height, $size);
my $bitrate = 409600;

opendir(DIR, $dirname) or die "Can't open directory $dirname: $!";
while (defined(my $file = readdir(DIR))) {
	if ($file =~ m/(.+)\.avi/i) {

		# Get the aspect ratio
		open(P, "ffmpeg -i '$dirname/$file' 2&gt;&amp;1 |") or die "$!\n";
		while(

) {
		    if (/Video:.+ (\d+)x(\d+)/) {
		        $width = $1;
		        $height = $2;
		    }
		}
		close(P);
		die "Failed finding the aspect ratio.\n" unless defined $width;

		my $aspect = $width/$height;
		if (abs($aspect - 16/9) &lt; 0.02) {
		    $size = "320x180";
		} elsif (abs($aspect - 4/3) &lt; 0.02) {
		    $size = "320x240";
		} else {
		    die "Weird aspect ratio: ${width}x${height} = $aspect\n";
		}
		print $size;
    	print "Converting '$dirname/$file'...\n";
		exec("ffmpeg", "-i", $dirname. "/" .$file, "-b", $bitrate, "-s", $size, "-vcodec", "mpeg4", "-ab", 128, "-acodec", "libfaac", "-r", 25, $dirname. "/" .$1. ".mp4");
	}
}
closedir(DIR);</pre>
<p>Syntax:</p>
<pre class="brush:text">b22stard@b22s-desktop ~ $ perl avi2mp4.pl /dir/to/the/avis/</pre>
<p>Enjoy <img src='http://blog.kaabel.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=64</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Highlight logger for xChat in Perl</title>
		<link>http://blog.kaabel.net/?p=60</link>
		<comments>http://blog.kaabel.net/?p=60#comments</comments>
		<pubDate>Thu, 28 Jan 2010 10:15:15 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[b22stard]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[logger]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[xchat]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=60</guid>
		<description><![CDATA[I haven't posted anything new for some time because I'm writing an IRC bot and I don't know when I'm going to release it. So I'm posting this old script I don't use any more  cause I use Irssi now but some people think it's useful  . I wrote this in October, 2009.
#!/usr/bin/perl
# [...]]]></description>
			<content:encoded><![CDATA[<p>I haven't posted anything new for some time because I'm writing an IRC bot and I don't know when I'm going to release it. So I'm posting this old script I don't use any more  cause I use Irssi now but some people think it's useful <img src='http://blog.kaabel.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I wrote this in October, 2009.</p>
<pre class="brush:perl">#!/usr/bin/perl
#           hilightlogger.pl
#  Tue Oct 13 10:21:03 2009
#  Copyright  2009  jolttz
#  jolttz{ät}gmail{dot}com
#  

# Visit http://loder.pri.ee/

use strict;
use warnings; 

my $away = 0; # Automatically on = 1
Xchat::register("Highlight Logger", "1.0", "Highlight Logger"); 

Xchat::hook_print("Channel Msg Hilight", "highlight");
Xchat::hook_print("Channel Action Hilight", "actionhighlight");
Xchat::hook_command("hilight_on", "hilight_on");
Xchat::hook_command("hilight_off", "hilight_off");

Xchat::print("Loaded: Perl Highlight logger script by B22stard.");

sub hilight_on {
    $away = 1;
    Xchat::print("Will now log Highlights");
    return 1;
}

sub hilight_off {
    $away = 0;
    Xchat::print("Will no longer log Highlights");
    return 1;
}

sub highlight {
    if ($away) {
        my $whom = $_[0][0];
        my $text = $_[0][1];
        my $chan = Xchat::get_info('channel');
        my $serv = Xchat::get_info('server'); 

        Xchat::command("query (HighLights)", "", "$serv");
        Xchat::print("$whom\t$text (7$chan, 7$serv)", "(HighLights)", "$serv");
        return Xchat::EAT_NONE;
    }
} 

sub actionhighlight {
    if ($away) {
        my $whom = $_[0][0];
        my $text = $_[0][1];
        my $chan = Xchat::get_info('channel');
        my $serv = Xchat::get_info('server'); 

        Xchat::command("query (HighLights)", "", "$serv");
        Xchat::print("$whom\t$text (7$chan, 7$serv)", "(HighLights)", "$serv");
        return Xchat::EAT_NONE;
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=60</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rhythmbox Now Playing script for Irssi [Perl]</title>
		<link>http://blog.kaabel.net/?p=57</link>
		<comments>http://blog.kaabel.net/?p=57#comments</comments>
		<pubDate>Sun, 24 Jan 2010 12:54:46 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[listening]]></category>
		<category><![CDATA[now]]></category>
		<category><![CDATA[np]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[playing]]></category>
		<category><![CDATA[rhythmbox]]></category>
		<category><![CDATA[to]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=57</guid>
		<description><![CDATA[Simple but cool script. Show the IRC people what you listen to 
Put the script to .irssi/scripts/autorun/ and load it from Irssi with "/run autorun/rhythm-np.pl".

#!/usr/bin/perl
#           rhythmbox-np.pl
#  Sun Jan 24 03:53:01 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#

use strict;
use Irssi;

Irssi::command_bind('np', 'np');

sub np {
	my [...]]]></description>
			<content:encoded><![CDATA[<p>Simple but cool script. Show the IRC people what you listen to <img src='http://blog.kaabel.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Put the script to .irssi/scripts/autorun/ and load it from Irssi with "/run autorun/rhythm-np.pl".</p>
<pre class="brush:perl">
#!/usr/bin/perl
#           rhythmbox-np.pl
#  Sun Jan 24 03:53:01 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#

use strict;
use Irssi;

Irssi::command_bind('np', 'np');

sub np {
	my ($data, $server, $witem) = @_;

    my $title = `rhythmbox-client --print-playing-format %tt`;
    my $artist = `rhythmbox-client --print-playing-format %ta`;
	my $duration = `rhythmbox-client --print-playing-format %td`;
	my $elapsed = `rhythmbox-client --print-playing-format %te`;

	if (defined $title) {
		$witem->command("me is listening to: $artist - $title ($elapsed/$duration)")
	} else {
		Irssi::print("Rhythmbox is not playing.");
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=57</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automated clipboard to pastebin poster in Perl</title>
		<link>http://blog.kaabel.net/?p=43</link>
		<comments>http://blog.kaabel.net/?p=43#comments</comments>
		<pubDate>Sat, 23 Jan 2010 11:31:02 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lwp]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[pastebin.clipboard]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[post]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=43</guid>
		<description><![CDATA[I'm a lazy person and I like making my life easier. That's probably why I like programming. I use Pastebin a lot and decided to write a script to automate the pasting process. The script takes your clipboard text, posts it to Pastebin and replaces clipboard with the link to the post. I binded the [...]]]></description>
			<content:encoded><![CDATA[<p>I'm a lazy person and I like making my life easier. That's probably why I like programming. I use Pastebin a lot and decided to write a script to automate the pasting process. The script takes your clipboard text, posts it to Pastebin and replaces clipboard with the link to the post. I binded the script to a key so it can be done even faster. If you get error about 'xclip' while running the script you may need to install xclip with your package manager. This should work on Windows machines too, haven't tested though. "Clipboard" and "LWP::UserAgent" modules are needed, use cpan to install them.</p>
<pre class="brush:perl">#!/usr/bin/perl
#           clip2pastebin.pl
#  Sat Jan 23 09:17:38 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#
# Pastebins your clipboard text and replaces
# your clipboard with link to the post.
 

use strict;
use Clipboard;
use LWP::UserAgent;

my $data = Clipboard-&gt;paste;

my $poster = ''; # Name it'll be poster under, leave blank for Anonymous.
my $expiry = 'm'; # d = a day; m = a month; f = forever;

my $posturl = pastebin($data, $poster, $expiry);

Clipboard-&gt;copy($posturl);

sub pastebin {
    my ($data, $poster, $expiry) = @_;

    # For posting to private pastebin just replace the URL
    my $url = "http://pastebin.com/pastebin.php"; 

    my $ua = LWP::UserAgent-&gt;new(
        agent =&gt; "B22stard FTW"
    );

    my %args = (
                code2 =&gt; $data,
                remember =&gt; "0", # Don't remember the user
                paste =&gt; 'Send',
                poster =&gt; $poster,
                expiry =&gt; $expiry,
            );

    my $response = $ua-&gt;post( $url,
        CONTENT =&gt; \%args
    );

    return $response-&gt;header("Location"); # Return link
}
</pre>
<p>If you need any help using this script or programming Perl hop into #perlbar in irc.malvager.com. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=43</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple login script using MD5 encrypted password (Perl)</title>
		<link>http://blog.kaabel.net/?p=33</link>
		<comments>http://blog.kaabel.net/?p=33#comments</comments>
		<pubDate>Fri, 22 Jan 2010 12:25:48 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[encrypt]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=33</guid>
		<description><![CDATA[I was bored today so I decided to write a login script in Perl. It isn't very secure and useful yet because the file where the MD5 encrypted password will be saved can be deleted and then it'll ask for a new password. This can easily be solved by removing the "check if file exists" [...]]]></description>
			<content:encoded><![CDATA[<p>I was bored today so I decided to write a login script in Perl. It isn't very secure and useful yet because the file where the MD5 encrypted password will be saved can be deleted and then it'll ask for a new password. This can easily be solved by removing the "check if file exists" part and adding a file with MD5 encrypted password yourself. MD5 can be cracked so choose long passwords with numbers (6-7 numbers and letters should be fine).</p>
<pre class="brush:perl">#!/usr/bin/perl
#           md5login.pl
#  Fri Jan 22 23:08:10 2010
#  Copyright  2010  jolttz
#  jolttz{ät}gmail{dot}com
#
# Not very secure yet because the password file
# can be deleted and then it'll ask for a new password.
# You may need to modify a bit to run on Windows

use strict;
use Switch;
use Digest::MD5 qw(md5_hex);

if (-e ".md5.txt") { # Check if password file exists
    &amp;askpw();
} else { # If doesn't exist set a new password
    &amp;setpw();
}

sub askpw {
    print "Enter password: ";
    chomp(my $input = &lt;STDIN&gt;); # Take input

    my $md5 = md5_hex($input); # Crypt input
    open FILE, "&lt;.md5.txt" or die $!; # Open password file
    chomp(my $md5pw = &lt;FILE&gt;); # Read password file

    if ($md5pw == $md5) { # Check if the md5s match
        system("clear");
        print "Password accepted!\n\n";
        &amp;menu();
    } else {
        print "Invalid password!\n";
    }
} 

sub setpw {
    print "Choose password: ";
    chomp(my $input = &lt;STDIN&gt;);

    my $md5 = md5_hex($input);
    open FILE, "&gt;&gt;.md5.txt" or die $!;

    # Print password to file in md5
    print FILE $md5;
    close (FILE);

    system("clear");
    &amp;askpw();
}

sub menu {
    print "Choose:\n";
    print " 1) to change password\n";
    print " 2) to exit\n";

    chomp(my $choice = &lt;STDIN&gt;);

    switch ($choice) {
        case 1  { &amp;setpw(); }
        case 2  { exit; }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>17 years old Windows security hole</title>
		<link>http://blog.kaabel.net/?p=35</link>
		<comments>http://blog.kaabel.net/?p=35#comments</comments>
		<pubDate>Fri, 22 Jan 2010 12:24:29 +0000</pubDate>
		<dc:creator>jolttz</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Tech blog]]></category>
		<category><![CDATA[17]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hole]]></category>
		<category><![CDATA[nt]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[team]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[years]]></category>

		<guid isPermaLink="false">http://loder.pri.ee/b/?p=35</guid>
		<description><![CDATA["Microsoft isn’t having an easy time of it these days. In addition to the unpatched hole in Internet Explorer, a now published hole in Windows allows users with restricted access to escalate their privileges to system level – and this is believed to be possible on all 32-bit versions of Windows from Windows NT 3.1 [...]]]></description>
			<content:encoded><![CDATA[<p>"Microsoft isn’t having an easy time of it these days. In addition to the unpatched hole in Internet Explorer, a now published hole in Windows allows users with restricted access to escalate their privileges to system level – and this is believed to be possible on all 32-bit versions of Windows from Windows NT 3.1 up to, and including Windows 7. While the vulnerability is likely to affect home users in only a minor way, the administrators of corporate networks will probably have their hands full this week." - <a href="http://www.h-online.com/security/news/item/Windows-hole-discovered-after-17-years-Update-908917.html">Read more</a></p>
<p>It was found by Google security team, Microsoft failed again.</p>
<p>Switch to Linux you MS bastards <img src='http://blog.kaabel.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaabel.net/?feed=rss2&amp;p=35</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
