duangsuse::Echo
717 subscribers
4.26K photos
130 videos
583 files
6.48K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
duangsuse::Echo
(代码注入 支持 Windows 所支持的两种 x86、x86_64 架构 是直接注入机器代码(redpill) 然后 CreateRemoteThread() 执行 // bool SetWindowDisplayAffinityForExternelProcess(HWND hWnd, DWORD affinity) void *code_address = VirtualAllocEx(hProcess, nullptr, CODE_SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE);…
(不过,不知道不注入机器代码而只是 CreateRemoteThread 然后用本进程的 procedure 可不可能实现(就不需要再专门放置已编译机器代码了),
据说可能可以,但要在别的进程注入自己使用的字符串引用

可惜这里没有 Windows 环境所以不可能测试了
duangsuse::Echo
(也是在 @AndroidDevCN 里我知道 plt 是 Procedure Linkage Table 的意思( objdump -d -j .plt /lib64/libc.so.6
Android Dev CN 有不少都是真 dalao,包括冯老师、Ghost Flying、Rikka 等
可不仅仅会个 Android 前端(当然他们是会自己绘制 View、创建 Animation 以及讨论常规 OOP 编程问题哪种解决方式更优雅的大佬级别),对 Andriod JNI 甚至 Android 底层都有所了解
(好了谈正事 #project

放假只放中秋节一天...

整个的列表太大这里就不说了,只看假期做的
首先是一个 C 头文件, chinese.h

“中文编程” 233333 🙈 当然只是语法结构上的,C 不支持非 ASCII 码内的标识符,百搭

然后是 Gekyll
#backend #recommended

推荐两款 ANTLR 386 语法文件

MASM x86 汇编器语法
Intel 8086 汇编器语法.

.386
.model flat, stdcall
option casemap: none

include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib

.data
szCaption db 'Hello', 0
szText db 'Hello, World!', 0

.code

start:
invoke MessageBox, NULL, offset szText, offset szCaption, MB_OK
invoke ExitProcess, NULL
end start
https://www.gnu.org/software/libjit/doc/libjit_2.html#Features
LibJIT 也是一个 JIT 库

#include <jit/jit.h>

int compile_mul_add(jit_function_t function)
{
jit_value_t x, y, z;
jit_value_t temp1, temp2;

x = jit_value_get_param(function, 0);
y = jit_value_get_param(function, 1);
z = jit_value_get_param(function, 2);

temp1 = jit_insn_mul(function, x, y);
temp2 = jit_insn_add(function, temp1, z);

jit_insn_return(function, temp2);
return 1;
}

int main(int argc, char **argv) {
jit_function_t function;
jit_context_t context;

context = jit_context_create();
jit_context_build_start(context);

jit_function_set_on_demand_compiler(function, compile_mul_add);

jit_type_t params[3];
jit_type_t signature;

params[0] = jit_type_int;
params[1] = jit_type_int;
params[2] = jit_type_int;
signature = jit_type_create_signature
(jit_abi_cdecl, jit_type_int, params, 3, 1);

function = jit_function_create(context, signature);
jit_function_compile(function);
jit_context_build_end(context);

jit_int arg1, arg2, arg3;
void *args[3];
jit_int result;

arg1 = 3;
arg2 = 5;
arg3 = 2;
args[0] = &arg1;
args[1] = &arg2;
args[2] = &arg3;
jit_function_apply(function, args, &result);
printf("mul_add(3, 5, 2) = %d\n", (int)result);
}
看来比较老,它的 Ruby 绑定已经不支持最新的 MRI 2.6,最新的 MRI 已经不用 Fixnum 了

而且是老到 MRI 已经不向前兼容了...
This media is not supported in your browser
VIEW IN TELEGRAM
没想到 被作为 ISO 标准的那个 Ruby 居然不是完全按照 CRuby 实现制定的标准的
libJIT dll 貌似足足有 2M 大小...
#blog 大佬,都上四川大学了
老李是个有故事的人...
对事故表示同情,很少见到会出现这样的事故
This media is not supported in your browser
VIEW IN TELEGRAM