Skip to content
el
zone
Databank
Search
4char.py
Rendered
Raw
Table
Loading...
JavaScript is disabled
This page requires JavaScript to function. Please enable JavaScript and reload the page.
#!/usr/bin/env python3 import itertools import string import os from datetime import datetime def generate_4char_combinations(): """ Generate all possible 4-character combinations using: - Lowercase letters (a-z) - Numbers (0-9) - Period (.) """ # Define the character set chars = string.ascii_lowercase # Generate all possible 4-character combinations combinations = itertools.product(chars, repeat=4) # Create output directory if it doesn't exist output_dir = "output" if not os.path.exists(output_dir): os.makedirs(output_dir) # Create a timestamp for the filename timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") output_file = os.path.join(output_dir, f"4char_combinations_{timestamp}.txt") # Write combinations to file count = 0 with open(output_file, 'w') as f: for combo in combinations: f.write(''.join(combo) + '\n') count += 1 print(f"Generated {count} combinations and saved to {output_file}") return output_file if __name__ == "__main__": output_file = generate_4char_combinations() print(f"Total combinations: {37**4}") # 37 characters (26 letters + 10 digits + 1 period) to the power of 4