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
// | |
// main.swift | |
// AggregateAudioVolumeControl | |
// | |
// Created by Gurhan Polat on 20.12.2020. | |
// | |
import Foundation | |
import Cocoa | |
import AVFoundation |
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
{ | |
"configurations": [ | |
{ | |
"name": "Linux", | |
"includePath": [ | |
"${workspaceFolder}/**", | |
"/usr/lib/gcc/x86_64-linux-gnu/9/include", | |
"/lib/modules/5.3.0-29-generic/build/arch/x86/include", | |
"/lib/modules/5.3.0-29-generic/build/arch/x86/include/generated", | |
"/lib/modules/5.3.0-29-generic/build/include", |
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
gcc | |
-nostdinc | |
-isystem | |
/usr/lib/gcc/x86_64-linux-gnu/9/include | |
-I./arch/x86/include | |
-I./arch/x86/include/generated | |
-I./include | |
-I./arch/x86/include/uapi |
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
make -C /lib/modules/5.3.0-29-generic/build M=/home/guru/Desktop/lkm modules | |
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-29-generic' | |
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ | |
echo >&2; \ | |
echo >&2 " ERROR: Kernel configuration is invalid."; \ | |
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ | |
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ | |
echo >&2 ; \ | |
/bin/false) | |
make -f ./scripts/Makefile.build obj=/home/guru/Desktop/lkm need-modorder=1 |
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
obj-m += lkm.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/init.h> | |
#define DEVICENAME "LKMDevice" | |
#define bail_assert(s, label, fmt, ...) \ | |
do { \ | |
if (!(s)) { \ | |
printk(KERN_ALERT DEVICENAME " " fmt "\n", ##__VA_ARGS__); \ |
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
#define KEYWORD L"APIHook" | |
static BOOL WINAPI MY_DeleteFileW(_In_ LPCWSTR lpFileName) | |
{ | |
// Dosya isminde KEYWORD(L"APIHook") var mi? | |
// Var ise, LastError'u ERROR_ACCESS_DENIED yap ve hata don. | |
if (wcsstr(lpFileName, KEYWORD)) { | |
SetLastError(ERROR_ACCESS_DENIED); | |
return FALSE; | |
} |
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
#include <windows.h> | |
#include "include/detours.h" | |
#pragma comment(lib, "detours.lib") | |
#define KEYWORD L"APIHook" | |
/* | |
MS_ ile baslayan fonksiyonlar, | |
Microsoft'un kendi API cagrilarina gosterici |
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
#include <Windows.h> | |
#include <Psapi.h> | |
HANDLE OpenProcessInject(const wchar_t *procname) | |
{ | |
DWORD need; | |
DWORD pids[2048] = { 0 }; | |
if (!EnumProcesses(pids, sizeof(pids), &need)) | |
return NULL; |