首页
社区
课程
招聘
[求助] Quick way to crash Reflector .NET
发表于: 2010-6-24 01:31 1200

[求助] Quick way to crash Reflector .NET

2010-6-24 01:31
1200
A quick way to 'protect' your code (or Howto crash Reflector .NET)       

.method static object Foo(object obj)
{
  ldarg.0
  dup
  brtrue.s L1
  ret
L1:
  callvirt   instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
  ret
}

While there is no way* you can write this in C#, it is still valid and verifiable IL.

I picked this up when writing an accessor for chained properties to do null checks without having to store and load from locals (which is a 'tad' more complex than the example shown above).

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 0
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//