Skip to content

Instantly share code, notes, and snippets.

@kato-megumi
kato-megumi / bitsadmin.md
Created May 15, 2018 16:58 — forked from xnohat/bitsadmin.md
Use bitsadmin to download via the command line on Windows 7 (8?)

Download via the command line on Windows 7

If you want to test your connection or have some other reason to use the command line to download a file, this is how.

See http://superuser.com/a/284147 for more information.

Open cmd.exe and use this format:

bitsadmin /transfer debjob /download /priority normal http://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/debian-live-8.7.1-i386-xfce-desktop.iso D:\Users\[Username]\Downloads\debian-live-8.7.1-i386-xfce-desktop.iso
@kato-megumi
kato-megumi / pickle_exploit_generator.py
Created July 20, 2018 15:27 — forked from 0xBADCA7/pickle_exploit_generator.py
Python cPickle/pickle exploit generator
#!/usr/bin/env python
'''
0xBADCA7
Vodka goes down the throat better with pickle.
This script generates pickled object representation. Good for CTFs.
Params: [1] function, [2] parameter, [3] pickle type
Sample run:
import time,sys,math
from ctypes import c_int, c_uint
from ctypes import CDLL
# http://www.mscs.dal.ca/~selinger/random/
#implement glibc rand function
libc = CDLL('libc.so.6') # or just use libc :))
def srand(seed):
srand.r = [0 for _ in range(34)]
srand.r[0] = c_int(seed).value
for i in range(1, 31):
@kato-megumi
kato-megumi / sqlmap-cheat-sheet.md
Created August 15, 2018 01:04 — forked from jkullick/sqlmap-cheat-sheet.md
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@kato-megumi
kato-megumi / log-keyboard.md
Created November 11, 2018 09:21 — forked from pstuifzand/log-keyboard.md
Keyboard logger
import bisect
from math import *
import numpy as np
import random
#bisect.insort(list, n) chen vao sorted list
def task1(gene):
x = 0
for bit in gene: x=x*2+bit
x = -1+x*(2./2**len(gene))
return x*sin(pi*x*10)+1
import gym
import numpy as np
import operator as op
import random
import copy
import math
import time
VERBOSE = False
N_COLS = 500 # number of cols (nodes) in a single-row CGP
LEVEL_BACK = 500
import networkx as nx
import numpy as np
from operator import attrgetter
cal_times = 0
def readfile(name): #test/10a280.clt
import networkx as nx
import numpy as np
from operator import attrgetter
cal_times = 0
def readfile(name): #test/10a280.clt
global v_n,c_n,vs,cs
with open(name) as f:
@kato-megumi
kato-megumi / scapy_bridge.py
Created March 23, 2020 13:38 — forked from eXenon/scapy_bridge.py
Use scapy as a modifying proxy
#!/usr/bin/python2
"""
Use scapy to modify packets going through your machine.
Based on nfqueue to block packets in the kernel and pass them to scapy for validation
"""
import nfqueue
from scapy.all import *
import os