Skip to content

Instantly share code, notes, and snippets.

View KTZgraph's full-sized avatar
🎯
Focusing on React, UX, UI

KTZgraph

🎯
Focusing on React, UX, UI
View GitHub Profile
@KTZgraph
KTZgraph / s3_backup.py
Created September 27, 2020 16:54 — forked from ipmb/s3_backup.py
#!/usr/bin/env python
import datetime
import fnmatch
from functools import partial
import gzip
import json
import os
import shutil
import socket
@KTZgraph
KTZgraph / nginx.conf
Created September 27, 2020 16:54 — forked from ipmb/nginx.conf
Hack to put Google auth in front of Kibana and ES
upstream elasticsearch {
# google auth proxy -> elasticsearch
server 127.0.0.1:9201;
}
server {
root /path/to/kibana;
# insert standard Nginx boilerplate...
from __future__ import unicode_literals
import logging
# built-in attributes on LogRecord. Used to determine what is passed in `extras`
RESERVED_ATTRS = (
'args', 'asctime', 'created', 'exc_info', 'exc_text', 'filename',
'funcName', 'levelname', 'levelno', 'lineno', 'module',
'msecs', 'message', 'msg', 'name', 'pathname', 'process',
'processName', 'relativeCreated', 'stack_info', 'thread', 'threadName')
@KTZgraph
KTZgraph / settings.py
Created September 27, 2020 16:48 — forked from ipmb/settings.py
Django logging example
import logging.config
import os
from django.utils.log import DEFAULT_LOGGING
# Disable Django's logging setup
LOGGING_CONFIG = None
LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper()
logging.config.dictConfig({
@KTZgraph
KTZgraph / quick_sort.py
Created September 17, 2020 21:37
simple quick sort
def partition(start, end):
pivot = my_list[start]
low = start + 1
high = end
while True:
while low <= high and my_list[high] >= pivot:
high = high - 1
while low <= high and my_list[low] <= pivot:
low = low + 1
if low <= high:
@KTZgraph
KTZgraph / solve.sage
Created July 13, 2020 21:25 — forked from yytasbag/solve.sage
TSGCTF 2020 beginner crypto
from Crypto.Util.number import *
# calculate the solution to 2^10000 * x = 1002773875431658367671665822006771085816631054109509173556585546508965236428620487083647585179992085437922318783218149808537210712780660412301729655917441546549321914516504576 mod 5^174
R.<x> = PolynomialRing(Integers(5^174), implementation='NTL')
f = 2^10000 * x - 1002773875431658367671665822006771085816631054109509173556585546508965236428620487083647585179992085437922318783218149808537210712780660412301729655917441546549321914516504576
print(f.monic())
flag = R(-40911366519048706766028794026595817244329662170458953600729420435667708075268681595360226681630085247360526719063455282924)
print(flag)
flag = long_to_bytes(850582076141850204917088272646087112157789081182432304925852879338520690155230258866308530234671754970789752036398232701)
print(flag)
@KTZgraph
KTZgraph / hanoi.hs
Created July 7, 2020 06:44 — forked from jvrmaia/hanoi.hs
Torre de Hanoi em Haskell
hanoi :: Int -> a -> a -> a -> [(a,a)]
hanoi 1 x y z = [(x,y)]
hanoi n x y z = hanoi (n-1) x y z ++ hanoi 1 x z y ++ hanoi (n-1) y z x
tamhanoi :: Int -> Int
tamhanoi n = 2^n - 1
@KTZgraph
KTZgraph / google-dorks
Created April 7, 2020 09:22 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@KTZgraph
KTZgraph / google-dorks-2015.txt
Created February 13, 2020 12:32 — forked from heiswayi/google-dorks-2015.txt
Google Dorks List 2015
intitle:index.of .bash_history
intitle:index.of .sh_history
intitle:"Index of" index.html.bak
intitle:"Index of" index.php.bak
intitle:"Index of" index.jsp.bak
intitle:"Index of" ".htpasswd" htpasswd.bak
inurl:backup intitle:index.of inurl:admin
"Index of /backup"
intitle:"Index of" index.html~
intitle:"Index of" index.php~