Archive

Archive for the ‘network’ Category

Switch DNS

July 1st, 2010 Albertux No comments
#!/bin/bash
# Author: Albertux (Alberto Isaac Ayala Esquivias)
# Script: switch the nameservers (DNS)
 
if [ ! $( id -u ) -eq 0 ]
then
	echo "Run this script as root"
	exit
fi
 
if [ $# -le 0 ]
then
	echo "Usage $0 [open|google|comodo|old]"
fi
 
if  [ ! -f /etc/resolv.conf.bak ]
then
	cp /etc/resolv.conf /etc/resolv.conf.bak
fi
 
case $1 in
	open)
		echo -e "# OpenDNS\nnameserver 208.67.222.222\nnameserver 208.67.220.220" > /etc/resolv.conf
	;;
	google)
		echo -e "# Google Public DNS\nnameserver 8.8.8.8\nnameserver 8.8.4.4" > /etc/resolv.conf
	;;
	comodo)
		echo -e "# Comodo Secure DNS\nnameserver 156.154.70.22\nnameserver 156.154.71.22" > /etc/resolv.conf
	;;
	old)
		cp /etc/resolv.conf.bak /etc/resolv.conf
	;;
esac
Categories: network, unix/linux Tags: ,

Ruby Help Me to Find a Job

June 22nd, 2010 Albertux 1 comment

Ruby Help Me to Find a Job

On Indeed:

#!/usr/bin/ruby -w
# Autor: Albertux (Alberto Isaac Ayala Esquivias)
# URL/Blog: http://Albertux.AyalaSoft.com
# E-mail/spam: <albertoi7@gmail.com>
# Free Coke License: If you see me some day give me a free coke please.
# Description: This script maybe help people to find a fucking Job
 
require "rss/2.0"
require "open-uri"
require 'net/http'
require 'rexml/document'
 
# You need to change this values:
keywords = "keyword1+keyword2+keyword3"
zipcode = "10101"
 
def bitly(url)
	# Create account on Bit.ly
	login = ""
	api_key = ""
	data = Net::HTTP.get_response(URI.parse("http://api.bit.ly/v3/shorten?login="+login+"&apiKey="+api_key+"&longUrl="+url+"&format=xml")).body
	doc = REXML::Document.new(data)
	doc.elements.each('response/data/url') do |ele|
		url = ele.text
	end
	url
end
 
open("http://rss.indeed.com/rss?q=" + keywords + "&l=" + zipcode + "&sort=date") do | http |
	response = http.read
	result = RSS::Parser.parse(response, false)
	puts "\nChannel: " + result.channel.title + "\n\n"
	result.items.each_with_index do | item, i|
		puts "#{i+1}. #{item.title} ( " + bitly(item.link) +" )"
	end
end

On Craigslist:

#!/usr/bin/ruby -w
# Autor: Albertux (Alberto Isaac Ayala Esquivias)
# URL/Blog: http://Albertux.AyalaSoft.com
# E-mail/Spam: <albertoi7@gmail.com>
# Free Coke License: If you see me some day give me a free coke please.
# Description: This script maybe help people to find a fucking Job.
 
require "rss/1.0"
require "open-uri"
 
def craigslist_reader(feeds)
	feeds.each do | feed |
		open(feed) do | http |
			response = http.read
			result = RSS::Parser.parse(response, false)
			puts "\nChannel: " + result.channel.title + "\n\n"
			result.items.each_with_index do | item, i|
				puts "#{i+1}. #{item.title} #{item.link}" if i < 10
			end
		end
	end
end
 
craigslist_feeds = [
		"http://sfbay.craigslist.org/sof/index.rss",
		"http://sfbay.craigslist.org/web/index.rss",
		"http://sfbay.craigslist.org/eng/index.rss",
		"http://sfbay.craigslist.org/cpg/index.rss"
]
 
craigslist_reader(craigslist_feeds)

Categories: network, web Tags: , ,

Insecurity

April 1st, 2010 Albertux No comments

Insecurity

Tools:
Nikto.pl Web Scanner
nmap Network Scanner
Metasploit Framework
wfuzz Brute Force Web App
Wireshark Network Protocol Analyzer
Snort IDS
Nessus (vulnerability scanner)
Hydra Cracker Password
John the Ripper Cracker Password (Passive)

Linux Distros:
BackTrack Wireless Tools and others
Damn Vulnerable Linux

Others:
http://sectools.org/
http://www.milw0rm.com/
http://www.exploit-db.com/
http://www.securityfocus.com/

Firewalls

March 1st, 2010 Albertux No comments

Firewalls

smothwall
ipcop
untangle
endian
m0n0wall
vyatta
pfsense

Other option: install any linux flavor + squid + iptables

Good option for windows users: http://personalfirewall.comodo.com/

Block Messenger (squid + iptables)

March 1st, 2010 Albertux No comments

Block Messenger (squid + iptables)

In Mexico i was installed a firewall and squid on a server the important options are:

squid.conf:

acl no_permitido dstdomain "/etc/squid/blocked.domains"
acl msn_mime req_mime_type -i ^application/x-msn-messenger$
acl msn_gw url_regex -i gateway.dll
http_access deny all msn_mime
http_access deny all msn_gw

blocked.domains:

.ebuddy.com
.messengerfx.com
.iloveim.com
.meebo.com
...

iptables:

iptables -I FORWARD -p tcp --dport 1863 -j REJECT