Skip to content

Instantly share code, notes, and snippets.

View jiva's full-sized avatar
💥
breaking shit

jiva

💥
breaking shit
View GitHub Profile
@jiva
jiva / delta_patch.py
Created February 20, 2024 23:13 — forked from wumb0/delta_patch.py
a script for applying MS patch deltas
from ctypes import (windll, wintypes, c_uint64, cast, POINTER, Union, c_ubyte,
LittleEndianStructure, byref, c_size_t)
import zlib
# types and flags
DELTA_FLAG_TYPE = c_uint64
DELTA_FLAG_NONE = 0x00000000
DELTA_APPLY_FLAG_ALLOW_PA19 = 0x00000001
@jiva
jiva / PatchExtract.ps1
Created February 20, 2024 23:12 — forked from wumb0/PatchExtract.ps1
a gist copy of patch extract by Greg Lanaris
<#
____ ______ ______ ____ __ __
/\ _`\ /\ _ \ /\__ _\/\ _`\ /\ \/\ \
\ \ \L\ \\ \ \L\ \\/_/\ \/\ \ \/\_\\ \ \_\ \
\ \ ,__/ \ \ __ \ \ \ \ \ \ \/_/_\ \ _ \
\ \ \/ \ \ \/\ \ \ \ \ \ \ \L\ \\ \ \ \ \
\ \_\ \ \_\ \_\ \ \_\ \ \____/ \ \_\ \_\
\/_/ \/_/\/_/ \/_/ \/___/ \/_/\/_/
@jiva
jiva / phpdangerousfuncs.md
Created February 11, 2020 15:59 — forked from mccabe615/phpdangerousfuncs.md
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@jiva
jiva / socks-proxy-simple.py
Created July 17, 2019 21:48 — forked from nneonneo/socks-proxy-simple.py
A simple socks server via python - updated for Pythonista (iOS)
#!python2
# -*- coding: utf-8 -*-
# 一个简单的 Socks5 代理服务器 , 只有 server 端 , 而且代码比较乱
# 不是很稳定 , 而且使用多线程并不是 select 模型
# Author : WangYihang <wangyihanger@gmail.com>
import socket
import threading
import sys
@jiva
jiva / logstash.conf
Created November 5, 2016 01:29 — forked from robinsmidsrod/logstash.conf
Logging Windows event log information to Logstash using nxlog and JSON transport
input {
tcp {
type => "syslog"
host => "127.0.0.1"
port => 3514
}
tcp {
type => "eventlog"
host => "10.1.1.2"
port => 3515
@jiva
jiva / gist:6250a472d3f8b02e2ea241d32a6a4282
Created May 9, 2016 21:34 — forked from jpetitcolas/gist:5967887
Encode/decode a base64 encoded string in PostGreSQL
-- Decoding
SELECT CONVERT_FROM(DECODE(field, 'BASE64'), 'UTF-8') FROM table;
-- Encoding
SELECT ENCODE(CONVERT_TO(field, 'UTF-8'), 'base64') FROM table;
@jiva
jiva / keybase.md
Created October 5, 2014 18:46
keybase.md

Keybase proof

I hereby claim:

  • I am jiva on github.
  • I am jiva (https://keybase.io/jiva) on keybase.
  • I have a public key whose fingerprint is 83F7 3319 11BB C19A 31E7 C7F9 84CF 57DB 6526 410A

To claim this, I am signing this object:

@jiva
jiva / dns_cap.py
Created August 26, 2014 01:30
Capture DNS traffic using dns_client.py - for VERT interview - by jiva
#!/usr/bin/env python
# dns_cap.py for VERT interview
# by jiva
#
# CHALLENGE NOTES
# - Build a tool that will capture dns packets. [dns_cap.py]
# - MUST dump the answer to an 'A' type query in a human readable format
# - MUST identify the source and destination systems of all queries
# - MUST report the query type of all queries
@jiva
jiva / dns_client.py
Created August 25, 2014 22:12
DNS Client written for VERT interview - by jiva
#!/usr/bin/env python
# DNS client for VERT interview
# by jiva
#
# CHALLENGE NOTES
# - Build a DNS Client (Send a request / Recv a response) [dns_client.py]
# - MUST allow 'A' type queries.
# - MUST display the answer portion of the response
# - MUST use python's socket library