Penetration Test - Using_Scripting_in_Pen_Testing(5)

2020-12-18 20:34

阅读:412

标签:written   argv   method   rails   methods   close   quick   run   esc   

Ruby Script

Demo

Portscan.rb

#!/usr/bin/ruby

require ‘socket‘

TARGET = ARGV[0] || ‘192.168.2.22‘
MINPORT = ARGV[1] || 22
MAXPORT = ARGV[2] || 80

$i = MINPORT.to_i
while $i 

Run the following commands

sudo ruby portscan.rb 192.168.2.22 22 80
sudo ruby portscan.rb 192.168.2.22 20 80

技术图片

QUICK REVIEW
  • Ruby is a powerful object-oriented language that can do far more than just scripting
  • Ruby‘s popularity is related to the Ruby on Rails server-side web application framework written in Ruby
  • Ruby treats everything as an object and relies heavily on methods and attributes

Penetration Test - Using_Scripting_in_Pen_Testing(5)

标签:written   argv   method   rails   methods   close   quick   run   esc   

原文地址:https://www.cnblogs.com/keepmoving1113/p/14129433.html


评论


亲,登录后才可以留言!