Search in sources :

Example 1 with AdidasAccountCreator

use of main.java.sneakerbot.utils.AdidasAccountCreator in project SneakerBot by Penor.

the class Bot method main.

public static void main(String[] args) {
    init();
    if (configs == null)
        return;
    configs.stream().forEach(c -> {
        if (c.getTasks() == 0)
            return;
        CredentialObject creds = null;
        try {
            creds = credentials.get(c.getPayment());
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
        if (!Harvester.running && c.getSiteKey() != null && !c.getSiteKey().isEmpty())
            new Harvester(c.getSiteKey());
        if (c.getTaskType() == Task.ACCOUNTCREATOR)
            new AdidasAccountCreator(getRandomProxy(), c.getTasks()).start();
        if (c.getTaskType() == Task.SITEKEYGRABBER)
            new SitekeyGrabber(getRandomProxy()).check();
        for (int start = 0; start < c.getTasks(); start++) {
            if (c.getTaskType() == Task.ADIDAS) {
                pool.run(new Adidas(start, c, getRandomProxy(), getRandomAccount(), creds));
            } else if (c.getTaskType() == Task.SHOPIFY) {
                pool.run(new Shopify("kith", getRandomProxy(), creds, c));
            } else if (c.getTaskType() == Task.SUPREME) {
                pool.run(new Supreme(start, c, getRandomProxy(), creds));
            } else if (c.getTaskType() == Task.PINGTEST) {
                pool.run(new PingTest(c, getRandomProxy()));
            }
        }
    });
    // print("Proxies loaded: " + (proxies.size() + inUse.size()) + "\nTasks loaded: " + taskCount + "\nPress Enter to start tasks.");
    print("Accounts loaded: " + (accounts.size() + usedAccounts));
    print("Proxies loaded: " + (proxies.size() + usedProxies.size()));
    print("Tasks loaded: " + taskCount);
    print("Press Enter to start tasks.");
    try {
        System.in.read();
    } catch (Exception e) {
    }
    pool.flush();
}
Also used : PingTest(main.java.sneakerbot.utils.PingTest) Supreme(main.java.sneakerbot.atc.Supreme) AdidasAccountCreator(main.java.sneakerbot.utils.AdidasAccountCreator) CredentialObject(main.java.sneakerbot.loaders.Credentials.CredentialObject) Shopify(main.java.sneakerbot.atc.Shopify) SitekeyGrabber(main.java.sneakerbot.utils.SitekeyGrabber) Adidas(main.java.sneakerbot.atc.Adidas) Harvester(main.java.sneakerbot.captcha.Harvester)

Aggregations

Adidas (main.java.sneakerbot.atc.Adidas)1 Shopify (main.java.sneakerbot.atc.Shopify)1 Supreme (main.java.sneakerbot.atc.Supreme)1 Harvester (main.java.sneakerbot.captcha.Harvester)1 CredentialObject (main.java.sneakerbot.loaders.Credentials.CredentialObject)1 AdidasAccountCreator (main.java.sneakerbot.utils.AdidasAccountCreator)1 PingTest (main.java.sneakerbot.utils.PingTest)1 SitekeyGrabber (main.java.sneakerbot.utils.SitekeyGrabber)1