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
| package com.example; | |
| import static java.util.Collections.*; | |
| import java.util.Collection; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.Set; | |
| import java.util.concurrent.TimeUnit; |
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
| /* | |
| * Copyright (c) 2015 - Marcelo Teixeira Monteiro (tuxmonteiro) | |
| * All rights reserved. | |
| * | |
| * This source is subject to the Apache License, Version 2.0. | |
| * | |
| * Please see the http://www.apache.org/licenses/LICENSE-2.0 for more | |
| * information. | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| # Based from https://github.com/openresty/openresty/blob/v1.11.2.2/patches/nginx-1.11.2-ssl_cert_cb_yield.patch | |
| SSL: handled SSL_CTX_set_cert_cb() callback yielding. | |
| OpenSSL 1.0.2+ introduces SSL_CTX_set_cert_cb() to allow custom | |
| callbacks to serve the SSL certificiates and private keys dynamically | |
| and lazily. The callbacks may yield for nonblocking I/O or sleeping. | |
| Here we added support for such usage in NGINX 3rd-party modules | |
| (like ngx_lua) in NGINX's event handlers for downstream SSL | |
| connections. |
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
| #!/bin/bash | |
| DOMAIN=$1 | |
| TOKEN="$GDNS_TOKEN" | |
| CONTACT="root.${DOMAIN}." | |
| GDNS="$GDNS_HOST" | |
| CHALLENGE="$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | base64 -b300 | sed -e 's/\+/_/g' -e 's/[= ]//g' -e 's/\//_/g' | cut -c1-200)" | |
| CURL="curl -v -HContent-type:application/json -HX-Auth-Token:${TOKEN}" | |
| DOMAIN_DATA="{\"domain\": {\"name\": \"${DOMAIN}\", \"type\": \"MASTER\", \"ttl\": \"86400\", \"notes\": \"A domain\", \"primary_ns\": \"ns1.${DOMAIN}.\", \"contact\": \"${CONTACT}\", \"refresh\": 10800, \"retry\": 3600, \"expire\": 604800, \"minimum\": 10800,\"authority_type\": \"M\"}}" |
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
| private String buildFullHash(String body) throws IOException { | |
| final ByteArrayOutputStream obj = new ByteArrayOutputStream(); | |
| final GZIPOutputStream gzip = new GZIPOutputStream(obj); | |
| gzip.write(body.getBytes()); | |
| gzip.close(); | |
| byte[] fullhash = Base64.getEncoder().encode(obj.toByteArray()); | |
| return new String(fullhash); | |
| } |
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
| package com.blazemeter.demo; | |
| import org.apache.jmeter.config.Arguments; | |
| import org.apache.jmeter.config.gui.ArgumentsPanel; | |
| import org.apache.jmeter.control.LoopController; | |
| import org.apache.jmeter.control.gui.LoopControlPanel; | |
| import org.apache.jmeter.control.gui.TestPlanGui; | |
| import org.apache.jmeter.engine.StandardJMeterEngine; | |
| import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui; | |
| import org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy; |
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
| class MapInline { | |
| private Map<> inline(String id) { | |
| return Stream.of(new AbstractMap.SimpleImmutableEntry<>("environment", id)).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); | |
| // OR Stream.of(id).collect(Collectors.toMap(i -> "environment", Function.identity())); | |
| } | |
| } |
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
| function dc_trace_cmd() { | |
| local parent=`docker inspect -f '{{ .Parent }}' $1` 2>/dev/null | |
| declare -i level=$2 | |
| echo ${level}: `docker inspect -f '{{ .ContainerConfig.Cmd }}' $1 2>/dev/null` | |
| level=level+1 | |
| if [ "${parent}" != "" ]; then | |
| echo ${level}: $parent | |
| dc_trace_cmd $parent $level | |
| fi | |
| } |
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
| ##TCP FLAGS## | |
| Unskilled Attackers Pester Real Security Folks | |
| ============================================== | |
| TCPDUMP FLAGS | |
| Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Pester = PSH = [P] (Push Data) | |
| Real = RST = [R] (Reset Connection) | |
| Security = SYN = [S] (Start Connection) |
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
| # Create a folder for our new root structure | |
| $ export centos_root='/centos_image/rootfs' | |
| $ mkdir -p $centos_root | |
| # initialize rpm database | |
| $ rpm --root $centos_root --initdb | |
| # download and install the centos-release package, it contains our repository sources | |
| $ yum reinstall --downloadonly --downloaddir . centos-release | |
| $ rpm --root $centos_root -ivh centos-release*.rpm | |
| $ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
| # install yum without docs and install only the english language files during the process |
OlderNewer