Reverse Engineering RET Homepage RET Members Reverse Engineering Projects Reverse Engineering Papers Reversing Challenges Reverser Tools RET Re-Search Engine Reverse Engineering Forum Reverse Engineering Links

Go Back   Reverse Engineering Team Board > Reverse Engineering Board > .NET Reverse Engineering
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 08-24-2012, 07:13 AM
zhgong007 zhgong007 is offline
Member
 
Join Date: Nov 2008
Posts: 34
Default want to revise a .net method , but failed

there is a net dll,in which a method I want to modify. the original il code for this method is as follows:


.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:riveModel()
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



then I modify them into the following:

.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

but I always get error when I use ilasm to recombile the IL code。

the error info is :“no entry point declared for exectuable"

any one can help me? thanks
Reply With Quote
  #2  
Old 08-24-2012, 08:06 AM
kao kao is offline
Senior Member
 
Join Date: Sep 2007
Posts: 184
Default

Code:
ilasm /dll file.il
Reply With Quote
  #3  
Old 08-24-2012, 09:14 AM
zhgong007 zhgong007 is offline
Member
 
Join Date: Nov 2008
Posts: 34
Default

Quote:
Originally Posted by kao View Post
Code:
ilasm /dll file.il
wow, it is working. you are always the expert,Kao
but why I use the following command, then not working?


ilasm /output: *.dll *.il
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump





Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.