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