File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 3
3
using System . Security . Principal ;
4
4
using System . Windows . Forms ;
5
5
using Microsoft . Win32 ;
6
+ using System . Security . Cryptography ;
7
+ using System . Text ;
6
8
7
9
namespace FrpClient_Win
8
10
{
@@ -11,9 +13,21 @@ public partial class MainForm : Form
11
13
Process frp_process = null ;
12
14
bool bStatus = false ;
13
15
bool sStatus = false ;
14
- const string strRegName = "FrpClient" ;
16
+ string strRegName = "FrpClient_" + MD5Encrypt32 ( System . Windows . Forms . Application . StartupPath ) . Substring ( 0 , 6 ) ;
15
17
const string strAutoRun = "autorun" ;
16
18
19
+ // 32位的MD5加密
20
+ public static string MD5Encrypt32 ( string password ) {
21
+ string cl = password ;
22
+ string pwd = "" ;
23
+ MD5 md5 = MD5 . Create ( ) ;
24
+ byte [ ] s = md5 . ComputeHash ( Encoding . UTF8 . GetBytes ( cl ) ) ;
25
+ for ( int i = 0 ; i < s . Length ; i ++ ) {
26
+ pwd = pwd + s [ i ] . ToString ( "x" ) ;
27
+ }
28
+ return pwd ;
29
+ }
30
+
17
31
public MainForm ( )
18
32
{
19
33
InitializeComponent ( ) ;
You can’t perform that action at this time.
0 commit comments