@@ -28,6 +28,7 @@ static void Main(string[] args)
28
28
char method = ( char ) Console . Read ( ) ;
29
29
string path ;
30
30
string EngineVersion = "4.18.0" ;
31
+ string saveName = "" ;
31
32
switch ( method )
32
33
{
33
34
case '0' :
@@ -42,6 +43,7 @@ static void Main(string[] args)
42
43
if ( p . ProcessName == ProcessName || p . Id . ToString ( ) == ProcessName )
43
44
{
44
45
Console . WriteLine ( $ "\n Found { p . ProcessName } ") ;
46
+ saveName = p . ProcessName ;
45
47
searcher = new Searcher ( p ) ;
46
48
found = true ;
47
49
break ;
@@ -72,6 +74,8 @@ static void Main(string[] args)
72
74
return ;
73
75
}
74
76
77
+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
78
+
75
79
game = new Process ( ) { StartInfo = { FileName = path } } ;
76
80
game . Start ( ) ;
77
81
Thread . Sleep ( 1000 ) ;
@@ -98,6 +102,8 @@ static void Main(string[] args)
98
102
return ;
99
103
}
100
104
105
+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
106
+
101
107
searcher = new Searcher ( File . ReadAllBytes ( path ) ) ;
102
108
searcher . SetFilePath ( path ) ;
103
109
EngineVersion = searcher . SearchEngineVersion ( ) ;
@@ -111,6 +117,9 @@ static void Main(string[] args)
111
117
Console . Read ( ) ;
112
118
Console . Read ( ) ;
113
119
path = Console . ReadLine ( ) . Replace ( "\" " , "" ) ;
120
+
121
+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
122
+
114
123
if ( ! File . Exists ( path ) )
115
124
{
116
125
Console . ForegroundColor = ConsoleColor . Red ;
@@ -125,6 +134,9 @@ static void Main(string[] args)
125
134
Console . Read ( ) ;
126
135
Console . Read ( ) ;
127
136
path = Console . ReadLine ( ) . Replace ( "\" " , "" ) ;
137
+
138
+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
139
+
128
140
if ( ! File . Exists ( path ) )
129
141
{
130
142
Console . ForegroundColor = ConsoleColor . Red ;
@@ -139,25 +151,36 @@ static void Main(string[] args)
139
151
140
152
if ( aesKeys . Count > 0 )
141
153
{
154
+ string WriteToFile = "" ;
155
+ string txt = aesKeys . Count == 1 ? $ "Found { aesKeys . Count } AES Key in { took } ms\n " : $ "Found { aesKeys . Count } AES Keys in { took } ms\n ";
156
+
157
+ WriteToFile += txt ;
158
+
142
159
Console . ForegroundColor = ConsoleColor . Green ;
143
- Console . WriteLine ( aesKeys . Count == 1 ? $ " \n Found { aesKeys . Count } AES Key in { took } ms" : $ " \n Found { aesKeys . Count } AES Keys in { took } ms" ) ;
160
+ Console . Write ( " \n " + txt ) ;
144
161
Console . ForegroundColor = ConsoleColor . White ;
145
162
int EngineVersionI = 17 ;
146
163
if ( EngineVersion != "" ) EngineVersionI = Convert . ToInt32 ( EngineVersion . Split ( "." ) [ 1 ] ) ;
147
164
if ( EngineVersionI < 18 )
148
165
{
149
166
foreach ( KeyValuePair < ulong , string > o in aesKeys )
150
167
{
151
- Console . WriteLine ( $ "{ aesKeys [ o . Key ] } at { o . Key } ") ;
168
+ txt = $ "{ aesKeys [ o . Key ] } at { o . Key } \n ";
169
+ Console . Write ( txt ) ;
170
+ WriteToFile += txt ;
152
171
} ;
153
172
}
154
173
else
155
174
{
156
175
foreach ( KeyValuePair < ulong , string > o in aesKeys )
157
176
{
158
- Console . WriteLine ( $ "{ aesKeys [ o . Key ] } ({ System . Convert . ToBase64String ( GetHex ( aesKeys [ o . Key ] [ 2 ..aesKeys [ o . Key ] . Length ] ) ) } ) at { o . Key } ") ;
177
+ txt = $ "{ aesKeys [ o . Key ] } ({ System . Convert . ToBase64String ( GetHex ( aesKeys [ o . Key ] [ 2 ..aesKeys [ o . Key ] . Length ] ) ) } ) at { o . Key } \n ";
178
+ Console . Write ( txt ) ;
179
+ WriteToFile += txt ;
159
180
} ;
160
181
}
182
+
183
+ File . WriteAllText ( saveName + "_aes_keys.txt" , WriteToFile ) ;
161
184
}
162
185
else
163
186
{
0 commit comments