This file contains 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
@Grab('io.undertow:undertow-core:2.2.25.Final') | |
@Grab('io.undertow:undertow-servlet:2.2.25.Final') | |
@Grab('com.squareup.okhttp3:okhttp:4.9.1') | |
import io.undertow.Undertow | |
import io.undertow.channels.DetachableStreamSinkChannel | |
import io.undertow.server.HttpServerExchange | |
import io.undertow.servlet.Servlets | |
import io.undertow.servlet.api.DeploymentInfo | |
import io.undertow.servlet.api.ServletContainer |
This file contains 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 _h { | |
local postprompt=$1 | |
local prompt | |
if [[ $# -eq 1 || $2 == '-' ]]; then | |
prompt=$(cat) | |
else | |
prompt="$2" | |
fi | |
prompt=$(echo "$prompt"$'\n'"$postprompt" | jq -sR '@text') |
This file contains 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
g++ -v -std=c++11 -fno-exceptions -fno-rtti -nostdlib \ | |
/usr/lib/x86_64-linux-gnu/{Scrt1.o,crti.o} \ | |
/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o \ | |
example.cpp -o example \ | |
-lgcc \ | |
-Wl,--push-state -Wl,--as-needed -lgcc_s -Wl,--pop-state \ | |
-lc -lgcc \ | |
-Wl,--push-state -Wl,--as-needed -lgcc_s -Wl,--pop-state \ | |
/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o \ | |
/usr/lib/x86_64-linux-gnu/crtn.o |
This file contains 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
struct link_map { | |
char _other[8]; | |
char *l_name; | |
}; | |
uprobe:/usr/lib/x86_64-linux-gnu/libc.so.6:dlopen { | |
printf("opening %s\n", str(reg("di"))); | |
} | |
uprobe:/usr/lib/x86_64-linux-gnu/libc.so.6:dlclose { | |
$lm = (struct link_map*)reg("di"); | |
printf("closing %s\n", str($lm->l_name)); |
This file contains 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
struct link_map { | |
char _other[8]; | |
char *l_name; | |
char _other2[776]; | |
unsigned l_direct_opencount; | |
}; | |
uprobe:/usr/lib/x86_64-linux-gnu/libc.so.6:dlopen { | |
@enter[tid] = arg0; | |
} | |
uretprobe:/usr/lib/x86_64-linux-gnu/libc.so.6:dlopen { |
This file contains 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
import groovy.transform.CompileStatic | |
import java.lang.invoke.* | |
import static groovyjarjarasm.asm.Opcodes.H_INVOKESTATIC | |
class Logger { | |
private final String name | |
Logger(Class cls) { | |
name = cls.name |
This file contains 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
#include <iostream> | |
#include <type_traits> | |
struct type_to_convert { | |
type_to_convert(int i) : i(i) {}; | |
type_to_convert(const type_to_convert&) = delete; | |
type_to_convert(type_to_convert&&) = delete; | |
int i; | |
}; |
This file contains 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
FROM php:7.2.25 | |
ADD config.m4 php_rinit_error.h rinit_error.c /opt/rinit_error/ | |
RUN cd /opt/rinit_error && phpize && ./configure && make -j install && make clean | |
ADD index.php /var/www/html | |
CMD ["php", "-S", "0.0.0.0:8080", "-d", "memory_limit=2m", \ | |
"-d", "extension=rinit_error.so", "index.php"] |
This file contains 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 'json' | |
data = ARGF.read | |
json = JSON.load data | |
json = json['results']['data'] | |
json = json.select { |x| x[6] == 'v' } | |
json = json.map { |x| [x[5], JSON.load(x[7])] } | |
puts JSON.dump(json) | |
This file contains 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 io.sqreen.powerwaf.test; | |
import org.junit.runner.notification.RunNotifier; | |
import org.junit.runners.BlockJUnit4ClassRunner; | |
import org.junit.runners.model.FrameworkMethod; | |
import org.junit.runners.model.InitializationError; | |
import org.junit.runners.model.Statement; | |
import org.junit.runners.model.TestClass; | |
import java.lang.reflect.UndeclaredThrowableException; |
NewerOlder