Path: blob/master/spec/support/acceptance/command_shell/python_ssl.rb
70334 views
# frozen_string_literal: true12module Acceptance::Session3PYTHON_SSL_IMAGE = 'public.ecr.aws/n5b4u6h0/zerosteiner/pyenv@sha256:e686265001ee43333f14c896d8362970e816c5a7c661a6fa7e37a90770c9108a'4PYTHON_SSL_CONTAINER_CMD = '$(command -v podman || command -v docker)'56PYTHON_SSL_MODULE_TESTS = [7{8name: 'post/test/unix',9platforms: [10:linux,11:osx,12[13:windows,14{15skip: true,16reason: 'Unix only test'17}18]19],20skipped: false,21lines: {22linux: { known_failures: [] },23osx: { known_failures: [] },24windows: { known_failures: [] }25}26}27].freeze2829def self.python_ssl_config(pyenv_version)30image = PYTHON_SSL_IMAGE31runtime = PYTHON_SSL_CONTAINER_CMD3233{34payloads: [35{36name: 'python/shell_reverse_tcp_ssl',37extension: '.py',38platforms: [:linux],39execute_cmd: [40'bash', '-c',41"#{runtime} run --rm --network host -v \${payload_path}:\${payload_path}:Z -e PYENV_VERSION=#{pyenv_version} #{image} python \${payload_path}"42],43generate_options: {44'-f': 'raw'45},46datastore: {47global: {},48module: {}49}50},51{52name: 'cmd/unix/reverse_python_ssl',53extension: '.sh',54platforms: [:linux],55execute_cmd: [56'bash', '-c',57"#{runtime} run --rm --network host -v \${payload_path}:\${payload_path}:Z -e PYENV_VERSION=#{pyenv_version} #{image} sh \${payload_path}"58],59generate_options: {60'-f': 'raw'61},62datastore: {63global: {},64module: {}65}66}67],68module_tests: PYTHON_SSL_MODULE_TESTS69}70end7172PYTHON_SSL_2_6 = python_ssl_config('2.6.9-no-pip')73PYTHON_SSL_2_7 = python_ssl_config('2.7.18')74PYTHON_SSL_3_4 = python_ssl_config('3.4.10')75PYTHON_SSL_3_13 = python_ssl_config('3.13.7')76end777879