File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,12 @@ private void ReadInfo()
104104
105105 if ( factoryKey != null )
106106 {
107- Log . Info ( $ "Unlock key: { factoryKey } ") ;
107+ Log . Info ( $ "Saved key: { factoryKey } ") ;
108108 }
109109
110110 var random = new Random ( Guid . NewGuid ( ) . GetHashCode ( ) ) ;
111111
112- args . UnlockCode = factoryKey ?? new string ( Enumerable . Repeat ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" , 16 )
112+ args . UnlockCode = new string ( Enumerable . Repeat ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" , 16 )
113113 . Select ( s => s [ random . Next ( s . Length ) ] ) . ToArray ( ) ) ;
114114 }
115115
@@ -160,7 +160,7 @@ private void SetHWDogState(byte state)
160160 private string ReadFactoryKey ( )
161161 {
162162 var res = fb . Command ( "getvar:nve:WVLOCK" ) ;
163- var match = Regex . Match ( res . Payload , @"\w {16}" ) ;
163+ var match = Regex . Match ( res . Payload , @"[\w\d] {16}" ) ;
164164
165165 return match . Success ? match . Value : null ;
166166 }
@@ -213,16 +213,13 @@ private void Worker_DoWork(object sender, DoWorkEventArgs e)
213213 ReadInfo ( ) ;
214214 WriteNVME ( ) ;
215215
216- Log . Info ( "Finalizing..." ) ;
217- LogResponse ( fb . Command ( $ "oem unlock { args . UnlockCode } ") ) ;
218-
219216 if ( args . Reboot )
220217 {
221218 Log . Info ( "Rebooting..." ) ;
222219 fb . Command ( "reboot" ) ;
223220 }
224221
225- Log . Info ( $ "Bootloader unlock code: { args . UnlockCode } ") ;
222+ Log . Info ( $ "New unlock code: { args . UnlockCode } ") ;
226223
227224 fb . Disconnect ( ) ;
228225 }
Original file line number Diff line number Diff line change 2020 ResourceDictionaryLocation . SourceAssembly
2121) ]
2222
23- [ assembly: AssemblyVersion ( "2.2.0 .0" ) ]
24- [ assembly: AssemblyFileVersion ( "2.2.0 .0" ) ]
23+ [ assembly: AssemblyVersion ( "2.2.1 .0" ) ]
24+ [ assembly: AssemblyFileVersion ( "2.2.1 .0" ) ]
You can’t perform that action at this time.
0 commit comments