18 lines
		
	
	
		
			581 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			581 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/python3
 | 
						|
# -*- coding: utf-8 -*-
 | 
						|
 | 
						|
# Required parameters:
 | 
						|
# @raycast.schemaVersion 1
 | 
						|
# @raycast.title Generate RFC 4193 ULA Locally Assigned Address Block /56
 | 
						|
# @raycast.mode silent
 | 
						|
# @raycast.packageName Developer Utilities
 | 
						|
 | 
						|
# Optional parameters:
 | 
						|
# @raycast.icon 💻
 | 
						|
 | 
						|
import os, binascii, subprocess
 | 
						|
prefix = "fd" + binascii.b2a_hex( os.urandom( 6 ) ).decode( "utf-8" ) + "00"
 | 
						|
prefix = prefix[ 0:4 ] + ":" + prefix[ 4:8 ] + ":" + prefix[ 8:12 ] + ":" + prefix[ 12:16 ] + "::/56"
 | 
						|
subprocess.run( [ "/usr/bin/pbcopy" ], input = prefix.encode( "utf-8" ) )
 | 
						|
print( prefix )
 |