Skip to content

Instantly share code, notes, and snippets.

@tacitochaves
tacitochaves / updatedns.sh
Created June 5, 2014 14:59
updatedns.sh
#!/bin/bash
TMPDIR=/tmp
IP=`lynx --source http://meuip.datahouse.com.br |grep meuip-home|cut -d\< -f3|awk '{print $5}';`
if [ ! -e ${TMPDIR}/ddns.ip ]; then
echo "0.0.0.0" > ${TMPDIR}/ddns.ip
fi
@tacitochaves
tacitochaves / updatedns.pl
Last active August 29, 2015 14:02
Updating records with dynamic dns TSIG
#!/usr/bin/perl
#
# This program will include a record in DNS for hosts with dynamic link.
#
# Author: Tácito Chaves - 2014-06-05
# e-mail: chaves@tchaves.com.br
# fone: (98) 8123-8153 / 8857-9777
use strict;
use warnings;
@tacitochaves
tacitochaves / redundant.sh
Last active August 29, 2015 14:02
redundant.sh
#!/bin/bash
#
# redundant.sh
#
# Este script tratará a redundância entre dois links de internet.
#
# Author: Tácito Chaves - 2013-08-04
# e-mail: chaves@tchaves.com.br
# fone: (98) 8123-8153 / 8857-9777
# set -x
@tacitochaves
tacitochaves / update_dns.pl
Last active August 29, 2015 14:02
Update DNS
#!/usr/bin/env perl
#
# update_dns.pl
#
# This program is responsible for performing the backup of the firewall.
#
# Author: Tácito Chaves
# Contact: (98) 8123 - 8153 / (98) 8857 - 9777
# E-mail: chaves@tchaves.com.br
@tacitochaves
tacitochaves / bkp_fwbuilder.pl
Created June 9, 2014 12:20
Backup of firewall FwBuilder
#!/usr/bin/env perl
#
# bkp_fwbuilder.pl
#
# This program is responsible for performing the backup of the firewall.
#
# Author: Tácito Chaves
# Contact: (98) 8123 - 8153 / (98) 8857 - 9777
# E-mail: chaves@tchaves.com.br
@tacitochaves
tacitochaves / bkp_fwbuilder-2.pl
Last active August 29, 2015 14:02
Backup of firewall FwBuilder 2
#!/usr/bin/env perl
#
#
# bkp_fwbuilder.pl
#
# This program is responsible for performing the backup of the firewall.
#
# Author: Tácito Chaves
# Contact: (98) 8123 - 8153 / (98) 8857 - 9777
# E-mail: chaves@tchaves.com.br
@tacitochaves
tacitochaves / send_mail.pl
Created June 25, 2014 03:53
Emailing from Perl script - Net::SMTP::TLS
#!/usr/bin/env perl
#
# This program will make the redundancy between two internet links.
#
# Author: Tácito Chaves - 2014-06-17
# e-mail: chaves@tchaves.com.br
# fone: (98) 8123-8153 / 8857-9777
use strict;
use warnings;
@tacitochaves
tacitochaves / version.pl
Created July 2, 2014 22:03
Version of file
use strict;
my @list = qw/
nome
nome.1
nome.2
@tacitochaves
tacitochaves / comment_squid.pl
Created July 3, 2014 20:49
Comentário no squid.conf
#!/usr/bin/env perl
use strict;
use warnings;
my $oi = comment_squid_oi();
#my $emb_34 = comment_squid_emb_34();
#my $emb_147 = comment_squid_emb_147();
sub comment_squid_oi {
@tacitochaves
tacitochaves / network::Route.pm
Last active August 29, 2015 14:04
Module of routes
package network::Route;
use strict;
use warnings;
use Exporter qw(import);
our @EXPORT_OK = qw(ip_rule_list rule_add rule_del rule_emb ping_emb r_add_147 r_add_34);
sub ip_rule_list {