Skip to content

Instantly share code, notes, and snippets.

View phith0n's full-sized avatar
🎯
Focusing

Owen Gong phith0n

🎯
Focusing
View GitHub Profile
@phith0n
phith0n / app.py
Last active March 8, 2021 07:52
一个小挑战(For Windows):这个代码中可能存在什么漏洞
import os
import posixpath
from werkzeug.utils import secure_filename
from flask import Flask, redirect, url_for, abort, request, send_file
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'upload')
def allowed_file(filename):
return '.' in filename and \
@phith0n
phith0n / chrome_install_headless.sh
Last active December 10, 2021 08:56 — forked from Leotomas/chrome_install_headless.sh
Install Chrome headless on Ubuntu
export CHROME_BIN=/usr/bin/google-chrome
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sudo apt-get update
sudo apt-get install -y libappindicator1 fonts-liberation libasound2 libgconf-2-4 libnspr4 libxss1 libnss3 xdg-utils
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
@phith0n
phith0n / README.md
Last active December 23, 2019 11:15
『代码审计』小密圈入圈指南

『代码审计』小密圈入圈指南

加入代码审计小密圈: https://wx.xiaomiquan.com/mweb/views/joingroup/join_group.html?group_id=2212251881

代码审计小密圈从去年11月成立至今已有近半年时间,一直没有把我们的宗旨和规则明文写出来,一是我比较懒事儿也比较多,二是我发现大家都是善良的小纯白,并没有谁是揣着恶意来到这里,所以这个事儿也不是特别急。但一直没有成文的规定总不是办法,有的新人进来后,四顾何茫茫,不领要旨,可能会觉得钱花的不值。

宗旨

办这个圈子,脑子里有几句话,我一直奉为圭臬,在这里说一下。

@phith0n
phith0n / fpm.py
Last active April 16, 2024 13:04
Fastcgi PHP-FPM Client && Code Execution
import socket
import random
import argparse
import sys
from io import BytesIO
# Referrer: https://github.com/wuyunfeng/Python-FastCGI-Client
PY2 = True if sys.version_info.major == 2 else False
@phith0n
phith0n / example.md
Last active November 22, 2023 06:25
sort a list by 2 key

image

@phith0n
phith0n / README.md
Last active May 1, 2020 13:43
一个基于redis-py的bloom filter算法实现,哈希算法:MurmurHash。用于海量数据的去重。
@phith0n
phith0n / sqlmap_api.dockerfile
Created November 5, 2016 20:38
Docker提高生产力之SQLMAP API
FROM python:2.7
ENV VERSION 1.0.11
RUN apt-get update && apt-get install -y \
git --no-install-recommends
RUN mkdir /app
WORKDIR /app
@phith0n
phith0n / php5.dockerfile
Last active May 19, 2021 12:40
分享自己用的两份Alpine-php-fpm的dockerfile
FROM alpine:3.3
MAINTAINER Didiet Noor <dnoor@kulina.id> (@lynxluna)
# Patch APK Mirror to YKode
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.3/main" > /etc/apk/repositories
ENV TIMEZONE Asia/Shanghai
ENV PHP_MEMORY_LIMIT 512M
ENV MAX_UPLOAD 50M
@phith0n
phith0n / lcx.c
Created March 12, 2016 14:11
lcx.c
#include <sys/time.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdio.h>
@phith0n
phith0n / class_decorator.py
Created January 27, 2016 14:47
class decorator
class Tx(object):
def __init__(self):
print("Tx:init")
self.something()
def something(self):
print("Tx:something")
def otherthing(self):
print("Tx:otherthing")