Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / nsupdate.sh
Last active August 29, 2015 14:02
nsupdate.sh
#!/bin/bash
#
# nsupdate.sh
#
# Script para inserir endereços dinâmicos no servidor de DNS.
# variáveis de ambiente
KEYNAME="server"
HASH="J+fO2y2XYAVhlBSExwF7Bz/07fMd849Cnq3C+8QhuVr+C5imEig9qBUv8HBFHqccXIJ3GFJXRZnkX/0XCkzBng=="
@tacitochaves
tacitochaves / check_port_open.pl
Created May 23, 2014 17:00
Check port open with IP
#!/usr/bin/env perl
use 5.12.0;
print "**********************************\n";
print "* PORT SCAN - São Luís TECNOLOGY *\n";
print "**********************************\n";
print "\n Digite o IP Alvo........:";
chomp(my $ip=<STDIN>);
print " Digite a Porta Inicial..:";
#!/usr/bin/env perl
use 5.014;
say "####################################";
say "Program of sum and difference.";
say "####################################";
say "Entre com a opção desejada.";
say "1 - For sum";
Author: Tácito Chaves
Created: 05/13/2014
Description: This is a simple vim configuration file .vimrc
nmap <C-f> :%!perltidy -q<CR>
nnoremap <C-f> :%!perltidy -q<CR>
vnoremap <C-f> :!perltidy -q<CR>
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use DBI;
my $cgi = new CGI;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Acesso ao Sistema</title>
</head>
<style>
body {
background-color: #11a6d4;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Acesso ao Sistema</title>
</head>
<style>
body {
background-color: #11a6d4;
}
@tacitochaves
tacitochaves / gist:9414791
Last active August 29, 2015 13:57
Atividade 9 com socket
#!/usr/bin/perl
use IO::Socket::INET;
use strict;
my $server_socket = IO::Socket::INET->new(
'LocalAddr' => '0.0.0.0',
'LocalPort' => '8086',
'Proto' => 'tcp',