( CW Finder C-8 Tools CW / C-8 Update List )

jenseneverest

Senior Member
Messages
215
I've started to write a key file in python with all potential keys but the file size is too large and I think fiji's CW finder program can't use it.
Could you share your code for that ?

Also dose anyone know of a python method to produce the crypt8 from a known CW ?

Thanks to all for sharing your files here (y)
 

Robertooo

Well Known Member
Messages
6,223
Could you share your code for that ?

Also dose anyone know of a python method to produce the crypt8 from a known CW ?

Thanks to all for sharing your files here (y)
This python code creates a lot of large txt files with all CW combinations.

import os

def create_large_hex_file(directory="C:/hex_files/", max_file_size=8 * 1024**3): # max_file_size = 8 * 1024**3, where 8 = it creates txt files with 8 GB file size, you can modify it
os.makedirs(directory, exist_ok=True)
max_value = int("F" * 12, 16)

file_index = 0
current_file_size = 0
file = open(f"{directory}/hex_part_{file_index:06d}.txt", "w")

for i in range(max_value + 1):
line = f"{i:012X}\n"
line_size = len(line.encode("utf-8"))

if current_file_size + line_size > max_file_size:
file.close()
file_index += 1
current_file_size = 0
file = open(f"{directory}/hex_part_{file_index:06d}.txt", "w")

file.write(line)
current_file_size += line_size

file.close()
print(f"Total {file_index + 1} file(s) created.")

# run:
create_large_hex_file()
 

orangebirds

Well Known Member
Messages
2,326
This python code creates a lot of large txt files with all CW combinations.

import os

def create_large_hex_file(directory="C:/hex_files/", max_file_size=8 * 1024**3): # max_file_size = 8 * 1024**3, where 8 = it creates txt files with 8 GB file size, you can modify it
os.makedirs(directory, exist_ok=True)
max_value = int("F" * 12, 16)

file_index = 0
current_file_size = 0
file = open(f"{directory}/hex_part_{file_index:06d}.txt", "w")

for i in range(max_value + 1):
line = f"{i:012X}\n"
line_size = len(line.encode("utf-8"))

if current_file_size + line_size > max_file_size:
file.close()
file_index += 1
current_file_size = 0
file = open(f"{directory}/hex_part_{file_index:06d}.txt", "w")

file.write(line)
current_file_size += line_size

file.close()
print(f"Total {file_index + 1} file(s) created.")

# run:
create_large_hex_file()
Wait, you try to make 000000000000 - FFFFFFFFFFFFFFFF or 8GB random keys?
in case of the former, just don't...
-> Add update new cws & sorted
-> Generated =No
-> End of 2024 CWs List
:: CWs list Update 29-12-2024 ::
Hi! any update on the new txt file?
 

orangebirds

Well Known Member
Messages
2,326
I've also created a Python script that will help me on finding ATP feed keys on Apstar 7, sometimes their feed doesn't send Crypt8 and I notice that their key is always patterned into 4 numbers, 4 letters and 4 numbers again

Python:
import itertools
import os
import time
from tqdm import tqdm  # Install with: pip install tqdm

def calculate_file_size():
    digits = '123456789'
    letters = 'ABCD'

    # Calculate the number of strings
    num_strings = (len(digits) ** 4) * (len(letters) ** 4) * (len(digits) ** 4)

    # Each string is 12 characters + 2 newline characters
    bytes_per_string = 12 + 2
    total_bytes = num_strings * bytes_per_string

    # Convert bytes to GB
    file_size_gb = total_bytes / (1024 ** 3)

    print(f"Expected file size: {file_size_gb:.2f} GB")
    return num_strings, total_bytes

def format_time(seconds):
    """Convert seconds into HH:MM:SS format."""
    hours = int(seconds // 3600)
    minutes = int((seconds % 3600) // 60)
    seconds = int(seconds % 60)
    return f"{hours:02}:{minutes:02}:{seconds:02}"

def generate_strings():
    digits = '123456789'
    letters = 'ABCD'
    file_name = 'atp.txt'

    # Check if file exists
    if os.path.exists(file_name):
        user_input = input(f"Warning: {file_name} already exists. Overwrite? (y/n): ").strip().lower()
        if user_input != 'y':
            print("Operation cancelled. No file changes made.")
            return

    # Calculate expected size
    total_strings, expected_size = calculate_file_size()

    # Start time tracking
    start_time = time.time()
    last_update_time = start_time

    # Generate and write strings with a progress bar
    with open(file_name, 'w') as f, tqdm(total=total_strings, unit='strings') as pbar:
        for first_four in itertools.product(digits, repeat=4):
            for middle_four in itertools.product(letters, repeat=4):
                for last_four in itertools.product(digits, repeat=4):
                    string = ''.join(first_four) + ''.join(middle_four) + ''.join(last_four)
                    f.write(string + '\n')

                    # Update progress
                    pbar.update(1)

                    # Refresh display every 1 second
                    if time.time() - last_update_time >= 1:
                        elapsed_time = time.time() - start_time
                        estimated_time_left = (
                            (elapsed_time / pbar.n) * (total_strings - pbar.n) if pbar.n > 0 else 0
                        )
                        pbar.set_postfix(time_left=format_time(estimated_time_left))
                        last_update_time = time.time()

    print("File generation complete.")

if __name__ == "__main__":
    generate_strings()

It will show the file size and progress when making it...
I wish cudabiss support this mode...
 

Robertooo

Well Known Member
Messages
6,223
I've also created a Python script that will help me on finding ATP feed keys on Apstar 7, sometimes their feed doesn't send Crypt8 and I notice that their key is always patterned into 4 numbers, 4 letters and 4 numbers again

...

I'm not a programmer, could you change your code for keys which use year, months and days?
ABCDEF250505
AB05CDEF0505
AB25CD05EF05 and others
Year = 25
Month = 05
Day = 01 to 31

I've already tried it but it's not OK. So we could create keys for a month.
 

orangebirds

Well Known Member
Messages
2,326
I'm not a programmer, could you change your code for keys which use year, months and days?
ABCDEF250505
AB05CDEF0505
AB25CD05EF05 and others
Year = 25
Month = 05
Day = 01 to 31

I've already tried it but it's not OK. So we could create keys for a month.
Sure! Give me the exact range of year, month and day you want
 

orangebirds

Well Known Member
Messages
2,326
I'm not a programmer, could you change your code for keys which use year, months and days?
ABCDEF250505
AB05CDEF0505
AB25CD05EF05 and others
Year = 25
Month = 05
Day = 01 to 31

I've already tried it but it's not OK. So we could create keys for a month.
For the above, here's the code
Python:
# Define the patterns
patterns = [
    "ABCDEF2505",
    "AB25CDEF05",
    "AB25CD05EF"
]

# Generate sequences
output_lines = []
for pattern in patterns:
    for i in range(1, 32):  # Decimal range 01-31
        output_lines.append(f"{pattern}{i:02d}")

# Write to a text file
output_file = "output.txt"
with open(output_file, "w") as file:
    file.write("\n".join(output_lines))

print(f"File '{output_file}' has been created successfully.")
 

Robertooo

Well Known Member
Messages
6,223
Sure! Give me the exact range of year, month and day you want
I'd like to change the year and month only. So we can create keys for a month once.

Year = first two digits YY1 = 20, last two digits YY2 = 25
Month = 05 (MM)
Days = 01 to 31 (DD)
XX = 00 to FF (XX)

2025XX01XX05
..
XX25XX052001

I've tried this earlier but there are a lots of combinations.

# All possible formats (year is split into YY1 and YY2)
formats = [
"{YY1}{YY2}{DD}{MM}{XX}{XX}",
"{YY1}{DD}{MM}{XX}{YY2}{XX}", # Year first, then day, month, hex
"{DD}{XX}{MM}{YY1}{XX}{YY2}", # Day first, hex in between, year split
"{XX}{YY1}{DD}{MM}{YY2}{XX}", # Hex first, then year and date
"{XX}{YY2}{DD}{MM}{YY1}{XX}", # Hex first, reversed year order
"{DD}{MM}{YY1}{XX}{YY2}{XX}", # Standard date, split year, hex mixed
"{YY2}{XX}{DD}{YY1}{XX}{MM}", # Reversed year split, mixed hex
etc
 

orangebirds

Well Known Member
Messages
2,326
I'd like to change the year and month only. So we can create keys for a month once.

Year = first two digits YY1 = 20, last two digits YY2 = 25
Month = 05 (MM)
Days = 01 to 31 (DD)
XX = 00 to FF (XX)

2025XX01XX05
..
XX25XX052001

I've tried this earlier but there are a lots of combinations.

# All possible formats (year is split into YY1 and YY2)
formats = [
"{YY1}{YY2}{DD}{MM}{XX}{XX}",
"{YY1}{DD}{MM}{XX}{YY2}{XX}", # Year first, then day, month, hex
"{DD}{XX}{MM}{YY1}{XX}{YY2}", # Day first, hex in between, year split
"{XX}{YY1}{DD}{MM}{YY2}{XX}", # Hex first, then year and date
"{XX}{YY2}{DD}{MM}{YY1}{XX}", # Hex first, reversed year order
"{DD}{MM}{YY1}{XX}{YY2}{XX}", # Standard date, split year, hex mixed
"{YY2}{XX}{DD}{YY1}{XX}{MM}", # Reversed year split, mixed hex
etc
A bit complicated, but doable...
So, you'll have 6 factorial (6!) = 720 combination of formats from the 6 variables (yy1, yy2, mm, dd, hex1, hex2)

Then 31 days, 256 hexes

720 * 31 * 256 * 256 = 1.462.763.520 keys

I can try tonight...
 

orangebirds

Well Known Member
Messages
2,326
What do you do in that case ? Are you simply trying keys until one works ......surely not ??
Asking my friend who use Starsat/GTMedia box to find the key, those box producer have servers that I believe finding keys by actually bruteforcing keys one by one.
This become increasingly common and used by many feed providers
 

jenseneverest

Senior Member
Messages
215
GTMedia box to find the key
A mate of mine has found that gtmedia sends and encrypted "ECM" request (i say ecm as it has the correct length to be one - it may not be). How this "ecm" is calculated or used on the server end - i have no idea - but results of a returned working CW are scary fast if it is indeed brute force......
 

orangebirds

Well Known Member
Messages
2,326
A mate of mine has found that gtmedia sends and encrypted "ECM" request (i say ecm as it has the correct length to be one - it may not be). How this "ecm" is calculated or used on the server end - i have no idea - but results of a returned working CW are scary fast if it is indeed brute force......
Hmm... do you have the API link? is it HTTP?
 
Top