Quick Scanner (Host/Port)

Sep 28
2008
#!/usr/bin/ruby
 
host_port = ARGV[0]
host = host_port.split(':').first
port = host_port.split(':').last
 
puts %x[nmap -p #{port} #{host}]

Or just:

#!/usr/bin/ruby
 
puts %x[nmap -p #{ARGV[0].split(':').reverse.join(' ')}]

Usage (cli and given that the script is named scan_proxy):

./scan_proxy 202.105.182.87:808

Unaliased Fronts and KDE

Sep 24
2008

All of us (the people that hate vista and apple styled aliased fonts) have seen the ugly fonts in some KDE apps (Firefox for example). But this is not the case with XFCE where evreything works fine.
So here is a fix for KDE (just run the following command):

$ cat ~/.gtkrc-2.0
gtk-font-name = "Arial 10"

Simple Phonebook Script

Sep 20
2008
#!/usr/bin/env ruby
 
class Hash
  def search(arg)
    self.select { |k,v| k =~ /#{arg}/ or v =~ /#{arg}/ }
  end
end
 
search = ARGV[0]
search =~ /^[0-9]+/ and search = search.to_i
 
phones = {
  "me"        => "359880101020406",
  "Hitler"     => "+49 666",
  "Van Gog" => "+31",
  "devil"      => "666",
  "God"       => "1",
}
 
phones.search(search).each do |person|
  print "person:#{person.first}\tnumber:#{person.last}\n"
end

What is PHP?

Sep 15
2008

Technology, which is prohibited by the Geneva Convention. Unfortunately, there are still countries in the world where such technology is used to torture animals and developers.

According to the FMI study, 23 monkeys may make random chatter on the keypad to write the language compiler for a maximum of 292 hours.

the original text (in Bulgarian)

Calendar

September 2008
M T W T F S S
« Aug   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

Tags