This file contains 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
--- dropbear.old 2024-07-08 08:56:16.334606650 +0900 | |
+++ dropbear 2024-07-08 09:05:31.146341355 +0900 | |
@@ -8,7 +8,7 @@ | |
display_fingerprints() { | |
local keyfile | |
- for keyfile in "/etc/dropbear/dropbear_rsa_host_key" "/etc/dropbear/dropbear_dss_host_key" "/etc/dropbear/dropbear_ecdsa_host_key" ; do | |
+ for keyfile in "/etc/dropbear/dropbear_rsa_host_key" "/etc/dropbear/dropbear_dss_host_key" "/etc/dropbear/dropbear_ecdsa_host_key" "/etc/dropbear/dropbear_ed25519_host_key" ; do | |
if [ -s "${keyfile}" ] ; then | |
echo "$(basename "${keyfile}") : $(get_fingerprint "${keyfile}")" |
This file contains 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 MC_MTU 1500 | |
#define MC_COLOR_PREFIX "\xc2\247" | |
#define MC_MOTD MC_COLOR_PREFIX "b" MC_COLOR_PREFIX "l" "FakeMCServer Test" | |
#define MC_KICK_MESSAGE "You are not white-listed on this server!" | |
typedef int type_debug_func (const char*, ...); | |
size_t mc_varintSize(unsigned char* varint) { | |
int i; | |
for(i=0;i<4;i++) if((varint[i] & 0x80) == 0) break; |
This file contains 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 TEST_CNT 10000000UL | |
void _start() { | |
for(long long i=0;i<TEST_CNT;i++) { | |
__asm( "mov $0xa9, %rax\n\t" | |
"mov $0xfee1dead, %rdi\n\t" | |
"mov $0x28121969, %rsi\n\t" | |
"mov $0x89abcdef, %rdx\n\t" | |
"syscall\n\t"); |
This file contains 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
From dd0dc8f645a038a50de65664ac072db5ca069931 Mon Sep 17 00:00:00 2001 | |
From: Dongmin Lee <[email protected]> | |
Date: Fri, 3 Nov 2023 12:59:28 +0900 | |
Subject: [PATCH] kernel/reboot: Explictly notify if halt occurred instead of | |
power off | |
When kernel_can_power_off() returns false, and reboot has called with | |
LINUX_REBOOT_CMD_POWER_OFF, kernel_halt() will be initiated instead of | |
actual power off function. |
This file contains 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
#cloud-config | |
ssh_pwauth: True | |
chpasswd: { expire: False } | |
runcmd: | |
- mkdir -p /etc/qemu/fsfreeze-hook.d | |
- echo IyEvYmluL3NoCgojIFRoaXMgc2NyaXB0IGlzIGV4ZWN1dGVkIHdoZW4gYSBndWVzdCBhZ2VudCByZWNlaXZlcyBmc2ZyZWV6ZS1mcmVlemUgYW5kCiMgZnNmcmVlemUtdGhhdyBjb21tYW5kLCBpZiBpdCBpcyBzcGVjaWZpZWQgaW4gLS1mc2ZyZWV6ZS1ob29rICgtRikKIyBvcHRpb24gb2YgcWVtdS1nYSBvciBwbGFjZWQgaW4gZGVmYXVsdCBwYXRoICgvZXRjL3FlbXUvZnNmcmVlemUtaG9vaykuCiMgV2hlbiB0aGUgYWdlbnQgcmVjZWl2ZXMgZnNmcmVlemUtZnJlZXplIHJlcXVlc3QsIHRoaXMgc2NyaXB0IGlzIGlzc3VlZCB3aXRoCiMgImZyZWV6ZSIgYXJndW1lbnQgYmVmb3JlIHRoZSBmaWxlc3lzdGVtIGlzIGZyb3plbi4gQW5kIGZvciBmc2ZyZWV6ZS10aGF3CiMgcmVxdWVzdCwgaXQgaXMgaXNzdWVkIHdpdGggInRoYXciIGFyZ3VtZW50IGFmdGVyIGZpbGVzeXN0ZW0gaXMgdGhhd2VkLgoKTE9HRklMRT0vdmFyL2xvZy9xZ2EtZnNmcmVlemUtaG9vay5sb2cKRlNGUkVFWkVfRD0kKGRpcm5hbWUgLS0gIiQwIikvZnNmcmVlemUtaG9vay5kCgojIENoZWNrIHdoZXRoZXIgZmlsZSAkMSBpcyBhIGJhY2t1cCBvciBycG0tZ2VuZXJhdGVkIGZpbGUgYW5kIHNob3VsZCBiZSBpZ25vcmVkCmlzX2lnbm9yZWRfZmlsZSgpIHsKICAgIGNhc2UgIiQxIiBpbgogICAgICAgICp+IHwgKi5iYWsgfCAqL |
This file contains 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
__uint128_t get128FromUUID(const char* uuid) { | |
__uint128_t result = 0; | |
unsigned char currentData, dashcnt = 0; | |
if(uuid[36] != 0x00) | |
return (__uint128_t)0xf << 124; // length mismatch | |
for(unsigned char i=0;i<36;i++) { | |
if(uuid[i] >= 0x30 && uuid[i] <= 0x39) currentData = uuid[i] - 0x30; // Numberic digit | |
else if(uuid[i] >= 0x41 && uuid[i] <= 0x46) currentData = 10 + uuid[i] - 0x41; // Capital letter digit | |
else if(uuid[i] >= 0x61 && uuid[i] <= 0x66) currentData = 10 + uuid[i] - 0x61; // small letter digit |
This file contains 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
const http = require('http'); | |
const API_KEY = "[INSERT_API_KEY_HERE]"; // https://data.seoul.go.kr/dataList/OA-15488/S/1/datasetView.do | |
const url = 'http://openapi.seoul.go.kr:8088/'+API_KEY+'/json/WPOSInformationTime/1/5'; | |
async function getTemp() { | |
return new Promise(function(resolve, reject) { | |
const req = http.request(url, { | |
url: url, | |
method: 'GET' | |
}, function (res) { |
This file contains 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
typedef LONG(WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW); | |
/* Ref: https://learn.microsoft.com/ko-kr/windows-server/get-started/kms-client-activation-keys */ | |
void kms_activation(const char* server_addr) { | |
HMODULE hMod = GetModuleHandleW(L"ntdll.dll"); | |
if (!hMod) { | |
fprintf(stderr, "Error: Loading ntdll.dll failed successfully"); | |
return; | |
} |
This file contains 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 <stdio.h> | |
#include <Windows.h> | |
typedef NTSTATUS(NTAPI *pdef_RtlAdjustPrivilege) (ULONG privilege,BOOLEAN enable,BOOLEAN current_thread,PBOOLEAN enabled); | |
typedef NTSTATUS(NTAPI *pdef_NtRaiseHardError)(NTSTATUS error_status,ULONG number_of_parameters,ULONG unicode_string_parameter_mask,PULONG_PTR parameters,ULONG response_option,PULONG reponse); | |
int main(void) { | |
pdef_RtlAdjustPrivilege RtlAdjustPrivilege = (pdef_RtlAdjustPrivilege)GetProcAddress(LoadLibraryA("ntdll.dll"), "RtlAdjustPrivilege"); | |
BOOLEAN enabled; | |
if (RtlAdjustPrivilege(19, TRUE, FALSE, &enabled) == 0) |
This file contains 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
// 개발자 도구 콘솔에 아래 코드를 붙여넣고 문서를 포커스하여 테스트하세요. | |
document.clear(); document.write("<br>"); | |
var pk = 0; | |
window.onkeyup = () => {pk = 0}; | |
window.onkeydown = (k) => {if(pk!=k.keyCode){document.write((+new Date())+k.key+"<br>"); pk=k.keyCode}}; |
NewerOlder