小编Vol*_*ple的帖子

“NODE_AUTH_TOKEN”和“NPM_AUTH_TOKEN”有什么区别?

我正在使用一些 github 操作在单一存储库中发布我的一个包,包含大约 4-5 个包,例如:

github-repository (monorepo):
- folder_1 (package 1)
- folder_2 (package 2)
- folder_3 (package 3)
Run Code Online (Sandbox Code Playgroud)

对于位于此 monorepo 中的每个包,当发布与版本匹配的标签时,该操作将使用工作流程(对于所有包几乎相同)来释放它:

github-repository (monorepo):
- folder_1 (package 1)
- folder_2 (package 2)
- folder_3 (package 3)
Run Code Online (Sandbox Code Playgroud)

每个包都有自己的操作工作流程.yaml并且工作正常,除了我刚刚创建的新包:package 4 (located in github-repository/folder_4)

它是一个基本包,只是它只包含配置文件,因此它的yarn build脚本只会复制./dist文件夹中的这些文件,而不暗示节点或javascript,使其工作流程如下所示:

name: Config Release
on:
  push:
    tags:
      - package4/v*

permissions:
  contents: read
  packages: write

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: folder_4

    steps:
      - name: Checkout source code …
Run Code Online (Sandbox Code Playgroud)

npm-registry github-actions

7
推荐指数
1
解决办法
5778
查看次数

如何使用ptrace找到CALL和RET编号?

我试图在x86_64(intel语法)中动态查找运行时调用和返回的函数的数量.

要做到这一点,我正在使用ptrace(没有PTRACE_SYSCALL),我正在检查RIP注册表(包含下一个指令地址),我正在检查他的操作码.我知道如果LSB等于0xE8,则可以找到函数CALL(根据英特尔文档,或http://icube-avr.unistra.fr/fr/images/4/41/253666.pdf第105页).

我在http://ref.x86asm.net/coder64.html找到了每条指令,所以在我的程序中,每次我找到0xE8,0x9A,0xF1等...我找到了一个函数入口(CALL或INT指令),如果它是0xC2,0XC3等......它是一个函数leave(RET指令).

目标是在运行时在每个程序上找到它,我无法访问测试程序的编译,检测或使用gcc的魔术工具.

我做了一个小程序,可以编译gcc -Wall -Wextra your_file.c并通过键入启动./a.out a_program.

这是我的代码:

#include <sys/ptrace.h>
#include <sys/signal.h>
#include <sys/wait.h>
#include <sys/user.h>
#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

typedef struct user_regs_struct    reg_t;

static int8_t       increase(pid_t pid, int32_t *status)
{
        if (WIFEXITED(*status) || WIFSIGNALED(*status))
                return (-1);
        if (WIFSTOPPED(*status) && (WSTOPSIG(*status) == SIGINT))
                return (-1);
        if (ptrace(PTRACE_SINGLESTEP, pid, NULL, NULL) == -1)
                return (-1);
        return (0);
}

int                 main(int argc, char *argv[])
{
    size_t          pid = …
Run Code Online (Sandbox Code Playgroud)

c assembly ptrace elf opcode

6
推荐指数
1
解决办法
352
查看次数

标签 统计

assembly ×1

c ×1

elf ×1

github-actions ×1

npm-registry ×1

opcode ×1

ptrace ×1