Archive | Linux

Misc Linux Stuff

Driftnet x64 Fix

apt-get source driftnet START COPY BELOW LINE ———https://bugzilla.redhat.com/attachment.cgi?id=134667——— — driftnet-0.1.6/image.c 2002-07-09 20:26:41.000000000 +0100 +++ driftnet-0.1.6.new/image.c 2006-08-22 21:14:38.000000000 +0100 @@ -15,29 +15,20 @@ static const char rcsid[] = “$Id: image. /* memstr: * Locate needle, of length n_len, in haystack, of length h_len, returning NULL. – * Uses the Boyer-Moore search algorithm. Cf. – * http://www-igm.univ-mlv.fr/~lecroq/string/node14.html […]

Continue Reading 0

Perl – Send Email via Secure Mail Server

#!/usr/bin/perl -w # Modules Needed: # apt-get install libssl-dev # perl -MCPAN -e shell # install Net::SSLeay # install IO::Socket::SSL # install Authen::SASL # install Net::SMTP::SSL use Net::SMTP::SSL; sub send_mail { my $to = $_[0]; my $subject = $_[1]; my $body = $_[2]; open(MYINPUTFILE, “<$ARGV[$0]”); # open for input my(@lines) = ; # read file […]

Continue Reading 0

USB hardware power on off

  Site: http://www.gniibe.org/ac-power-by-usb/ac-power-control.html Source: http://www.gniibe.org/software/ apt-get install libusb-dev gcc -o hub-ctrl hub-ctrl.c -lusb lsusb Usage: hub-ctrl [{-h HUBNUM | -b BUSNUM -d DEVNUM}] \ [-P PORT] [{-p [VALUE]|-l [VALUE]}] Version 1 /* * Copyright (C) 2006 Free Software Initiative of Japan * * Author: NIIBE Yutaka <gniibe at fsij.org> * * This file can be […]

Continue Reading

Broadvoice – Fastest proxy switcher for asterisk.

#!/bin/bash curhip=(`cat /etc/hosts | grep sip.broadvoice.com | awk ‘{ print $1 }’`) echo “Current IP: $curhip” chkip=”(`ping -c 2 sip.broadvoice.com`)” curiplow=(`echo $chkip | grep PING | grep -Eo ‘\b[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\b’ | uniq`) curlow=(`echo $chkip | grep -o ‘time\s[0-9]\+[^ms]’ | awk ‘{ print $2 }’`) function getnewlow { echo “Testing: $1” chkip=”(`ping -c 2 $1`)” curip=(`echo $chkip […]

Continue Reading 0

Change the speed and duplex settings of an Ethernet card

# apt-get install ethtool net-tools # ethtool eth0 or # mii-tool eth0 add a pre-up line to /etc/network/interfaces. Something like this: iface eth0 inet static pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full autoneg off address … OR Debian init script: # sudo vi /etc/init.d/100Mbs #!/bin/sh ETHTOOL=”/usr/sbin/ethtool” DEV=”eth0″ SPEED=”100 duplex full” case “$1” in start) […]

Continue Reading 0

N900 Repos

/etc/apt/sources.list.d/hildon-application-manager.list #Nokia Official deb https://downloads.maemo.nokia.com/fremantle/ssu/apps/ ./ deb https://downloads.maemo.nokia.com/fremantle/ssu/mr0 ./ deb https://downloads.maemo.nokia.com/fremantle1.2/ovi/ ./ #Extras repository deb http://repository.maemo.org/extras/ fremantle free non-free deb-src http://repository.maemo.org/extras/ fremantle free #deb http://repository.maemo.org/extras/ fremantle-1.2 free non-free #Latest releases deb http://repository.maemo.org/extras-testing/ fremantle free non-free deb-src http://repository.maemo.org/extras-testing/ fremantle free #deb http://repository.maemo.org/extras-testing/ fremantle free non-free #Unstable releases deb http://repository.maemo.org/extras-devel/ fremantle free non-free deb-src http://repository.maemo.org/extras-devel/ fremantle free […]

Continue Reading 0

apt-fast: A faster apt-get

# !/bin/sh # apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source # if you do anything cool with it, let me know so I can publish or host it for you # contact me at admin@mattparnell.com # Special thanks to Travis/travisn000 from the PCLinux Forums for making improvements that allow # for […]

Continue Reading 0

Powered by recycled bites and bytes.