profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/XVilka/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Anton Kochkov XVilka Rizin.Org China, Shanghai http://www.xvilka.me/ Reverse Engineering proponent, Rizin and Cutter evangelist, foreign languages fanatic.

rizinorg/cutter 9725

Free and Open Source Reverse Engineering Platform powered by rizin

jceb/vim-orgmode 2813

UNMAINTAINED looking for maintainers! Text outlining and task management for Vim based on Emacs' Org-Mode

joxeankoret/pigaios 451

A tool for matching and diffing source codes directly against binaries.

williballenthin/python-idb 393

Pure Python parser and analyzer for IDA Pro database files (.idb).

radare/radare2ida 126

Tools, documentation and scripts to move projects from IDA to R2 and viceversa

radare/valabind 50

create bindings from vapi to nodejs, python, swig, c++

radareorg/radare2-r2pipe-api 21

r2pipe-api repo

XVilka/2ndboot-ng 16

Motorola Milestone second bootloader from running kernel without reboot

marcograss/routerosbackuptools 10

Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files

push eventrizinorg/rizin

Khairul Azhar Kasmiran

commit sha 0a12ca44c5e1d583b397a9f85841bb7633bda5b4

`ij`: Represent non-utf8 binary filename as number array (#1760)

view details

Dhruv Maroo

commit sha 63ccf386f2bcb63e5e099603d1d4a749c5cdfa66

Type pretty printing API (#1678) * Reduce duplicate code and use a single printing API for all sorts of printing requirements

view details

Anton Kochkov

commit sha 7c05aa76fdff928085f0976d18cf976ec51507e5

Detect `shm_open()` function with Meson

view details

push time in 6 hours

PullRequestReviewEvent
PullRequestReviewEvent

push eventrizinorg/rizin

Anton Kochkov

commit sha 0637a084d0b1dfddb8310e060ac1bee0900d868a

Detect `shm_open()` function with Meson

view details

push time in 7 hours

push eventrizinorg/rizin

Anton Kochkov

commit sha bc428a147c68c322e3b4d85b276cc0751d02ddb6

Detect `shm_open()` function with Meson

view details

push time in 7 hours

Pull request review commentrizinorg/rizin

Detect `shm_open()` function with Meson

 if host_machine.system() == 'freebsd'   add_project_link_arguments('-Wl,--allow-shlib-undefined', language: 'c') endif -lrt = []+lrt_gettime = []

Good idea, done.

XVilka

comment created time in 8 hours

PullRequestReviewEvent

push eventrizinorg/rizin

Anton Kochkov

commit sha d6b28b4cc4b1240522100a08092eff4e016766f0

Detect `shm_open()` function with Meson

view details

push time in 8 hours

Pull request review commentrizinorg/rizin

`ij`: Represent non-utf8 binary filename as number array

 RZ_API bool rz_str_is_ascii(const char *str) { 	return true; } +/**+ * @brief Returns true if the input string is correctly UTF-8-encoded.

\brief syntax please.

kazarmy

comment created time in 8 hours

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentrizinorg/rizin

`ij`: Represent non-utf8 binary filename as number array

 RZ_API bool rz_str_is_ascii(const char *str) { 	return true; } +RZ_API bool rz_str_is_utf8(const char *str) {

Doxygen please. Also RZ_NONNULL and rz_return_val_if_fail(str, false).

kazarmy

comment created time in 8 hours

Pull request review commentrizinorg/rizin

Detect `shm_open()` function with Meson

 if host_machine.system() == 'freebsd'   add_project_link_arguments('-Wl,--allow-shlib-undefined', language: 'c') endif -lrt = []+lrt_gettime = []

The purpose is different, the gettime one is used only for clock_gettime() in librz/util/ and lrt is used for shm_open().

XVilka

comment created time in 9 hours

PullRequestReviewEvent

push eventrizinorg/rizin

Anton Kochkov

commit sha 29c82549f1f6de78305ab217a445791a20bca83a

Detect `shm_open()` function with Meson

view details

push time in 11 hours

Pull request review commentrizinorg/rizin

New RZIL integration

+// SPDX-FileCopyrightText: 2021 heersin <teablearcher@gmail.com>+// SPDX-License-Identifier: LGPL-3.0-only++#ifndef RZIL_OPCODES_H+#define RZIL_OPCODES_H++#include "definitions/definitions.h"++/**+ * \file rzil_opcodes.h+ * \brief signatures of core theory opcodes+ *+ * Modular Hierarchy of the whole core theory+ * (we implement the Minimal part only)+ *                          o Core+ *                            |+ *             Trans o--------+--------o Float+ *                            |        |+ *                            o Basic  o FBasic+ *                            |+ *                            o Minimal+ *                            |+ *           +-------+--------+--------+-------++ *           |       |        |        |       |+ *           o       o        o        o       o+ *         Init    RzILBool     Bitv    Memory   Effect+ *+ * See also the references :+ * 0. A gentle introduction to core theory http://binaryanalysisplatform.github.io/bap/api/odoc/bap-core-theory/Bap_core_theory/index.html+ * 1. http://binaryanalysisplatform.github.io/bap/api/odoc/bap-core-theory/Bap_core_theory/Theory/index.html+ * 2. For core and array theories https://smtlib.cs.uiowa.edu/theories.shtml+ */++/**+ *  \struct rzil_op_int_t+ *  \brief op structure for `int` (val int : 's Bitv.t Value.sort -> word -> 's bitv)+ *+ *  int s x is a bitvector constant x of sort s.+ */+struct rzil_op_int_t {+	ut32 length; ///< s -- sort(type), length of bitvector+	int value; ///< x -- value of bitvector+};++/**+ *  \struct rzil_op_msb_lsb_t+ *  \brief op structure for `msb` and `lsb` ('s bitv -> bool)+ *  [MSB] msb x is the most significant bit of x.+ *  [LSB] lsb x is the least significant bit of x.+ */+struct rzil_op_msb_lsb_t {+	RzIL_BITV void *bv; ///< index of bitvector operand+};++/**+ *  \struct rzil_neg_t+ *  \brief op structure for `neg` ('s bitv -> 's bitv)+ *+ *  neg x is two-complement unary minus+ */+struct rzil_op_neg_t {+	RzIL_BITV void *bv; ///< index of bitvector operand+};++/**+ *  \struct rzil_not_t+ *  \brief op structure for `not` ('s bitv -> 's bitv)+ *+ *  neg x is one-complement unary minus+ */+struct rzil_op_not_t {+	RzIL_BITV void *bv; ///< index of bitvector operand+};++/**+ *  \struct rzil_op_alg_log_operations_t+ *  \brief op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)+ *+ *  [ADD] add x y addition modulo 2^'s+ *  [SUB] sub x y subtraction modulo 2^'s+ *  [MUL] mul x y multiplication modulo 2^'s+ *  [DIV] div x y unsigned division modulo 2^'s truncating towards 0. The division by zero is defined to be a vector of all ones of size 's.+ *  [MOD] modulo x y is the remainder of div x y modulo 2^'s.+ *  [SDIV] sdiv x y is signed division of x by y modulo 2^'s.+ *  [SMDO] smodulo x y is the signed remainder of div x y modulo 2^'s.+ *  [LOGAND] logand x y is a bitwise logical and of x and y.+ *  [LOGOR] logor x y is a bitwise logical or of x and y.+ *  [LOGXOR] logxor x y is a bitwise logical xor of x and y.+ */+struct rzil_op_alg_log_operations_t {+	RzIL_BITV void *x; ///< index of Operand 1+	RzIL_BITV void *y; ///< index of Operand 2+};++/**+ *  \struct rzil_op_sle_ule_t+ *  \brief op structure for sle/ule ('a bitv -> 'a bitv -> bool)+ *+ *  [SLE] sle x y binary predicate for singed less than or equal+ *  [ULE] ule x y binary predicate for unsigned less than or equal+ */+struct rzil_op_sle_ule_t {+	RzIL_BITV void *x; ///< index of operand 1+	RzIL_BITV void *y; ///< index of operand 2+};++/**+ *  \struct rzil_op_shift_t+ *  \brief op structure for lshift and rshift (bool -> 's bitv -> 'b bitv -> 's bitv)+ *+ *  [LSHIFT] shiftl s x m shifts x left by m bits filling with s.+ *  [RSHIFT] shiftr s x m shifts x right by m bits filling with s.+ */+struct rzil_op_shift_t {+	RzIL_BOOL void *fill_bit; ///< index of fill bit+	RzIL_BITV void *x; ///< index of operand 1+	RzIL_BITV void *y; ///< index of operand 2+};++/**+ *  \struct rzil_op_perform_t+ *  \brief op structure for `perform` ('a Effect.sort -> 'a eff)+ *+ *  perform s performs a generic effect of sort s.+ *  normally we set ret to -1 to show that no more effect after perform this one+ */+struct rzil_op_perform_t {+	RzIL_EFF void *eff; ///< index of effect to perform+};++/**+ *  \struct rzil_op_set_t+ *  \brief op structure for `set` ('a var -> 'a pure -> data eff)+ *+ *  set v x changes the value stored in v to the value of x.+ */+struct rzil_op_set_t {+	RzIL_VAR const char *v; ///< name of variable, const one+	RzIL_PURE_VAL void *x; ///< index of RzILVal+};++/**+ *  \struct rzil_op_jmp_t+ *  \brief op structure for `jmp` (_ bitv -> ctrl eff)+ *+ *  jmp dst passes the control to a program located at dst.+ */+struct rzil_op_jmp_t {+	RzIL_BITV void *dst; ///< index of destination address (RzILBitVector)+};++/**+ *  \struct rzil_op_goto_t+ *  \brief op structure for `goto` (label -> ctrl eff)+ *+ *  goto lbl passes the control to a program labeled with lbl.+ */+struct rzil_op_goto_t {+	RzIL_LABLE const char *lbl; ///< name of the label, const one+};++/**+ *  \struct rzil_op_seq_t+ *  \brief op structure for `Seq` ('a eff -> 'a eff -> 'a eff)+ *+ *  seq x y performs effect x, after that perform effect y. Pack two effects into one.+ */+struct rzil_op_seq_t {+	RzIL_EFF void *x; ///< index of the first effect+	RzIL_EFF void *y; ///< index of the second effect+};++/**+ *  \struct rzil_op_blk_t+ *  \brief op structure for `blk` (label -> data eff -> ctrl eff -> unit eff)+ *+ *  blk lbl data ctrl a labeled sequence of effects.+ */+struct rzil_op_blk_t {+	RzIL_EFF void *data_eff; ///< index of data_eff+	RzIL_EFF void *ctrl_eff; ///< index of ctrl_eff+};++/**+ *  \struct rzil_op_repeat_t+ *  \brief op structure for `repeat` (bool -> data eff -> data eff)+ *+ *  repeat c data repeats data effects until the condition c holds.+ */+struct rzil_op_repeat_t {+	RzIL_BOOL void *condition; ///< index of BOOL condition+	RzIL_EFF void *data_eff; ///< index of data effect+};++/**+ *  \struct rzil_op_branch_t+ *  \brief op structure for `branch` (bool -> 'a eff -> 'a eff -> 'a eff)+ *+ *  branch c lhs rhs if c holds then performs lhs else rhs.+ */+struct rzil_op_branch_t {+	RzIL_BOOL void *condition; ///< index of BOOL condition+	RzIL_EFF void *true_eff; ///< index of true effect, set to -1 means do nothing+	RzIL_EFF void *false_eff; ///< index of false effect, set to -1 means do nothing+};++/**+ *  \struct rzil_op_ite_t+ *  \brief op structure for `ite` (bool -> 'a pure -> 'a pure -> 'a pure)+ *+ *  ite c x y is x if c evaluates to b1 else y.+ */+struct rzil_op_ite_t {+	RzIL_BOOL void *condition; ///< index of BOOL condition+	RzIL_PURE_VAL void *x; ///< index of RzILVal operand 1+	RzIL_PURE_VAL void *y; ///< index of RzILVal operand 2+};++/**+ *  \struct rzil_op_var_t+ *  \brief op structure for `var` ('a var -> 'a pure)+ *+ *  var v is the value of the variable v.+ */+struct rzil_op_var_t {+	RzIL_VAR const char *v; ///< name of variable, const one+};++/**+ *  \struct rzil_op_and__t+ *  \brief op structure for `and_` (bool -> bool -> bool)+ *+ *  and_ x y is a conjunction of x and y.+ */+struct rzil_op_and__t {+	RzIL_BOOL void *x; ///< index of the BOOL operand+	RzIL_BOOL void *y; ///< index of the BOOL operand+};++/**+ *  \struct rzil_op_or__t+ *  \brief op structure for `or_` (bool -> bool -> bool)+ *+ *  or_ x y is a disjunction of x and y.+ */+struct rzil_op_or__t {+	RzIL_BOOL void *x; ///< index of the BOOL operand+	RzIL_BOOL void *y; ///< index of the BOOL operand+};++/**+ *  \struct rzil_op_inv_t+ *  \brief op structure for `inv` (bool -> bool)+ *+ *  inv x inverts x.+ */+struct rzil_op_inv_t {+	RzIL_BOOL void *x; ///< index of the BOOL operand+	RzIL_BOOL void *ret; ///< index of store the BOOL result+};++/**+ *  \struct rzil_op_load_t+ *  \brief op structure for `load` (('a, 'b) mem -> 'a bitv -> 'b bitv)+ *+ *  load m k is the value associated with the key k in the memory m.+ */+struct rzil_op_load_t {+	RzIL_MEM int mem; ///< index of the memory in VM (different from the temp_val_list)+	RzIL_BITV void *key; ///< index of the RzILBitVector key (address)+};++/**+ *  \struct rzil_op_store_t+ *  \brief op structure for `store` (('a, 'b) mem -> 'a bitv -> 'b bitv -> ('a, 'b) mem)+ *+ *  store m k x a memory m in which the key k is associated with the word x.+ */+struct rzil_op_store_t {+	RzIL_MEM int mem; ///< index of memory in VM+	RzIL_BITV void *key; ///< index of the RzILBitVector key (address)+	RzIL_BITV void *value; ///< index of the RzILVal value (data) to store+};++// TODO : a better way to map enum to string+// Remember to add new opcode in rz_il_op2str+// if you add a new one.+typedef enum {+	// Init+	RZIL_OP_VAR,+	RZIL_OP_UNK,+	RZIL_OP_ITE,++	// RzILBool+	RZIL_OP_B0,+	RZIL_OP_B1,+	RZIL_OP_INV,+	RZIL_OP_AND_,+	RZIL_OP_OR_,++	// RzILBitVector+	RZIL_OP_INT,+	RZIL_OP_MSB,+	RZIL_OP_LSB,+	RZIL_OP_NEG,+	RZIL_OP_NOT,+	RZIL_OP_ADD,+	RZIL_OP_SUB,+	RZIL_OP_MUL,+	RZIL_OP_DIV,+	RZIL_OP_SDIV,+	RZIL_OP_MOD,+	RZIL_OP_SMOD,+	RZIL_OP_LOGAND,+	RZIL_OP_LOGOR,+	RZIL_OP_LOGXOR,+	RZIL_OP_SHIFTR,+	RZIL_OP_SHIFTL,+	RZIL_OP_SLE,+	RZIL_OP_ULE,+	RZIL_OP_CAST,+	RZIL_OP_CONCAT,+	RZIL_OP_APPEND,+	// ...++	// Memory+	RZIL_OP_LOAD,+	RZIL_OP_STORE,

No, the operand and effect are separated in this case, see the original implementation:

  • http://binaryanalysisplatform.github.io/bap/api/odoc/bap-core-theory/Bap_core_theory/Theory/Effect/Sort/index.html
Heersin

comment created time in 11 hours

PullRequestReviewEvent

push eventrizinorg/rizin

Anton Kochkov

commit sha fb0203726f8a1a7499b5f0e7294abab04f6d4f1e

Detect `shm_open()` function with Meson

view details

push time in 11 hours

push eventrizinorg/rizin

Anton Kochkov

commit sha bf17b87b3130e6115ae41fc95ba7a3349e0b7ef1

Detect `shm_open()` function with Meson

view details

push time in 12 hours

push eventrizinorg/rizin

Anton Kochkov

commit sha 131c7034a9a49578e9cbc57e0d5052fd9b6fa82d

Detect `shm_open()` function with Meson

view details

push time in 12 hours

PR opened rizinorg/rizin

Reviewers
Detect `shm_open()` function with Meson

<!-- Filling this template is mandatory -->

Your checklist for this pull request

  • [x] I've read the guidelines for contributing to this repository
  • [x] I made sure to follow the project's coding style
  • [ ] I've added tests that prove my fix is effective or that my feature works (if possible)
  • [ ] I've updated the documentation and the rizin book with the relevant information (if needed)

Detailed description

Before it was disabled completely

Test plan

Closing issues

+2 -6

0 comment

2 changed files

pr created time in 12 hours

create barnchrizinorg/rizin

branch : dist-asan-shm-fix

created branch time in 12 hours

issue openedrizinorg/rizin

Support Windows for `shm://` RzIO plugin

Seems instead of shm_open() API the CreateFileMappingW function (memoryapi.h) could be used.

It would also be nice to test this automatically on CI.

created time in 12 hours

pull request commentrizinorg/rizin

Reduce registers shown in the output of `dr` and `Vpp` when analysing an ARM64 executable [WIP]

You could add a dump of GDB response and add a new unit test for this. That would be a good start.

DMaroo

comment created time in 14 hours

Pull request review commentrizinorg/rizin

Reduce registers shown in the output of `dr` and `Vpp` when analysing an ARM64 executable [WIP]

 static RzList *_extract_regs(char *regstr, RzList *flags, char *pc_alias) { 				// -- Aarch64 			} else if ((tmp1 = strstr(regstr, "sve")) != NULL && tmp1 < feature_end) { 				typegroup = "ymm";+			} else if ((tmp1 = strstr(regstr, "sec")) != NULL && tmp1 < feature_end) {

Shouldn't be pauth here, in the the detection?

DMaroo

comment created time in 14 hours

PullRequestReviewEvent

push eventrizinorg/rizin

Luca Borzacchiello

commit sha 7cc06491a35906543fedd67a81ba8d61f0c71875

Removed junk on screen in visual mode with two columns (#1757) * Removed junk on screen in visual two-columun mode Toggled a refresh everytime the screen is repainted in visual two-column mode * Removed some reduntant code

view details

push time in 14 hours

issue closedrizinorg/rizin

Visual two-column mode leaves junk on the screen upon scrolling

Work environment

Questions Answers
OS/arch/bits (mandatory) Fedora 34 x86_64
File format of the file you reverse (mandatory) ELF
Architecture/bits of the file (mandatory) x86/64
rizin -v full output, not truncated (mandatory) rizin 0.3.0-git @ linux-x86-64

commit: 09d5b01b67c640c1fafde9b3434ade342a225b32, build: 2021-09-18__12:22:59

Expected behavior

Do not pollute the screen

Actual behavior

image

Note the remnants of the comments from previous scrolling on the right

Steps to reproduce the behavior

[0x00006b10]> Vp

Then press "|" key to set the second column It will ask for the value to cmd.cprompt, type px Then after hexview column appears on the right, scroll and notice the junk left on the right side, under the second column.

closed time in 14 hours

XVilka

PR merged rizinorg/rizin

Reviewers
Removed junk on screen in visual mode with two columns visual merge-when-green

<!-- Filling this template is mandatory -->

Your checklist for this pull request

  • [x] I've read the guidelines for contributing to this repository
  • [x] I made sure to follow the project's coding style
  • [ ] I've added tests that prove my fix is effective or that my feature works (if possible)
  • [ ] I've updated the documentation and the rizin book with the relevant information (if needed)

Detailed description

<!-- Explain the details for making this change. Is a new feature implemented? What existing problem does the pull request solve? How does the pull request solve these issues? Please provide enough information so that others can review your pull request. -->

I forced a screen refresh when painting two columns in visual mode, fixing #1717. I also added a 1 char space between the two columns.

Test plan

<!-- What steps should the reviewer take to test your pull request? Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots/videos. This is your time to re-check that everything works and that you covered all the edge cases -->

As in #1717, type

[0x00006b10]> Vp

Then press "|" key to set the second column It will ask for the value to cmd.cprompt, type px Now there is no more junk on the right column.

Closing issues

<!-- put "closes #XXXX" in your comment to auto-close the issue that your PR fixes (if any). -->

closes #1717

+15 -18

1 comment

1 changed file

borzacchiello

pr closed time in 14 hours