def trialKey():
    trial_key = Key.create_trial_key(
        "WyIzODQ0IiwiempTRWs4SnBKTTArYUh3WkwyZ0VwQkVyeTlUVkRWK2ZTOS8wcTBmaCJd",
        3941, Helpers.GetMachineCode())

    if trial_key[0] == None:
        print("An error occurred: {0}".format(trial_key[1]))

    RSAPubKey = "<RSAKeyValue><Modulus>sGbvxwdlDbqFXOMlVUnAF5ew0t0WpPW7rFpI5jHQOFkht/326dvh7t74RYeMpjy357NljouhpTLA3a6idnn4j6c3jmPWBkjZndGsPL4Bqm+fwE48nKpGPjkj4q/yzT4tHXBTyvaBjA8bVoCTnu+LiC4XEaLZRThGzIn5KQXKCigg6tQRy0GXE13XYFVz/x1mjFbT9/7dS8p85n8BuwlY5JvuBIQkKhuCNFfrUxBWyu87CFnXWjIupCD2VO/GbxaCvzrRjLZjAngLCMtZbYBALksqGPgTUN7ZM24XbPWyLtKPaXF2i4XRR9u6eTj5BfnLbKAU5PIVfjIS+vNYYogteQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"
    auth = "WyIyNTU1IiwiRjdZZTB4RmtuTVcrQlNqcSszbmFMMHB3aWFJTlBsWW1Mbm9raVFyRyJd=="

    result = Key.activate(token=auth,\
                    rsa_pub_key=RSAPubKey,\
                    product_id=3349, \
                    key=trial_key[0],\
                    machine_code=Helpers.GetMachineCode())

    if result[0] == None or not Helpers.IsOnRightMachine(result[0]):
        print("An error occurred: {0}".format(result[1]))
    else:
        print("Success")

        license_key = result[0]
        print("Feature 1: " + str(license_key.f1))
        print("License expires: " + str(license_key.expires))
def validate_date():
    #If you want to make sure that the license file is not too old, you can specify the maximum number of days as shown below (after 30 days, this method will return NoneType).
    # read license file from file
    with open('licensefile.skm', 'r') as f:
        license_key = LicenseKey.load_from_string(pubKey, f.read(), 30)

        if license_key == None or not Helpers.IsOnRightMachine(license_key):
            print("NOTE: This license file does not belong to this machine.")
        else:
            print("Feature 1: " + str(license_key.f1))
            print("License expires: " + str(license_key.expires))
Beispiel #3
0
def main(key):

    pubKey = "<RSAKeyValue><Modulus>08yy3bS4xdfjrOcUMDDsWHQc9LqT3g4vboGATTk64eUfM2Fw0Z2EKl4SYXdLbXLd8l0zYZhvpkpMYEe00LGo0RoKGz5z+4l5dKro66s7TSoaJfIFUnevQUe/R/Hbf/8NGDvUPc/X1GsMowKMBKRZGeowvR07DYgGcncZSUwXsKlB0zPsunYZ8eoyqKzooDyqeAxftIVD1sv5d1HHbF10m8rq/hDInPyvgY0IwIxvWxvcsttIyHBdHIG/aWU2lfSgLZC6XP7T27YqOxgpwlDuPfN64qB3r3psboWEqtkBwjyc/mB1zU86gldPUevYX7zGq1GdsRLN8gVZeOqPtx35gw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"
    bundle_dir = os.getcwd()
    # print(bundle_dir)
    path_to_key = path.join(bundle_dir, 'autozoom/data', '.keyFile')
    # print(path_to_key)
    path_to_license = path.join(bundle_dir, 'autozoom/data', '.licenseFile')
    try:
        f = open(path_to_license, 'r')
        l_file = json.load(f)
        f.close()
        license = LicenseKey.load_from_string(pubKey, l_file)
        if license == None or not Helpers.IsOnRightMachine(license):
            # print('Valid License!')
            raise ValueError('no license file')
        else:
            return True, ''

    except:
        res,mess = Key.activate(token="WyIyMTc4OSIsImdrdzI5Y2VVTXhPZFI3RWhCRXZESUY3OXh2VnBFZjFoM0ZwQU5JblMiXQ==",\
               rsa_pub_key=pubKey,\
               product_id=6258, key=key,\
               machine_code=Helpers.GetMachineCode())
        # print('Invalid License!')
        # print(key)
        # print(Helpers.GetMachineCode())
        # print(res)
        # print(mess)

        if res == None or not Helpers.IsOnRightMachine(res):
            return False, mess
        else:
            saved_license = res.save_as_string()
            with open(path_to_license, 'w') as f:
                # print(path_to_license)
                json.dump(saved_license, f)
            with open(path_to_key, 'w') as f:
                f.write(key)
            return True, ''
Beispiel #4
0
def authkey(
        auth="WyI0MzQ5NyIsIm8rRGJXcjBJNUo3aWYwUk5URUJNaXdZZWdHSlZZbmwxMHFoK2JEQ0ciXQ==",
        product_id=None,
        rsa_pub_key="<RSAKeyValue><Modulus>n5Q5BtZIlprf+d74p2YmQT1ZnRrCFGqt9JtAzO29/eNbzaM9rFZ5IaD8iIqbc0gVrE2ZFA0tfCtzeAVdV6MlaDaaqexNIZARMBK4dk9AEZb9kAOzdUXZNLv6O3+HyZg6bV75Gj6xFY17YUCefDol5Fyn0Z072lFXUV1DArgb+i2r/YDBI/QTS0crHMUS7iXdlWRk1DdGABvrvtoR78P6+uci5njxjlkniByBODyRMAoml1zk9YBRrCEXi6HLxlurd2Y29QizHRTCACCZP3WsNSiyKZqgKOOjUnZyi+hMX8+W06tcofsjjbKa7D+csFQi0MeL5juiNM3om0vtSD6zjQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>",
        key=None,
        pathtokey=None,
        pathtovaluecsv_key=None,
        using_permanent_key=False,
        valueser_key="",
        path_mc_id="",
        ser_key=""):
    """ auth key """
    result = Key.activate(token=auth,\
                   rsa_pub_key=rsa_pub_key,\
                   product_id=product_id, \
                   key=key,\
                   machine_code=Helpers.GetMachineCode()
                   )
    if (result[0] == None or not Helpers.IsOnRightMachine(
            result[0])) and using_permanent_key == False:
        # an error occurred or the key is invalid or it cannot be activated
        # (eg. the limit of activated devices was achieved)
        # in this case not connect server
        if "11001" in result[1]:
            return _active_or_not(pathtokey=pathtokey,
                                  pathtovaluecsv_key=pathtovaluecsv_key)
        # case for not actived
        else:
            write_key(path=pathtokey)
            key = load_key(pathtokey)
            encrypt(filename=pathtovaluecsv_key,
                    key=key,
                    nametow=b"Not actived")
            return [False]

    elif using_permanent_key:
        return __check_permanent_key(path_mc_id=path_mc_id,
                                     valueser_key=valueser_key,
                                     pathtokey=pathtokey,
                                     ker_ser=key,
                                     ser_key=ser_key)

    else:
        # everything went fine if we are here!
        write_key(path=pathtokey)
        key = load_key(pathtokey)
        encrypt(filename=pathtovaluecsv_key, key=key, nametow=b"actived")
        license_key = result[0]
        return [True, str(license_key.expires)]
Beispiel #5
0
def AuthKey():

    key = config.get('KEY')
    result = Key.activate(token=auth,\
        rsa_pub_key=RSAPubKey,\
        product_id=8155, \
        key=key,\
        machine_code=Helpers.GetMachineCode())

    if result[0] == None or not Helpers.IsOnRightMachine(result[0]):
        ctypes.windll.user32.MessageBoxW(1, "Invalid Key", "Error", 16)
        time.sleep(5)
        AuthKey(sys.exit())

    else:
        ctypes.windll.user32.MessageBoxW(0, "Welcome to Bounty", "Success", 64)
        time.sleep(3)
        pass
Beispiel #6
0
def check_key():
    license_key = get_license_settings()
    result = Key.activate(token=auth,
                          rsa_pub_key=RSAPubKey,
                          product_id=8237,
                          key=license_key,
                          machine_code=Helpers.GetMachineCode())

    if result[0] is None or not Helpers.IsOnRightMachine(result[0]):
        # an error occurred or the key is invalid or it cannot be activated
        # (eg. the limit of activated devices was achieved)
        print("the limit of activated devices was achieved")
        return False
    else:
        # everything went fine if we are here!
        print("everything went fine if we are here!")
        license_key = result[0]
        return True
    def __init__(self, username, password):
        result = Key.activate(token=auth,\
                   rsa_pub_key=RSAPubKey,\
                   product_id=, \
                   key="BZGYH-JBCLV-XIXWZ-VTAFY",\
                   machine_code=Helpers.GetMachineCode())

        if result[0] == None or not Helpers.IsOnRightMachine(result[0]):
            print("The license does not work: {0}".format(result[1]))
        else:
            #logging in
            logging.warning("Initializing bot")
            license_key = result[0]
            print("License expires: " + str(license_key.expires))
            self.username = username
            self.password = password
            self.driver = webdriver.Chrome()
            self.driver.maximize_window()
            self.driver.get("")
            logging.warning("Started")
            sleep(1)
            self.driver.find_element_by_xpath("//a[@href='']").click()
            sleep(2)
            self.driver.find_element_by_xpath("//input[@name=\"email\"]").send_keys(username)
            sleep(2)
            self.driver.find_element_by_xpath("//input[@name=\"password\"]").send_keys(password)
            sleep(2)
            self.driver.find_element_by_xpath('//button[@type="submit"]').click()
            sleep(5)
            try:
                self.driver.find_element_by_xpath("/html/body/div[2]/div/div[1]/ul[2]/div/div/div/div/div/div/div[2]/div/button").click()
                self.driver.get("")
                sleep(5)
            except:
                    try: 
                        self.driver.get("")
                        sleep(2)
                    except:
                        sleep(2)
                        pass
from licensing.methods import Key, Helpers, Message, Product, Customer, Data, AI
import logging
import socket
import uuid
RSAPubKey = "<RSAKeyValue><Modulus>2o1s3GxdeCFa1xPtkjkCZZGSziMxYAmYVOMGQeZwW9FExEx+z6aW1MVambyz8iS1azisAoucru+rqy1ex1P9kHN6q20UTwS0sJn3k5n+uFen9qEI3ooh2JSz7ArccTTGAw+fEs5b8Ls3ldH2OsfmoVxXcdBtUJZQj3wDQE4ocRDL9M5ybuZjGesxBySeTPVuQjEBpzXElal9vVbcfQubLQZPrHgfr6BxKFf/pt3/6xgewraUyy4HfQly2F3gi9iOoG4Um/8BYIalF0LkYQxv1O5HeKNmDf90TMfAy0CGe+hCr7lVwOLEhYAxO2fo0rxdkHcx6jio5O/DH2or3ISdtQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"
auth = "WyI3NDE0MjIiLCJzMVVvNkxka2dxSlk2YWcvRW10U3lKMHFZT2o5d3pYbjRLNnNSYVNUIl0="
#from cryptolens_python2 import *

#HelperMethods.ironpython2730_legacy = True
print(Helpers.GetMachineCode())
res = Key.activate(token=auth,\
                   rsa_pub_key=RSAPubKey,\
                   product_id=10254, key="CVWRY-LRSWB-OBQLS-HNRVD", machine_code=Helpers.GetMachineCode(),\
                   friendly_name=socket.gethostname())
print(res[0].activated_machines)
if res[0] == None or not Helpers.IsOnRightMachine(res[0]):
    print("An error occured: {0}".format(res[1]))
else:
    print("Success")

    license_key = res[0]
    print("Feature 1: " + str(license_key.f1))
    print("License expires: " + str(license_key.expires))

if res[0] != None:
    # saving license file to disk
    with open('licensefile.skm', 'w') as f:
        f.write(res[0].save_as_string())

# read license file from file
with open('licensefile.skm', 'r') as f:
import traceback
import time
import random
from licensing.models import *
from licensing.methods import Key, Helpers

RSAPubKey = "<RSAKeyValue><Modulus>vrLmwkYhrQ1GxldUYdmVi7tkOk3lpHrPgMKbvM277yjbXV1iiReJ0S27wh/zzZaGKJGjZ7OMw9/bRyJoX2MuGrg8uxY0WEmsPPw7I/Um3n5a+sM3EN6FlRUnEHkrKrA3lpft7VciDxdfCAsSIV5ID+5Q8K/5gKoIMknOiiUoVLHXtfXRfhkADq64sSQM77nX1I5gRpXa0pmywyy/bZsbQoSgG5EiqUB1ix9VBq2Gz87576W4dcL++SI+JANDg/N/2Kacdl9YVL2Uq2UJsA9TKywvnzrq2a72ovUnUTXOZU3vkukuNL7tG7Pt1QYfnJPTePq/6AXzJkY6liXGx4khyQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"
auth = "WyIyODY2NDkiLCJ6NHBTT085b3l6emdtdW1CcFhGU25PWFdkMlh1VFg1YnIwaHJzNWd5Il0="

result = Key.activate(token=auth,\
                   rsa_pub_key=RSAPubKey,\
                   product_id=9144, \
                   key="BYRDW-SMHLW-DNCQI-EATFV",\
                   machine_code=Helpers.GetMachineCode())

if result[0] == None or not Helpers.IsOnRightMachine(result[0]):
    # an error occurred or the key is invalid or it cannot be activated
    # (eg. the limit of activated devices was achieved)
    print("The license does not work: {0}".format(result[1]))
else:
    # everything went fine if we are here!
    print("The license is valid!")
    license_key = result[0]
    print("Feature 1: " + str(license_key.f1))
    print("License expires: " + str(license_key.expires))
    print("Telegram @mrhaamoo")

with open('./memory.csv', 'r') as hash_obj:
    csv_reader = reader(hash_obj)
    list_of_rows = list(csv_reader)
    row_number = 1