This file contains hidden or 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 'socket' | |
| HOST = 'localhost' | |
| PORT = 5555 | |
| def connect_and_close | |
| socket = TCPSocket.new(HOST, PORT) | |
| linger = [1,0].pack('ii') | |
| socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, linger) | |
| socket.close |
This file contains hidden or 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
| # encoding: utf-8 | |
| # JRUBY_OPTS="-J-Xmx4g -J-Xms4g" ruby beats_writer_ssl.rb | |
| require "socket" | |
| require "thread" | |
| require "zlib" | |
| require "json" | |
| require "openssl" | |
| Thread.abort_on_exception = true | |
| HOST="127.0.0.1" |
This file contains hidden or 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
| # written for python 2.7 | |
| # | |
| # CAKe : CEF Army Knife experiment | |
| # A versatile CEF manipulation and generation tool | |
| # | |
| # Author : Gaetan Cardinal | |
| # cardinal_gaetan |at| yahoo.fr | |
| # | |
| # Version: 0.2 | |
| # Updated: Jan 2014 |
This file contains hidden or 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
| # encoding: utf-8 | |
| # Script to test local Logstash instance for JNDI lookups (Log4j vulnerability) | |
| # | |
| # To run, copy script to Logstash folder and run: | |
| # | |
| # bin/ruby script.rb | |
| # | |
| # Script's steps: | |
| # Step 1: setup environment |
This file contains hidden or 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 'openssl' | |
| require 'net/http' | |
| def cert_from_url(url) | |
| txt = Net::HTTP.get(URI(url)) | |
| OpenSSL::X509::Certificate.new(txt) | |
| end | |
| LEAF_CERTIFICATE = OpenSSL::X509::Certificate.new %q[ | |
| -----BEGIN CERTIFICATE----- |
This file contains hidden or 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
| # reproducer for https://github.com/jruby/jruby-openssl/issues/236 | |
| # If a certificate has two trust paths, jruby doesn't prioritize using non expired certificates, while CRuby (openssl 1.1.1+) does | |
| # In this reproducer we have a leaf certificate with two possible chains: | |
| # a) leaf -> intermediate cert A -> ISRG Root X1 cross-signed by (expired) DST ROOT CA X3 -> (expired) DST ROOT CA X3 | |
| # b) leaf -> intermediate cert B -> ISRG Root X1 | |
| # JRuby will produce chain a) causing an error, while CRuby produces a valid chain b) | |
| require 'openssl' | |
| require 'net/http' | |
| def cert_from_url(url) |
This file contains hidden or 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
| Repos related to CI | |
| - [ ] [logstash-devutils](https://github.com/elastic/logstash-devutils) | |
| - [ ] [docs-tools](https://github.com/elastic/docs-tools) | |
| - [ ] [.ci](https://github.com/logstash-plugins/.ci) | |
| - [ ] [infra](https://github.com/elastic/infra/tree/master/ci/jjb/logstash-ci) (NOTE: no branch changes needed here, only adapting CI jobs) | |
| Repos associated with Docs | |
| - [ ] [logstash-docs](https://github.com/elastic/logstash-docs) |
This file contains hidden or 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
| 1. start postgres instance using docker | |
| 2. generate csv and import it to a "data" table | |
| 3. download logstash and the postgres jdbc driver | |
| 4. use logstash configuration to stress the jdbc_static filter |
This file contains hidden or 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
| # Usage: | |
| # | |
| # ruby send_broken.rb <host> <port> <CA_file> <Cert_file> <Key_file> | |
| # ruby send_broken.rb 127.0.0.1 5044 /Users/joaoduarte/certs/RootCA.crt /Users/joaoduarte/certs/Client-Root.crt /Users/joaoduarte/certs/Client-Root.key | |
| # | |
| # encoding: utf-8 | |
| require "socket" | |
| require "zlib" | |
| require "json" | |
| require "openssl" |
This file contains hidden or 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
| /tmp/logstash-7.10.1 | |
| ❯ cat cfg | |
| input { | |
| generator { | |
| codec => json | |
| message => '{"systat": {"start": {"timestamp": {"timesecs": 10}}, "intervals": {"streams": {"end": 10}}}}' | |
| count => 1 | |
| } | |
| } | |
| filter { |