Skip to content

Instantly share code, notes, and snippets.

View bongbongco's full-sized avatar

LeeSeungyong bongbongco

View GitHub Profile
@bongbongco
bongbongco / fork_pt.c
Last active December 18, 2016 13:19
fork - TGID, PID
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/unistd.h>
int main(void)
{
int pid;
@bongbongco
bongbongco / vfork_pt.c
Created December 18, 2016 13:19
vfork - TGID, PID
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/unistd.h>
int main(void)
{
int pid;
@bongbongco
bongbongco / thread.c
Last active December 18, 2016 06:44
리눅스 쓰레드 생성
#define CLONE_VM 0x00000100 /* set if VM shared between processes */
#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
#define CLONE_THREAD 0x00010000 /* Same thread group? */
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define _GNU_SOURCE
# RTLO Rename Utility v1.0
import sys
import os
ext = ""
if sys.platform == 'linux-i386' or sys.platform == 'linux2':
os.system("clear")
elif sys.platform == 'win32':
@bongbongco
bongbongco / Etas_deduplicate.py
Last active November 1, 2016 05:19
업무용 프로그램 목록 수집 스크립트 결과에서 중복되는 내용 제외하고 WAS 디렉터리 관련 내용 합치기
#-*- coding: utf-8 -*-
import os
import shutil
import re
def search(dirName):
fileNameDictionary = {}
num = 0
#!/usr/bin/python
# This is a simple port-forward / proxy, written using only the default python
# library. If you want to make a suggestion or fix something you can contact-me
# at voorloop_at_gmail.com
# Distributed over IDC(I Don't Care) license
import socket
import select
import time
import sys
from socket import *
HOST = "google.com"
PORT = 80
bypassSocket = socket(AF_INET, SOCK_STREAM)
bypassSocket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
bypassSocket.connect((HOST, PORT))
packet = []
import struct, hashlib, time
import binascii
import os
from Crypto.Cipher import AES
def decrypt_file(key, in_filename, out_filename, chunksize=24 * 1024):
with open(in_filename, 'rb') as infile:
origsize = struct.unpack('<Q', infile.read(struct.calcsize('Q')))[0]
iv = infile.read(16)
#-*- coding: UTF-8 -*-
from requests import get
from bs4 import BeautifulSoup
from random import choice
from time import sleep
user_agent_list = [
'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0',
# coding=utf-8
#code by xi4okv QQ:48011203 site:xiaokui.cc
import urllib2 as url
import urllib2
import string
import urllib
import re
import sys