Skip to content

Commit

Permalink
rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark committed Mar 9, 2024
1 parent 2e37c51 commit aafe28f
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 311 deletions.
26 changes: 0 additions & 26 deletions Education.py

This file was deleted.

26 changes: 0 additions & 26 deletions Enterprise.py

This file was deleted.

26 changes: 0 additions & 26 deletions Home.py

This file was deleted.

26 changes: 0 additions & 26 deletions Pro.py

This file was deleted.

26 changes: 0 additions & 26 deletions Professional.py

This file was deleted.

26 changes: 0 additions & 26 deletions ProfessionalN.py

This file was deleted.

37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
# WindowsActivator
A simple Windows Activator I coded. It uses a trick from a online website to activate Microsoft Windows for free without a license.

# How it works
As an example, let's take the Home.py. It does some commands provided on the web that helps you to activate Windows for free.
This is a simple CLI program made in Python that can activate Microsoft Windows for free. I have tested it on Windows 11, however I assume it should work same on Windows 7 and higher.

# Does it still work?
Yes, it should work. Make sure you are running Windows 7 or higher with Python installed. I'm looking further to continue this application now as it has been dead for a long while.
> This program is only for educational purposes.
# Legal
I do not promote free activation or cracking anything. This project is just for educational purposes, and I am not responsible for any cases.
To use it, first install the packages from requirements `pip3 install -r requirements.txt` and then run the main.py under activator folder.

### Modes

I made it to 2 modes. When you run main.py, you recieve like:

````bash
Usage: main.py [OPTIONS] COMMAND [ARGS]...
Try 'main.py --help' for help.
Error - Missing command.```
````
Run with `--help` and you will see 2 commands: `automatic` and `manual`.
- Use the automatic command if you want to simply activate your Windows.
- The manual command will let you choose the edition to activate, however it functions the same.
### Supported Editions
Below is the list of all supported editions to be activated:
- Home
- Pro
- Professional
- Education
- Enterprise
> I wanted to make a cool CLI program so I just made this. Be sure to report any bugs and contributing is welcome!
76 changes: 76 additions & 0 deletions activator/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import typer
import os
import sys
import platform
import time
import inquirer

class NotUsingWindows(Exception):
pass

class UnsupportedEdition(Exception):
pass

# Define the product keys dictionary
product_keys = {
'home': 'TX9XD-98N7V-6WMQ6-BX7FG-H8Q99',
'pro': 'W269N-WFGWX-YVC9B-4J6C9-T83GX',
'education': 'NW6C2-QMPVW-D7KKK-3GKT6-VCFB2',
'enterprise': 'NPPR9-FWDCX-D2C8J-H872K-2YT43',
'professional': 'W269N-WFGWX-YVC9B-4J6C9-T83GX'
}

def crack(edition):
edition = edition.lower()
if edition in product_keys:
product_key = product_keys[edition]
os.system(f"slmgr /ipk {product_key}")
os.system("slmgr /skms kms8.msguides.com")
os.system("slmgr /ato")

if platform.system() == 'Windows':
edition = platform.win32_edition()
if edition and (edition == "Home" or edition == "Pro" or edition == "Professional" or edition == "Enterprise" or edition == "Education"):
pass
else:
raise UnsupportedEdition("The edition of your Windows is not supported by this program.")
sys.exit()
else:
raise NotUsingWindows("You are not on Windows, this script is only for Windows.")
sys.exit()

app = typer.Typer()

@app.command()
def manual(edition: str):
restartQ = [inquirer.List('restart', message="Would you prefer to restart now to apply changes?",choices=['Sure', 'Not now'],),]
edition = edition.lower()
edit = edition.capitalize()
if(not(edition == "home" or edition == "pro" or edition == "professional" or edition == "enterprise" or edition == "education")):
raise UnsupportedEdition("Invalid edition or it does not exist.")
print("Try Home, Pro, Professional, Education or Enterprise. Also spell correctly and completely.")
print(f"Attempting to crack the {edit} Edition.")
crack(edition)
print("The dialogs should have told you whether it was success or no.")
print("If it required permissions, open command prompt as adminstrator and then run the python file to work.")
restartQ = inquirer.prompt(restartQ)
if(restartQ["restart"] == "Sure"):
print("Ok, restarting in 30 seconds. Save your work if you haven't!")
time.sleep(30)
os.system("shutdown /s /f /t 0")

@app.command()
def automatic():
restartQ = [inquirer.List('restart', message="Would you prefer to restart now to apply changes?",choices=['Sure', 'Not now'],),]
edition = (platform.win32_edition()).lower()
crack(edition)
print("The dialogs should have told you whether it was success or no.")
print("If it required permissions, open command prompt as adminstrator and then run the python file to work.")
restartQ = inquirer.prompt(restartQ)
if(restartQ["restart"] == "Sure"):
print("Ok, restarting in 30 seconds. Save your work if you haven't!")
time.sleep(30)
os.system("shutdown /s /f /t 0")

if __name__ == "__main__":
app()
26 changes: 0 additions & 26 deletions educationn.py

This file was deleted.

26 changes: 0 additions & 26 deletions enterprisen.py

This file was deleted.

26 changes: 0 additions & 26 deletions homen.py

This file was deleted.

Loading

0 comments on commit aafe28f

Please sign in to comment.