行业解决方案查看所有行业解决方案
IDA 用于解决软件行业的关键问题。
发布时间:2022-10-15 14: 46: 09
In the IDC expressions you can use almost all C operations except:
complex assignment operations as'+='
Constants are defined more or less like in C,with some minor differences.
There are four type conversion operations:
long(expr)floating point numbers are truncated during conversion
char(expr)
float(expr)
__int64(expr)
However,explicit type conversions are rarely required because all type conversions are made automatically:
-addition:
if both operands are strings,
string addition is performed(strings are concatenated);
if both operands are objects,
object combination is performed(a new object is created)
if floating point operand exists,
both operands are converted to floats;
otherwise
both operands are converted to longs;
-subtraction/multiplication/division:
if floating point operand exists,
both operands are converted to floats;
if both operands are objects and the operation is subtraction,
object subtraction is performed(a new object is created)
otherwise
both operands are converted to longs;
-comparisons(==,!=,etc):
if both operands are strings,string comparison is performed;
if floating point operand exists,
both operands are converted to floats;
otherwise
both operands are converted to numbers;
-all other operations:
operand(s)are converted to longs;
If any of the long operands is 64bit,the other operand is converted to 64bit too.
There is one notable exception concerning type conversions:if one operand is a string and the other is zero(0),then a string operation is performed.Zero is converted to an empty string in this case.
The&operator is used to take a reference to a variable.References themselves cannot be modified once created.Any assignment to them will modify the target variable.For example:
auto x,r;
r=&x;
r=1;//x is equal to 1 now
References to references are immediately resolved:
auto x,r1,r2;
r1=&x;
r2=&r1;//r2 points to x
Since all non-object arguments are passed to functions by value,references are a good way to pass arguments by reference.
中文翻译如下:
在IDC表达式中,你可以使用几乎所有C操作,除了:
复杂赋值运算符如'+='
常量的定义类似于C,有一些微小的差异。
有四种类型转换操作:
long(expr):浮点数在转换时会被截断。
char(expr)
float(expr)
__int64(expr)
然而,很少需要显式类型转换,因为所有类型转换都是自动进行的:
加法:
如果两个操作数都是字符串,则执行字符串连接操作。
如果两个操作数都是对象,则执行对象组合操作(创建一个新对象)。
如果存在浮点数操作数,则将两个操作数转换为浮点数。
否则,将两个操作数转换为long类型。
减法/乘法/除法:
如果存在浮点数操作数,则将两个操作数转换为浮点数。
如果两个操作数都是对象且操作是减法,则执行对象减法操作(创建一个新对象)。
否则,将两个操作数转换为long类型。
比较(==,!=,等):
如果两个操作数都是字符串,则执行字符串比较操作。
如果存在浮点数操作数,则将两个操作数转换为浮点数。
否则,将两个操作数转换为数字。
所有其他操作:
操作数将被转换为long类型。
如果任何一个long操作数是64位的,那么另一个操作数也会被转换为64位。
关于类型转换有一个值得注意的例外:如果一个操作数是字符串,另一个操作数是零(0),则会执行字符串操作。在这种情况下,零被转换为空字符串。
&运算符用于获取变量的引用。一旦创建了引用,引用本身就无法修改。对它们的任何赋值都将修改目标变量。例如:
auto x,r;
r=&x;
r=1;//现在x等于1
引用引用会立即解析:
auto x,r1,r2;
r1=&x;
r2=&r1;//r2指向x
由于所有非对象参数都是按值传递给函数的,引用是通过引用传递参数的好方法。
展开阅读全文
︾
读者也喜欢这些内容:
3d扫描逆向工程是什么?使用IDA进行3d扫描逆向工程
3D扫描逆向工程作为一种创新技术,正在逐步更改大家对物理全球的理解处理办法。结合IDA(Interactive Disassembler)这类反向工程工具,3D扫描技术突出了更广阔的应用前景。本文将详细分析3d扫描逆向工程是什么,使用IDA进行3d扫描逆向工程,为相关领域的专业人士提供全面的信息和意见。...
阅读全文 >
代码静态分析工具有哪些 IDA如何静态分析代码
代码静态分析是一种在不执行程序的情况下对源代码或者二进制代码进行分析的技术。通过静态分析,可以发现代码中的潜在问题、漏洞、安全风险等,有助于提高代码质量和安全性。...
阅读全文 >
IDA Pro删除二进制跟踪(Remove binary trace)
...
阅读全文 >
IDA pro在文件中搜索子字符串(Search for substring in the file)
...
阅读全文 >