#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
#!/usr/bin/env ruby | |
# | |
# KING SABRI | @KINGSABRI | |
# Usage: | |
# ruby noawk.rb file.txt | |
# | |
# One-liner: | |
# ruby -e 'h={};File.read("text.txt").split("\n").map{|l|l.split(":", 2)}.map{|k, v|k.strip!;v.strip!; h[k] ? h[k] << v : h[k] = [v]};h.each {|k, v| puts "#{k}:\t#{v.join(", ")}"}' | |
# |
#!/usr/bin/env ruby | |
# | |
# | |
require 'nokogiri' | |
# Validate an XML document against a Schema. | |
doc = Nokogiri::XML(File.read "cve-small.xml") | |
items = doc.search("item") |
require "fiddle/import" | |
require 'fiddle/types' | |
# オリジナル(Win32APIライブラリを使う版)はこちら | |
# https://rubyist.g.hatena.ne.jp/edvakf/20110405/1301973681 | |
module WIN32API | |
extend Fiddle::Importer | |
dlload 'C:\\Windows\\System32\\kernel32.dll' | |
include Fiddle::Win32Types | |
extern 'DWORD GetCurrentProcessId()' |
# Support for http digest auth | |
# Discovered here: http://johan.bingodisk.com/public/code/net_digest_auth.rb | |
require 'digest/md5' | |
require 'net/http' | |
module Net | |
module HTTPHeader | |
@@nonce_count = -1 | |
CNONCE = Digest::MD5.new("%x" % (Time.now.to_i + rand(65535))).hexdigest |
### Keybase proof | |
I hereby claim: | |
* I am KINGSABRI on github. | |
* I am kingsabri (https://keybase.io/kingsabri) on keybase. | |
* I have a public key whose fingerprint is 288B EDC0 AACE 09C2 F865 4605 489B 2AEE 3B5C 5ACF | |
To claim this, I am signing this object: |
#!/usr/bin/ruby | |
# KING SABRI | @KINGSABRI | |
# Flipp, Upsite down text | |
subs = { | |
" " => " ", | |
"a" => "ɐ", | |
"b" => "q", | |
"c" => "ɔ", | |
"d" => "p", | |
"e" => "ǝ", |
# Reproduce | |
## Terminal 1 | |
ncat -lvp 5555 -e /bin/sh | |
## Terminal 2 | |
ncat -v localhost 5555 | |
# Python pty spawn | |
python -c 'import pty; pty.spawn("/bin/bash")' | |
# test interactive mode with interactive linux command |
# In Java, the following expression | |
# Integer.toHexString(1286933134) | |
# produces: | |
# "4cb50a8e" | |
# and | |
# Integer.toHexString(-1286933134) | |
# produces: | |
# "b34af572" | |
# ref doc: http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#toHexString(int) |
#!/usr/bin/evn ruby | |
require 'net/ssh' | |
Net::SSH.start("127.0.0.1", 'fish', :password => 'fisheye', :verbose => :debug) do |ssh| | |
# Forward connections coming on port 3333 to port 3389 of attacker.zone | |
ssh.forward.local('0.0.0.0', 3333, "172.16.16.136", 80) | |
puts "[+] Starting SSH port forward tunnel" | |
ssh.loop { true } | |
end |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">