The first one. NET program Reverse

Source: Internet
Author: User
Tags mscorlib

2016 "Anheng Cup" National University Network Information Security management operation and maintenance Challenge competition _re200

64 bits. NET Program

Run:

Parameter Check Reflector analysis: f= "incorrect"----loc.2i= "parameter error"----loc.3p= "? #?? # #? #?? #?##? ?# ?#?#?#? #?# ?#?? # #?# "l_0005 ... l_000a stloc.0 l_0046 ldloc.0l_0047 .... l_004c ldc.i4.8l_004d beq.s l_0056 Check whether the number of parameters is 8, equal skip output "parameter error" STR6 hold numeric characters, reverse conversion to digital type = =0x145d526db9faad8, sequential decimal conversion = =00011110303731719str6= "00011110303731719" by If (srt3!= str5.reverse ()) jmp L_015ASTR5 str3 in reverse order str5= " Nttdffcttrcvrhrghfa "p="? #?? # #??? #?##? ?# ?#?#?#? #?# ?#?? # #?# "?-> character #-> Digital input: n0t T00 d1ff1c11t t0 r3c0v3r 7h3 r1gh7 f1a9

Get flag:eis{n0t_t00_d1ff1c11t_t0_r3c0v3r_7h3_r1gh7_f1a9} Il compilation notes:. Method PublicStaticvoid Main() CIL managed
{
. Custominstancevoid [Mscorlib]system.stathreadattribute::.ctor ()
. EntryPoint
. Maxstack5
. LocalsInit(
[0]class[mscorlib] System.Collections.ObjectModel.ReadOnlyCollection ' 1<string> Onlys,
[1] UInt64 Num,
[2] String Str,
[3] String str2,
[4] String STR3,
[5] string[] Strarray,
[6] String STR4,
[7] String STR5,
[8] String STR6,
[9] Int32 num2,
[Ten] Int32 num3,
[ One] Int32 num4,
[ A] Int32 NUM5,
[ -] Char CH)
L_0000:callclassChkflag. My.myapplication Chkflag. My.myproject::get_application () L_0005:callvirtinstanceclass[mscorlib] System.Collections.ObjectModel.ReadOnlyCollection ' 1<string> [Microsoft.VisualBasic]                                                   Microsoft.visualbasic.applicationservices.consoleapplicationbase::get_commandlineargs () l_000a:stloc.0 Onlys Storage Parameters L_000b:ldc.i80x145d526db9faad8L_0014:stloc.1//num=0x145d526db9faad8 L_0015:callclass[mscorlib] System.Resources.ResourceManager Chkflag. My.resources.resources::get_resourcemanager ()
L_001a:ldstr"F"L_001f:callvirtinstancestring [Mscorlib]system.resources.resourcemanager::getstring (String) l_0024:stloc.2 Str= "Incorrect" L_0025:callclass[mscorlib] System.Resources.ResourceManager Chkflag. My.resources.resources::get_resourcemanager ()
L_002a:ldstr$id
L_002f:callvirtinstancestring [Mscorlib]system.resources.resourcemanager::getstring (String)
L_0034:STLOC.3//str2= "Parameter Error"
L_0035:callclassChkflag. My.myapplication Chkflag. My.myproject::get_application ()
L_003a:callvirtinstanceclass[Microsoft.VisualBasic] Microsoft.VisualBasic.ApplicationServices.AssemblyInfo [Microsoft.VisualBasic] Microsoft.visualbasic.applicationservices.applicationbase::get_info ()
L_003f:callvirtinstancestring [Microsoft.visualbasic]microsoft.visualbasic.applicationservices.assemblyinfo::get_description () L_0044: Stloc.s STR3//STR3 Storage description Information//.custom instance void [Mscorlib]system.reflection.assemb Lydescriptionattribute::.ctor (String) = {string (' Afhgrhrvcrttcffdttn ')}//str3= "Afhgrhrvcrttcffdttn" l_0046: ldloc.0 L_0047:callvirtinstanceInt32 [Mscorlib]system.collections.objectmodel.readonlycollection ' 1<string>::get_count () l_004c:ldc.i4.8 L_ 004d:beq.s l_0056//if (count==8) jmp l_0056 l_004f:ldloc.3 L_0050:call vo ID [Mscorlib]system.console::writeline (string)//print "parameter Error" L_0055:ret
L_0056:callclass[mscorlib] System.Resources.ResourceManager Chkflag. My.resources.resources::get_resourcemanager ()
L_005b:ldstr"P"
L_0060:callvirtinstancestring [Mscorlib]system.resources.resourcemanager::getstring (String) l_0065:ldc.i4.1 L_0066:newarr Char L_006b:dup
l_006c:ldc.i4.0 L_006D:LDC.I4.S0x20L_006f:stelem.i2 L_0070:callvirtinstanceString[] [Mscorlib]system.string::split (char[]) l_0075:stloc.s strarray//char strarray[]=p l_0077:ldloc.0
L_0078:callvirtinstanceInt32 [Mscorlib]system.collections.objectmodel.readonlycollection ' 1<string>::get_count ()
l_007d:ldc.i4.1 L_007e:sub.ovf L_007f:stloc.s num2//num2=len ((onlys)-1 l_0081: ldc.i4.0
L_0082:stloc.s num3//num3=0
L_0084:BR.S l_00a8//jmp l_00a8
l_0086:ldloc.0 L_0087:ldloc.s num3 L_0089:callvirtinstance!0 [Mscorlib]system.collections.objectmodel.readonlycollection ' 1<string>::get_item (Int32)//onlys[num3] L_ 008e:ldloc.s Strarray
L_0090:ldloc.s num3
L_0092:ldelem.ref
l_0093:ldc.i4.0 l_0094:call bool [microsoft.visualbasic]microsoft.visualbasic.compilerservices.likeoperator:: Likestring (String, String,ValueType[Microsoft.VisualBasic] Microsoft.VisualBasic.CompareMethod)//comparison type l_0099:brtrue.s l_00a2 l_009b:ldloc.2 l_009c:call void [Mscorli B]system.console::writeline (String)//print "Incorrect" L_00a1:ret
L_00a2:ldloc.s num3
l_00a4:ldc.i4.1 L_00a5:add.ovf l_00a6:stloc.s num3//num3+=1 l_00a8:ldloc.s num3
L_00aa:ldloc.s num2
L_00AC:BLE.S l_0086 if (num3<=num2) jmp l_0086
L_00ae:ldstr""
l_00b3:ldloc.0
L_00b4:call string [Mscorlib]system.string::join (String,class[mscorlib] System.Collections.Generic.IEnumerable ' 1<string>)
L_00b9:stloc.s STR4
L_00bb:ldstr""
L_00c0:stloc.s STR5
L_00c2:ldstr""
L_00c7:stloc.s STR6
L_00c9:ldloc.s STR4
L_00cb:callvirtinstanceInt32 [Mscorlib]system.string::get_length ()
l_00d0:ldc.i4.1 L_00d1:sub.ovf l_00d2:stloc.s num4//num4=len (STR4) l_00d4:ldc.i4.0 L_00d5:stl Oc.s num5//num5=0 l_00d7:br.s l_0115//jmp l_0115 l_00d9:ldloc.s STR4
L_00db:ldloc.s NUM5
L_00dd:callvirtinstanceChar [Mscorlib]system.string::get_chars (Int32)
L_00e2:stloc.s CH//CH=STR4[NUM5]
L_00E4:LDLOC.S CH l_00e6:call bool [Mscorlib]system.char::isdigit (Char) l_00eb:brfalse.s l_00ff//if ch not decimal Digital JMP l_00ff L_00ed:ldloc.s STR6
L_00ef:ldloc.s CH
L_00f1:call string [microsoft.visualbasic]microsoft.visualbasic.compilerservices.conversions::tostring (char)
L_00f6:call string [Mscorlib]system.string::concat (String, String)
L_00FB:STLOC.S STR6//STR6 Storing digital elements
L_00FD:BR.S l_010f
L_00ff:ldloc.s STR5
L_0101:ldloc.s CH
L_0103:call string [microsoft.visualbasic]microsoft.visualbasic.compilerservices.conversions::tostring (char)
L_0108:call string [Mscorlib]system.string::concat (String, String) L_010d:stloc.s STR5//STR5 holds character elements L_010f:ldloc.s NUM5
l_0111:ldc.i4.1
L_0112:add.ovf
L_0113:stloc.s NUM5
    l_0115: ldloc.s num5    l_0117: ldloc.s num4    l_0119:  BLE.S&NBSP;L_00D9                      //if (NUM5&LT;=NUM4) jmp l_00 d9    l_011b: ldloc.s str6    l_011d: call string [ Microsoft.visualbasic]microsoft.visualbasic.strings::strreverse (String)     l_0122: call  Uint64 [mscorlib]system.uint64::P Arse (String)  //convert character data string to digital     l_0127: ldloc.1      l_0128: bne.un.s l_015a     //if (Num!=int (STR6))         & nbsp                 num=91713730301111000    l_012a: ldloc.s  str5    L_012c: call string [microsoft.visualbasic]microsoft.visualbasic.strings:: StrReverse (String)  str5.reverse ()     l_0131: ldloc.s str3    L_0133: callvirt  instancebool [Mscorlib]system.string::equals (String) l_0138:brfalse.s l_015a//if (srt3!= str5.reverse ()) jmp l_015a L_013a:ldstr"eis{"
L_013f:ldstr"_"
l_0144:ldloc.0
L_0145:call string [Mscorlib]system.string::join (String,class[mscorlib] System.Collections.Generic.IEnumerable ' 1<string>)
L_014a:ldstr"}"
L_014f:call string [Mscorlib]system.string::concat (String, String, String)
L_0154:call void [Mscorlib]system.console::writeline (String)
L_0159:ret
L_015a:ldloc.2
L_015b:call void [Mscorlib]system.console::writeline (String)
L_0160:ret} 00011110303731719 NTTDFFCTTRCVRHRGHFA

The first one. NET program Reverse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.