- OS: Ubuntu 16.04.3 LTS
- libc: 2.23-0ubuntu10
https://sourceware.org/bugzilla/show_bug.cgi?id=23151
require 'net/https' | |
https = Net::HTTP.new('bad', 12345) | |
https.use_ssl = true | |
https.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
https.ca_file = 'certs/roots.pem' | |
https.start { |h| | |
response = h.get("/") | |
puts response.body | |
} |
KERNDIR := /lib/modules/`uname -r`/build | |
BUILD_DIR := $(shell pwd) | |
VERBOSE = 0 | |
obj-m := syscall_replace.o | |
smallmod-objs := syscall_replace.o | |
all: | |
bash set_syscall_table_address.sh | |
make -C $(KERNDIR) SUBDIRS=$(BUILD_DIR) KBUILD_VERBOSE=$(VERBOSE) modules |
[[snippets]] | |
description = "Create a .keep file in all empty directories" | |
command = "find . -type d -empty -print0 | xargs -0 -I % touch %/.keep" | |
[[snippets]] | |
description = "Display all listen port" | |
command = "lsof -Pan -i tcp -i udp" | |
[[snippets]] | |
description = "Process with the largest memory usage" |
func TestRedis(t *testing.T) { | |
s, _ := testutil.PrepareTestRedis() | |
for i := 0; i < 10000; i++ { | |
s.Set("key"+strconv.Itoa(i), "hoge"+strconv.Itoa(i)) | |
} | |
client := redis.NewClient(&redis.Options{Addr: s.Addr()}) | |
// 普通にループ | |
result := map[string]string{} | |
for i := 0; i < 10000; i++ { |
http.HandleFunc("/slash", func(w http.ResponseWriter, r *http.Request) { | |
s, err := slack.SlashCommandParse(r) | |
if err != nil { | |
w.WriteHeader(http.StatusInternalServerError) | |
return | |
} | |
if !s.ValidateToken(verificationToken) { | |
w.WriteHeader(http.StatusUnauthorized) | |
return |
#!/usr/bin/python | |
#coding:utf-8 | |
import json, toml, hashlib | |
groups = { | |
'default': [], | |
'develop': [] | |
} |
https://sourceware.org/bugzilla/show_bug.cgi?id=23151
FROM centos:7 | |
RUN yum -y update \ | |
&& yum -y groupinstall "Development tools" \ | |
&& yum -y install git vim openssl openssl-devel nspr nspr-devel nss nss-devel \ | |
file file-devel popt popt-devel lua-static lua-devel db4 db4-devel wget tar \ | |
libarchive libarchive-devel strace gdb-gdbserver libdb-devel lzma xz-devel | |
RUN git clone https://github.com/rpm-software-management/rpm.git \ | |
&& cd rpm \ | |
&& git checkout rpm-4.11.3-release \ |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"syscall" | |
"unsafe" | |
"golang.org/x/sys/unix" |
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: check-vulnerabilities | |
spec: | |
validationFailureAction: enforce | |
webhookTimeoutSeconds: 10 | |
failurePolicy: Fail | |
rules: | |
- name: no-critical-vuln |