background preloader

Rails

Facebook Twitter

Javascript

Expansion Pak #1. The Tiger’s Vest (with a Basic Introduction to Irb) Screencasts of Ruby on Rails. Writing Buffer Overflow Exploits with Ruby. Overflowed !!

Writing Buffer Overflow Exploits with Ruby

On the way playing vortex wargames , I found this nice atical written by teleh0r@doglover.com , called Writing Bufferoverflow Exploit with Perl. So ... This small little blog will be a very small how-to on writting exploit with ruby. I'm not planning to explain further on what is bufferoverflow and how to exploit it. If you wish to read more papers , there's some articals in BADC0DED and L0T3K I took the example from gera's Insecure Programming Example From the Advanced Bufferoverflow Section. Here's there code : int main(int argv,char **argc) { char buf[256]; strcpy(buf,argc[1]); } $ gcc -o abo1 abo1.c $ . From the code we can see that, this peace of C code only can containie 256 Char, when we insert 268 A's it will automatically Stop. #! Few More steps to go : root# chmod u+s abo1 $ ruby abo1-exp.rb $ id uid=1000(xwings) gid=1000(xwings) groups=1000(xwings) $ ruby abo1-exp.rb Shellcode : 40 Path : 6 New ret : 3221225420 # id uid=0(root) gid=0(root) groups=1000(xwings)

Beginners Guide to Rails, part 1. 36 comments | Posted: 31 March 06 in , by Robert Evans Introduction The last write up I did here focused on the simplicity and flexibility of the Rails framework when using databases.

Beginners Guide to Rails, part 1

This article will begin a series of tutorials that I will be writing here and cross posting on my site . My hope is that I can guide those who are very new to on the path of learning this awesome framework and language. : This tutorial is not for those who are already building applications using the Rails framework. For those curious, I use the following for my Ruby on Rails developing: Notepad++ MySQL Database MySQL Administrator MySQL Query Browser WebBrick Ok, let’s start Building! First thing we need to do is create a database. Contact_development contact_test contact_production The first thing you should notice is the naming convention used here, particularly , and .

So, we have created our three databases, now it is time to create our Rails application. This creates the framework of our application. The Unofficial Ruby Usage Guide. You may be interested to know that this document was originally written for internal use in the Operations department at Google.

The Unofficial Ruby Usage Guide

At the time, I was campaigning for the right to use Ruby on internal projects and I felt that a style and usage guide would probably assist in the battle for the language's acceptance, as the officially sanctioned languages at the time already had one. If nothing else, we'd at least all end up writing code that was easier to maintain. Over the last few years, Ruby has struck a chord with programmers as an excellent tool for -- amongst other things -- system administration. With that as our perspective, this document will suggest some guidelines for writing Ruby code in such a way that a common stylistic vocabulary may emerge, thereby increasing the ease with which source code may be read and shared. If you have questions about this document, please address them to its author, Ian Macdonald.

An Admonishment irb irb stands for Interactive Ruby. Similarly, "foo". ri #! Ruby Syntax. Prev - next - index Lexical structure The character set used in the Ruby source files for the current implementation is based on ASCII.

Ruby Syntax

The case of characters in source files is significant. All syntactic constructs except identifiers and certain literals may be separated by an arbitrary number of whitespace characters and comments. The whitespace characters are space, tab, vertical tab, backspace, carriage return, and form feed. Identifiers Examples: foobar ruby_is_simple Ruby identifiers are consist of alphabets, decimal digits, and the underscore character, and begin with a alphabets(including underscore).

Comment # this is a comment line Ruby comments start with "#" outside of a string or character literal (? Embedded Documentation Example: =begin the everything between a line beginning with `=begin' and that with `=end' will be skipped by the interpreter. Reserved words The reserved words are: Program print "hello world! Script.aculo.us - web 2.0 javascript.