script Ruby / Rails / Arachni

ruby down

http://rubyinstaller.org/download.html

ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.zip

http://rubyforge.org/frs/download.php/69035/rubyinstaller-1.9.1-p378-rc2.exe

ftp://ftp.ruby-lang.org//pub/ruby/binaries/mswin32/ruby-1.9.1-p376-i386-mswin32.zip

C:\Documents and Settings\Lindows>ruby --help
Usage: ruby [switches] [--] [programfile] [arguments]
  -0[octal]       specify record separator (\0, if no argument)
  -a              autosplit mode with -n or -p (splits $_ into $F)
  -c              check syntax only
  -Cdirectory     cd to directory, before executing your script
  -d              set debugging flags (set $DEBUG to true)
  -e 'command'    one line of script. Several -e's allowed. Omit [programfile]
  -Eex[:in]       specify the default external and internal character encodings
  -Fpattern       split() pattern for autosplit (-a)
  -i[extension]   edit ARGV files in place (make backup if extension supplied)
  -Idirectory     specify $LOAD_PATH directory (may be used more than once)
  -l              enable line ending processing
  -n              assume 'while gets(); ... end' loop around your script
  -p              assume loop like -n but print line also like sed
  -rlibrary       require the library, before executing your script
  -s              enable some switch parsing for switches after script name
  -S              look for the script using PATH environment variable
  -T[level]       turn on tainting checks
  -v              print version number, then turn on verbose mode
  -w              turn warnings on for your script
  -W[level]       set warning level; 0=silence, 1=medium, 2=verbose (default for
 level)
  -x[directory]   strip off text before #!ruby line and perhaps cd to directory
  --copyright     print the copyright
  --version       print the version

C:\Documents and Settings\Lindows>ruby --version
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

C:\Documents and Settings\Lindows>ruby --copyright
ruby - Copyright (C) 1993-2010 Yukihiro Matsumoto

http://www.hackdig.com/?01/hack-17772.htm

Arachni是一个开源的,功能全面,模块化,高性能的Ruby框架,旨在对帮助渗透测试人员和管理人员评估Web应用程序的安全性。

它是聪明,它培养本身由在扫描过程中从Web应用程序的行为监测和学习,并且能够使用为了许多因素正确评估结果的可信性和智能识别(或避免)来执行荟萃分析假-positives。

不同于其他的扫描仪,它考虑到web应用的动态特性,可以检测同时通过的一个Web应用程序的圈复杂的路径行进引起的变化,并能相应地调整自身。通过这种方式,攻击/输入向量,将通过非人类否则是不可检测的可以无缝地处理。

此外,由于其集成的浏览器环境中,它也可以进行审计和检查客户端代码,以及支持高度复杂的Web应用程序,由于大量使用的技术如JavaScript,HTML5,DOM操作和AJAX。

最后,它是灵活,足以涵盖大量的使用案例,从一个简单的命令行扫描工具,以扫描仪的全球高性能网格,在Ruby库允许脚本审核,对多用户多扫描网络协作平台。

JavaEye3.0开发手记之一 - 我的开发环境

http://www.iteye.com/topic/113056

JavaEye网站的RoR性能优化经验谈

http://www.iteye.com/topic/157731?page=1

RoR应用的部署包括操作系统,Web服务器,应用服务器和数据库四个方面:

一、操作系统

1、发行版本

2、文件系统

3、内核的网络参数调整
二、Web服务器

1、网络IO调度方式

2、网络IO传输方式

3、文件状态缓存

4、限定POST Size
5、日志文件

三、应用服务器

1、FastCGI和Lighttpd的通讯方式

2、FastCGI进程应该开多少个合适?

四、数据库

1、对数据库表要适当的创建索引
2、尽量避免大表的全表扫描和数据库的硬盘IO

Rails应用程序的优化

一、ruby解析器的优化

二、缓存的使用

1、对象缓存

2、查询缓存

3、页面局部缓存

三、应用代码的优化

1、link_to

2、正则表达式
Rails应用程序的内存泄漏问题和解决

1、HttpSession导致的内存泄漏
2、数据库连接释放不彻底

3、用静态变量持有全局共享数据
当遇到了难以解决和定位的内存泄漏问题,Ruby也有类似Java的内存Profiler工具:

1、Memory Profiler

2、Bleak_house

中心思想:让ror处理越少的工作,网站就越快
1. 全文检索让ferret作, 渲染之前加个处理,把常用关键字cache起来
2. 统计,特别是blog等不需要很强实效的,可以写一个rake task然后加入cron job在负载低的时候生成到public目录 json数据格式,然后客户端ajax拉回来渲染结果
3. 正文内容避免用ajax,因为如果算上在搜索引擎上的损失,ajax拉正文内容的成本是非常高的
4. memcache, memcache, memcache!
5. 我始终看不到 ajax 作的内容提交和用户登录的有点
6. 插件 simple_captcha 里面有一个 rake task 移除过期的图片,可以改一改,放一个cron job移除过期的session

http://hacketyhack.net/get/

http://scratch.mit.edu/download

http://hank4ever.iteye.com/blog/249139

 
松本行弘(Matz)是日本一家开源软件公司的程序员,有15年的编程经验。在工作中,他希望有一种比 Perl 强大,比 Python 更面向对象的语言。从1993年2月,他开始设计一个全新的自己的语言,1994年12月发布了第一个 alpha版本,
并 且 将 这 种 新 语 言 定 名 为Ruby ( 红 宝 石 ) 。   

 


Linux Ruby
www
    broadview.com.cn
    rubyforge.org/projects/rubyinstaller/
    gems.rubyforge.org

dos (RubyGems ruby包管理器)

    --查看版本
    ruby -v
    --ruby 安装
    gem install rails --remote
    --rails 安装
    gem insatll rails --include-dependencies
    rails -v
       
wget

    wget http://rubyforge.org/frs/download.php/7858/ruby-1.8.4.tar.gz
    wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1..8.4.tar.gz
shell
    tar zxvf ruby-1.8.4.tar.gz
    cd ruby-1.8.4
    ./configure -perfix=$HOME
    make
    make install

wget http://rubyforge.org/frs/download.php/7858/ruby-1.8.4.tar.gz

end

原文地址:https://www.cnblogs.com/lindows/p/14390606.html