This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "unicode/utf16" | |
import "unicode/utf8" | |
import "bytes" | |
func main() { | |
b := []byte{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"github.com/milosgajdos83/tenus" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"github.com/milosgajdos83/tenus" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$BASE_PATH = File.expand_path(File.dirname(__FILE__) + '/..') | |
# also find your own gem files for the executable | |
$LOAD_PATH.unshift($BASE_PATH + '/lib') | |
require 'bundler' | |
ENV["BUNDLE_GEMFILE"] = $BASE_PATH + '/Gemfile' | |
Bundler.require(:default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE posts ( | |
id BIGINT NOT NULL PRIMARY KEY, | |
name VARCHAR(255), | |
title VARCHAR(255), | |
content VARCHAR(255), | |
timestamps timestamp | |
); | |
CREATE GENERATOR POSTS_SEQ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'ffi' | |
module SSHSocket | |
extend FFI::Library | |
ffi_lib_flags :now, :global | |
ffi_lib 'libssh' | |
attach_function :ssh_init, [], :int | |
attach_function :ssh_bind_new, [], :pointer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_s_client | |
server = 'Generel Settings: ' | |
renegotiation = 'Insecure Renegotiation'.colorize(:red) | |
crime = 'SSL Compression Enabled <= CRIME - CVE-2012-4929'.colorize(:red) | |
results = %x(echo "q" | openssl s_client -host #{@server} -port #{@port} 2> /dev/null) # why ? | |
case results.downcase | |
when 'secure renegotiation is supported' | |
renegotiation = 'Secured Renegotiation'.colorize(:green) | |
when 'compression: none' |
NewerOlder