首页
社区
课程
招聘
[求助]关于net方法修改后编译报错的问题
发表于: 2012-8-24 17:59 4593

[求助]关于net方法修改后编译报错的问题

2012-8-24 17:59
4593
有一net程序,里面有个方法,原先il代码:
.method assembly static string  GetComputerInformation() cil managed
{
  // Code size       44 (0x2c)
  .maxstack  2
  .locals init (string V_0)
  IL_0000:  call       string [mscorlib]System.Environment::get_UserName()
  IL_0005:  stloc.0
  IL_0006:  ldloc.0
  IL_0007:  call       string RIHWSty.RISuperpro::ProcessorID()
  IL_000c:  call       string [mscorlib]System.String::Concat(string,
                                                              string)
  IL_0011:  stloc.0
  IL_0012:  ldloc.0
  IL_0013:  call       string [mscorlib]System.Environment::get_MachineName()
  IL_0018:  call       string [mscorlib]System.String::Concat(string,
                                                              string)
  IL_001d:  stloc.0
  IL_001e:  ldloc.0
  IL_001f:  call       string RIHWSty.RISuperpro::DriveModel()
  IL_0024:  call       string [mscorlib]System.String::Concat(string,
                                                              string)
  IL_0029:  stloc.0
  IL_002a:  ldloc.0
  IL_002b:  ret
} // end of method RISuperpro::GetComputerInformation

我修改成:

.method assembly static string  GetComputerInformation() cil managed
  {
    // Code size       44 (0x2c)
    .maxstack  2
    .locals init (string V_0)
    IL_0000:  nop
    IL_0001:  nop
    IL_0002:  nop
    IL_0003:  nop
    IL_0004:  nop
    IL_0005:  nop
    IL_0006:  nop
    IL_0007:  nop
    IL_0008:  nop
    IL_0009:  nop
    IL_000a:  nop
    IL_000b:  nop
    IL_000c:  nop
    IL_000d:  nop
    IL_000e:  nop
    IL_000f:  nop
    IL_0010:  nop
    IL_0011:  nop
    IL_0012:  nop
    IL_0013:  nop
    IL_0014:  nop
    IL_0015:  nop
    IL_0016:  nop
    IL_0017:  nop
    IL_0018:  nop
    IL_0019:  nop
    IL_001a:  nop
    IL_001b:  nop
    IL_001c:  nop
    IL_001d:  nop
    IL_001e:  nop
    IL_001f:  nop
    IL_0020:  nop
    IL_0021:  nop
    IL_0022:  nop
    IL_0023:  nop
    IL_0024:  nop
    IL_0025:  nop
    IL_0026:  ldstr      "abcdefgh"
    IL_002b:  ret

  } // end of method RISuperpro::GetComputerInformation

为什么用ilasm编译无法通过呢,老是报错。

出错信息:“no entry point declared for exectuable"

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 7906
活跃值: (3086)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
你起码的给字串声明下变量。。。。

其实你可以自己写个过程,然后看IL码,对照后改
2012-8-26 19:19
0
雪    币: 278
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
可以改成
ldstr "snowdream"
stloc.0
ldloc.0
ret
返回固定字符串
2012-8-30 12:34
0
游客
登录 | 注册 方可回帖
返回
//