Skip to content

Instantly share code, notes, and snippets.

View xacnio's full-sized avatar

Alperen Çetin xacnio

View GitHub Profile
@bats3c
bats3c / ldrloaddll_hook.c
Last active October 20, 2024 10:39
Hook LdrLoadDll to whitelist DLLs being loaded into a process
#include <stdio.h>
#include <windows.h>
#include <winternl.h>
#define dwAllowDllCount 1
CHAR cAllowDlls[dwAllowDllCount][MAX_PATH] = {
"W:\\allowed.dll"
};
VOID HookLoadDll(LPVOID lpAddr);
@maxivak
maxivak / __upload_file.md
Last active April 4, 2024 10:07
PHP upload file with curl (multipart/form-data)

We want to upload file to a server with POST HTTP request. We will use curl functions.


// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");

// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
@jpillora
jpillora / smtp-gmail-send.go
Last active October 14, 2024 17:42
Send email using Go (Golang) via GMail with net/smtp
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}