finalize burn list
This commit is contained in:
		
							parent
							
								
									3f3b980b98
								
							
						
					
					
						commit
						ac7b827c36
					
				| @ -275,9 +275,10 @@ class HBSYSTEM(DatagramProtocol): | ||||
|         burn_id = ast.literal_eval(os.popen('cat ' + self._CONFIG['USER_MANAGER']['BURN_FILE']).read()) | ||||
|         peer_id_trimmed = int(str(int_id(peer_id))[:7]) | ||||
|         try: | ||||
|             #print(self.ums_response) | ||||
|             print(self.ums_response) | ||||
|             if self.ums_response['mode'] == 'legacy': | ||||
|                 _calc_hash = bhex(sha256(_salt_str+self._config['PASSPHRASE']).hexdigest()) | ||||
|                 calc_passphrase = self._config['PASSPHRASE'] | ||||
|             if self.ums_response['mode'] == 'override': | ||||
|                 _calc_hash = bhex(sha256(_salt_str+str.encode(self.ums_response['value'])).hexdigest()) | ||||
|             if self.ums_response['mode'] == 'normal': | ||||
| @ -310,7 +311,8 @@ class HBSYSTEM(DatagramProtocol): | ||||
|             if self._CONFIG['USER_MANAGER']['SHORTEN_PASSPHRASE'] == False: | ||||
|                 pass | ||||
|             _calc_hash = bhex(sha256(_salt_str+calc_passphrase).hexdigest()) | ||||
|         print((calc_passphrase)) | ||||
|         print(calc_passphrase) | ||||
|         #    print(_calc_hash) | ||||
|         return _calc_hash | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -825,8 +825,8 @@ def create_app(): | ||||
| <td style="width: 77.7167px; text-align: center;"><strong>Custom</strong></td> | ||||
| </tr> | ||||
| <tr> | ||||
| <td style="text-align: center; width: 70.8px;">''</td> | ||||
| <td style="text-align: center; width: 103.45px;">0</td> | ||||
| <td style="text-align: center; width: 70.8px;">0 - default<br />1+ new calculation)</td> | ||||
| <td style="text-align: center; width: 103.45px;">''</td> | ||||
| <td style="text-align: center; width: 77.7167px;">'passphrase'</td> | ||||
| </tr> | ||||
| </tbody> | ||||
| @ -880,6 +880,7 @@ def create_app(): | ||||
|             passphrase = gen_passphrase(dmr_id) | ||||
|         elif authorized_peer(dmr_id)[1] == '': | ||||
|             passphrase = legacy_passphrase | ||||
|             print(passphrase) | ||||
|         elif authorized_peer(dmr_id)[1] != '' or authorized_peer(dmr_id)[1] != 0: | ||||
|             passphrase = authorized_peer(dmr_id)[1] | ||||
|         #try: | ||||
|  | ||||
| @ -24,6 +24,11 @@ append_int = 1 | ||||
| 
 | ||||
| shared_secrets = ['test'] | ||||
| 
 | ||||
| 
 | ||||
| burn_int = 5 | ||||
| 
 | ||||
| legacy_passphrase = 'passw0rd' | ||||
| 
 | ||||
| # Email settings | ||||
| MAIL_SERVER = 'smtp.gmail.com' | ||||
| MAIL_PORT = 465 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user