开发集成性的软件,如果对方不提供接口。首先账套的破解是首要工作,不然的话,想要集成性就无从谈起。很多加密是固有的加密方式像 SHA1,MD5但很多软件都有属于自己的加密方法,所谓破解无非需找规律,公钥,密钥,散列算法,哈希算法,总之也不太懂。一下是我封装的方法,其实原先用的是用的正则表达式((Regex.IsMatch(strs[i].ToString(), "[A-Z]")))判断字符类型,然后再类型范围了。循环遍历多维数组。得到对应密文。但最后发现他们相似度太多,就把他们整合在一块了建立一个多维数字,取模后直接需找相等的字符,确定对应密文,总之我也不确定这两种方法的执行力那个更高一些。
public static string getPass(string str) { string getStr = string.Empty; char[] strs = str.ToCharArray(); for (int i = 0; i < strs.Length; i++) { int j = i % 6; if (strs[i].ToString() == ",") { string[] str2 = { " L ", "\"P ", "+ ", " L ", "\"P ", "+ " }; getStr = getStr + str[j]; } else { string[,] strArray1 = new string[93, 6]{ {" P ","#  ",",  ","P ","#  ",",  "}, {" Q ","#$ ",",0 ","Q ","#$ ",",0 "}, {" R ","#( ",",@ ","R ","#( ",",@ "}, {" S ","#, ",",P ","S ","#, ",",@ "}, { " T ","#0 ","-  ","T ","#0 ","-  "}, {" U ","#4 ","-0 ","U ","#4 ","-0 "}, {" V ","#8 ","-@ ","V ","#8 ","-@ "}, {" W ","#< ","-P ","W ","#< ","-P "}, {" X ","#@ ",".  ","X ","#@ ",".  "}, {" Y ","#D ",".0 ","Y ","#D ",".0 "}, {"!! ","$$ "," 00","!! "," $$ ","00"}, {"!\" ","$( ","0@","!\" ","$( ","0@"}, {"!# ","$, "," 0P","!# "," $, ","0P"}, {"!$ ","$0 "," 1 ","!$ ","$0 ","1 "}, {"!% ","$4 "," 10","!% "," $4 ","10"}, {"!& ","$8 "," 1@","!& "," $8 ","1@"}, {"!‘ ","$< "," 1P","!‘ "," $< ","1P"}, {"!( ","$@ "," 2 ","!( ","$@ "," 2 "}, {"!) <","$D ","20","!) ","$D "," 20‘"}, {"!* ‘","$H ","2@","!* ","$H ","2@"}, {"!+ ","$L "," 2P","!+ "," $L ","2P"}, {"!, ","$P "," 3 ","!, ","$P ","3 "}, {"!- ","$T "," 30","!- "," $T ","30"}, {"!. ","$X "," 3@","!. "," $X ","3@"}, {"!/ ","$\\ ","3P","!/ ","$\\ "," 3P"}, {"!0 ","%  ","4 ","!0 ","%  ","4 "}, {"!1 ","%$ "," 40","!1 "," %$ ","40"}, {"!2 ","%( "," 4@","!2 "," %( ","4@"}, {"!3 ","%, "," 4P","!3 "," %, ","4P"}, {"!4 ","%0 "," 5 ","!4 ","%0 "," 5 "}, {"!5 ","%4 "," 50","!5 "," %4 ","50"}, {"!6 ","%8 "," 5@","!6 "," %8 ","5@"}, {"!7 ","%< "," 5P","!7 "," %< ","5P"}, {"!8 ","%@ "," 6 ","!8 ","%@ ","6 "}, {"!9 ","%D "," 60","!9 "," %D ","60"}, {"!: ","%H "," 6@","!: "," %H ","6@"}, {"!A ","&$ "," 80","!A "," &$ ","80"}, {"!B ","&( "," 8@","!B "," &(  ","8@"}, {"!C ","&, "," 8P","!C ","&, ","8P"}, {"!D ","&0 ","9 ","!D ","&0 ","9 "}, {"!E ","&4 "," 90","!E "," &4 ","90"}, {"!F ","&8 "," 9@","!F "," &8 ","9@"}, {"!G ","&< "," 9P","!G "," &< ","9P"}, {"!H ","&@ ",": ","!H ","&@ ",": "}, {"!I ","&D "," :0","!I "," &D ",":0"}, {"!J ","&H ",":@","!J ","&H ",":@"}, {"!K ","&L ",":P","!K ","&L ",":P"}, {"!L ","&P ","; ","!L ","&P ","; "}, {"!M ","&T ",";0","!M ","&T ",";0"}, {"!N ","&X ",";@","!N ","&X ",";@"}, {"!O ","&\\ ",";P","!O ",@"&\ ",";P"}, {"!P ","‘  ","< ","!P ","‘  ","< "}, {"!Q ","‘$ ","<0","!Q ","‘$ ","<0"}, {"!R ","‘( "," <@","!R "," ‘( ","<@"}, {"!S ","‘, "," <P","!S "," ‘, ","<P"}, {"!T ","‘0 "," = ","!T ","‘0 ","= "}, {"!U ","‘4 "," =0","!U "," ‘4 ","=0"}, {"!V ","‘8 "," =@","!V "," ‘8 ","=@"}, {"!W ","‘< ","=P", "!W ","‘< ","=P"}, {"!X ","‘@ "," > ","!X ","‘@ "," > "}, {"!Y ","‘D "," >0","!Y "," ‘D ",">0"}, {"!Z ","‘H "," >@","!Z "," ‘H ",">@"}, {" A ","\"$  ","(0","  A ","\"$ ","(0"}, {" ! ","$  ","0 "," ! ","$  ","0 "}, {" C ","\", ","(P"," C ","\", ","(P"}, {" D ","\"0 ",") "," D ","\"0 ",") "}, {" E ","\"4 ",")0 "," E  ","\"4 ",")0"}, {"!> ","%X "," ‘>7@","!> "," %X ","7@"}, {" F ","\"8 ",")@"," F ","\"8 ",")@"}, {" J ","\"H ","*@ "," J  ","\"H ","*@"}, {" H ","\"@ ","* "," H ","\"@ ","* "}, {" I ","\"D ", "*0"," I ","\"D ","*0"}, {"!? ","%\\ ","7P" ,"!? ","%\\ ","7P"}, {" K ","\"L ","*P"," K ", "\"L ","*P"}, {" ] ","#T ","/0"," ] ","#T ","/0"}, {" M ","\"T ","+0"," M ","\"T ","+0"}, {"!; ","%L ","6P","!; "," %L ","6P"}, {"!= ","%T "," 70","!= "," %T ","70"}, {"![ ","‘L "," >P","![ "," ‘L ",">P"}, {"!] ","‘T "," ?0","!] "," ‘T ","?0"}, {" [ ","#L ",".P"," [ ","#L ",".P"}, {" Z ","#H ",".@"," Z ","#H ",".@"}, {" B ","\"( ","(@ "," B ","\"( ","(@"}, {" G ","\"< ",")P"," G ","\"< ",")P"}, {" N ","\"X ","+@"," N ", "\"X ","+@"}, {" _ ","#\\ ","/P"," _ ","#\\ ","/P"}, {"!< ","%P "," 7 ","!< ","%P "," 7 "}, {"!\\ ","‘P ","? ","!\\ ","‘P ","? "}, {" 0 ","\"\\","+P"," 0 " ,"\"\\","+P"}, {"!@ ","&  ","8 ","!@ ","&  ","8 "}, {"!^ ","‘X "," ?@","!^ "," ‘X ","?@"}, {" \\ ","#P ","/ "," \\ ","#P ","/ "}, {" ^ ","#X ","/@"," ^ ","#X ","/@"} }; string strabc1 = "0,1,2,3,4,5,6,7,8,9," + "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z," + "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z," + "!,@,#,$,%,^,&,*,(,),_,+,=,-,[,],{,},;,:,\",‘,.,?,\\,|,/,`,~,<,>,"; string[] strabcs1 = strabc1.Split(‘,‘); for (int n = 0; n < strabcs1.Length; n++) { if (strabcs1[n].ToString() == strs[i].ToString()) { getStr = getStr + strArray1[n, j]; break; } } }
} return getStr; } |
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/wyl900606/article/details/46710395