During the development of the framework, the one recurring question that the
Metasploit staff was continually asked was why Ruby was selected as
the programming language. To avoid having to answer this question on
an individual
basis, the authors have opted for explaining their reasons in this document.
The Ruby programming language was selected over other choices, such as python,
perl, and C++ for quite a few reasons. The first (and primary) reason that Ruby
was selected was because it was a language that the Metasploit staff enjoyed
writing in. After spending time analyzing other languages and factoring in past
experiences, the Ruby programming language was found to offer both a simple
and powerful approach to an interpreted language. The degree of introspection
and the object-oriented aspects provided by Ruby were something that fit very
nicely with some of the requirements of the framework. The framework's need
for automated class construction for code re-use was a key factor in
the decision
making process, and it was one of the things that perl was not very well suited
to offer. On top of this, the syntax is incredibly simplistic and provides the
same level of language features that other more accepted languages have, like
perl. The second reason Ruby was selected was because of its platform independent
support for threading. While a number of limitations have been encountered
during the development of the framework under this model, the Metasploit
staff has observed a marked performance and usability improvement over the
2.x branch. Future versions of Ruby (the 1.9 series) will back the existing
threading API with native threads for the operating system the interpreter is
compiled against which will solve a number of existing issues with the current
implementation (such as permitting the use of blocking operations). In the
meantime, the existing threading model has been found to be far superior when
compared to a conventional forking model, especially on platforms that lack a
native fork implementation like Windows.
Another reason that Ruby was selected was because of the supported existence
of a native interpreter for the Windows platform. While perl has a cygwin
version and an ActiveState version, both are plagued by usability problems.
The fact that the Ruby interpreter can be compiled and executed natively on
Windows drastically improves performance. Furthermore, the interpreter is also
very small and can be easily modified in the event that there is a bug.
The Python programming language was also a language candidate. The reason
the Metasploit staff opted for Ruby instead of python was for a few different
reasons. The primary reason is a general distaste for some of the syntactical
annoyances forced by python, such as block-indention. While many would argue
the benefits of such an approach, some members of the Metasploit staff
find it to
be an unnecessary restriction. Other issues with Python center around
limitations
in parent class method calling and backward compatibility of interpreters.
The C/C++ programming languages were also very seriously considered, but in
the end it was obvious that attempting to deploy a portable and usable framework
in a non-interpreted language was something that would not be feasible. Furthermore, the development time-line for this language selection would most
likely be much longer.
Even though the 2.x branch of the framework has been quite successful, the
Metasploit staff encountered a number of limitations and annoyances with perl's
object-oriented programming model, or lack thereof. The fact that the perl
interpreter is part of the default install on many distributions is
not something
that the Metasploit staff felt was worth detouring the language
selection. In the
end, it all came down to selecting a language that was enjoyed by the people
who contribute the most to the framework, and that language ended up being
Ruby.

Why the framework uses ruby instead of perl?[转]的更多相关文章

  1. JSP,PHP,Python,Ruby,Perl概要及各自特点

    JSP,PHP,Python,Ruby,Perl概要及各自特点 博客分类: JSP PHP Python Ruby Perl概要及各自特点 javascript  互联网技术日新月异,编程的语言层出不 ...

  2. 从0到1,教你实现基于Ruby的watir-webdriver自动化测试

    一.为什么选择Ruby []完全开源. []多平台:Ruby可以运行在Linux, UNIX, Windows, MS-DOS, BeOS, OS/.. []多线程:线程就是指在一个程序中处理若干控制 ...

  3. Ruby 方法

    Ruby 方法 Ruby 方法与其他编程语言中的函数类似.Ruby 方法用于捆绑一个或多个重复的语句到一个单元中. 方法名应以小写字母开头.如果您以大写字母作为方法名的开头,Ruby 可能会把它当作常 ...

  4. 【转载】Perl异常处理方法总结

    程序脚本在运行过程中,总会碰到这样那样的问题,我们会预知一些问题并为其准备好处理代码,而有一些不能预知.好的程序要能尽可能多的处理可能出现的异常问题,本文就总结了一些方法来解决这些异常,当然perl在 ...

  5. C,C++,Lisp,Java,Perl,Python

    (译注:圣经记载:在远古的时候,人类都使用一种语言,全世界的人决定一起造一座通天的塔,就是巴别塔,后来被上帝知道了,上帝就让人们使用不同的语言,这个塔就没能造起来. 巴别塔不建自毁,与其说上帝的分化将 ...

  6. Ruby方法

    Ruby 方法 Ruby 方法与其他编程语言中的函数类似.Ruby 方法用于捆绑一个或多个重复的语句到一个单元中. 方法名应以小写字母开头.如果您以大写字母作为方法名的开头,Ruby 可能会把它当作常 ...

  7. 《Ruby语言入门教程v1.0》学习笔记-01

    <Ruby语言入门教程v1.0> 编著:张开川 邮箱:kaichuan_zhang@126.com 想要学习ruby是因为公司的自动化测试使用到了ruby语言,但是公司关于ruby只给了一 ...

  8. How difficult is it to create a JavaScript framework?

    分享来自 quora 的一篇文章 https://www.quora.com/How-difficult-is-it-to-create-a-JavaScript-framework https:// ...

  9. .NET Framework VS .NET Core

    本文对应的原文来至 c-sharpcorner 的一篇文章,文末有链接.如有错误,还请指正. 前言 你会为你的下一个应用程序选择哪一种开发平台 - .NET Framework 或者 .NET Cor ...

随机推荐

  1. c++ 对象内存布局详解

    今天看了的,感觉需要了解对象内存的问题.参考:http://blog.jobbole.com/101583/ 1.何为C++对象模型? 引用<深度探索C++对象模型>这本书中的话: 有两个 ...

  2. [转] Python自动单元测试框架

    一.软件测试 大型软件系统的开发是一个很复杂的过程,其中因为人的因素而所产生的错误非常多,因此软件在开发过程必须要有相应的质量保证活动,而软件测试则是保证质量的关键措施.正像软件熵(software ...

  3. php 解压 .gz 文件

    在百度搜索到的 PharData 类和 ZipArchive 都是解压不了 .gz 的文件的,后来在 google 搜索到解决方法,问题解决. try { $phar = new PharData($ ...

  4. HBase应用场景

    适用场景 列族结构经常调整 高并发写入 结构化数据及半结构化数据 Key-Value存储 有序存储 固定集合(多版本) 定时删除记录(TTL)   不适用场景 事务 join,union,groupb ...

  5. Numpy中的矩阵合并

    列合并/扩展:np.column_stack() 行合并/扩展:np.row_stack() >>> import numpy as np >>> a = np.a ...

  6. iOS 后台退出app时不执行applicationWillTerminate的临时解决方法

    - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release s ...

  7. 服务器多块磁盘 ,同时磁盘类型混合(SSD+STAT+SAS)

    服务器多块磁盘 ,同时磁盘类型混合(SSD+STAT+SAS)

  8. 学生成绩管理系统 1.0(Java+MySql)

    真难…… 数据库建立不会,中文编码不会,插入数据不会,删除不会…… Java读入数据不会……数据库连接不会…… 你也好意思说自己是学计算机的啊魂淡…… 我会慢慢写2.0,3.0版的……噗…… src/ ...

  9. CCS5 编译器手动设置dsp支持可变参数宏等问题

    IDE:CSS5.4,compiler不支持可变参数宏.需要手动设置编译器相关选项: Language Option->Language Mode —>no strict ANSI. 1. ...

  10. Labeled ContentControl & LabeledControl【项目】

    LabeledTextBoxControl: C#定义 using System; using System.Collections.Generic; using System.Linq; using ...