Posts

Showing posts with the label windows

Connecting Mikrotik in GNS3

Image
Attaching Mirkotik x86 to GNS3. its quite easy anyway in ubuntu you need the qemu multicast patch , you can download qemu v13 patch ( http://nchc.dl.sourceforge.net/project/gns-3/Qemu/qemu-0.13.0-patches.zip) and Qemu source (http://wiki.qemu.org/download/qemu-0.13.0.tar.gz) please check the following post to how to patch the qemu. (http://blog.gns3.net/2009/10/olive-juniper/2/) Installation requires Mikrotik x86 version(http://download.mikrotik.com/mikrotik-5.2.iso) and qemu image which can be created as follows qemu-img create -f raw mtik.img 128M In GNS3 please check whether qemuwrapper working properly ( you need to copy 2 python files distributed with GNS3) -rwxr-xr-x 1 root root 868374 2011-05-08 09:22 pemubin.py -rwxr-xr-x 1 root root 34162 2011-05-08 09:21 qemuwrapper.py if all are setup you can create the qemu host as follows. If you want to connect through winbox please follow the following post to create the tap interface : http://www.kbrandt.com/2009/...

Automatic FTP upload when content changed in folder - perl script

This was rudimentary script needed to edit more, but found interesting . #! perl -slw use strict; use Win32::ChangeNotify; use threads; #monitoring path. my $path = 'c:\folder'; my $notify = Win32::ChangeNotify->new( $path, 0, 'FILE_NAME' ); my %last; @last{ glob $path . '\*' } = (); my $count = 0; while( 1 ) { next unless $notify->wait( 10_000 ); # Check every 10 seconds $notify->reset; print $/, 'Something changed'; my @files = glob $path . '\*'; if( @files> scalar keys %last ) { my %temp; @temp{ @files } = (); delete @temp{ keys %last }; #print for keys %temp; my $k; my $v; while ( ($k,$v) = each %temp ) { my $thr1 = threads->create(\&load, $k,$count); } } else { print "A non-deletion or creation change occured"; } undef %last; @last{ @files } = (); $count = $count +1; } sub load { my...