예제 #1
0
파일: claimer.py 프로젝트: steemtm/ufm
def claim_tokens():
    username = ["ufm.reserve", "taskmanager", "tmholdings", "upfundme", "tmps"]
    for username in username:
        url = "http://scot-api.steem-engine.com/@" + username
        r = requests.get(url)
        result = r.json()

        json_data = []
        for token in result:
            scot = result[token]
            if int(scot["pending_token"]) > 0:
                json_data.append({"symbol": token})
                print(username + " can claim %s" % (token))

        if len(json_data) > 0:
            nodes = NodeList()
            nodes.update_nodes()
            stm = Steem(nodes.get_nodes())
            try:
                stm.unlock(pwd=beem_pass)
            except:
                stm = Steem(node=nodes.get_nodes(), keys=[pwd])
            stm.custom_json("scot_claim_token",
                            json_data,
                            required_posting_auths=[username])
        else:
            print(username + " Has nothing to claim")
예제 #2
0
async def quest(ctx):
    id = int(ctx.message.author.id)
    if id == 397972596207124480:
        stm = Steem(node="https://api.steemit.com", keys=[SR_P])
        stm.custom_json('sm_start_quest',
                        '{"type":"daily","app":"steemmonsters/0.5.0.2"}',
                        required_posting_auths=['sourovafrin'])
        await client.say(
            'Ok, I have retrieved the quest for today. And also started the automatic quest retrieve process'
        )
        while True:
            await asyncio.sleep(86460)
            await client.say(
                "<@397972596207124480> 1 day 1 minute passed, so why i retrieved steemmonsters quest automatically"
            )
            stm.custom_json('sm_start_quest',
                            '{"type":"daily","app":"steemmonsters/0.5.0.2"}',
                            required_posting_auths=['sourovafrin'])
    else:
        await client.say(
            "You can't use this feature. If you want to use, contact with my master `sourovafrin#5422`"
        )
예제 #3
0
async def drug(usernam):
    await client.say('Ok,Starting the process for {}'.format(usernam))
    if usernam == 'sourovafrin':
        while True:
            await asyncio.sleep(1)
            SR = os.environ.get('SR')
            stm = Steem(node="https://api.steemit.com", keys=[SR])
            heist = 'dw-heist'
            heist_json = {"username": "******", "amount": 30000}
            unit = 'dw-unit'
            cook_unit = {
                "username": "******",
                "unit": "bouncer",
                "unit_amount": "35"
            }
            await asyncio.sleep(1)
            stm.custom_json(heist,
                            heist_json,
                            required_posting_auths=[usernam])
            await asyncio.sleep(3)
            stm.custom_json(unit, cook_unit, required_posting_auths=[usernam])
            await client.say(
                "<@397972596207124480> heiseted and cooked some army for {}".
                format(usernam))
            await asyncio.sleep(18000)
    elif usernam == 'svirus':
        while True:
            SV = os.environ.get('SV')
            await asyncio.sleep(1)
            stmm = Steem(node="https://api.steemit.com", keys=[SV])
            heist = 'dw-heist'
            heist_json = {"username": "******", "amount": 27000}
            unit = 'dw-unit'
            cook_unit = {
                "username": "******",
                "unit": "bouncer",
                "unit_amount": "25"
            }
            await asyncio.sleep(1)
            stmm.custom_json(heist,
                             heist_json,
                             required_posting_auths=[usernam])
            await asyncio.sleep(3)
            stmm.custom_json(unit, cook_unit, required_posting_auths=[usernam])
            await client.say(
                "<@397972596207124480> heiseted and cooked some army for {}".
                format(usernam))
            await asyncio.sleep(18000)
    elif usernam == 'eftikhan':
        while True:
            EF = os.environ.get('EF')
            await asyncio.sleep(1)
            stmm = Steem(node="https://api.steemit.com", keys=[EF])
            heist = 'dw-heist'
            heist_json = {"username": "******", "amount": 27000}
            unit = 'dw-unit'
            cook_unit = {
                "username": "******",
                "unit": "bouncer",
                "unit_amount": "22"
            }
            await asyncio.sleep(1)
            stmm.custom_json(heist,
                             heist_json,
                             required_posting_auths=[usernam])
            await asyncio.sleep(3)
            stmm.custom_json(unit, cook_unit, required_posting_auths=[usernam])
            await client.say(
                "<@397972596207124480> heiseted and cooked some army for {}".
                format(usernam))
            await asyncio.sleep(18000)
    else:
        pass
예제 #4
0
from beem import Steem
from beem.account import Account

# needed to form dictionary from userData
userFormat = ['user', 'wifLocation']

# get steem user data
with open('config/userData', 'r') as userData:
    steemInfo = dict(zip(userFormat, userData.read().splitlines()))

# grab wif
with open(steemInfo['wifLocation'], 'r') as wifRaw:
    wif = wifRaw.read().replace('\n', '')

# set up steem key and account
steem = Steem(
    nobroadcast=False,  # set to true for testing
    keys=[wif])

# set acc to the steem account in config/steemAcc
acc = Account(steemInfo['user'], steem_instance=steem)

# get pinned hashes
with open('hashList', 'r') as hashList:
    hashes = hashList.read().split('\n')

# send custom json with hashes
steem.custom_json('nebulus_req',
                  '{"hashes": ' + ', '.join(hashes) + '"}',
                  required_posting_auths=[acc['name']])
예제 #5
0
def qst():
    stm = Steem(node="https://api.steemit.com", keys=[SR])
    stm.custom_json('sm_start_quest', '{"type":"daily","app":"steemmonsters/0.5.0.2"}',required_posting_auths=['sourovafrin'])
예제 #6
0
파일: init.py 프로젝트: teknomunk/nebulus
#!/usr/bin/env python3

from beem import Steem
from beem.account import Account

# needed to form user data dictionary
userFormat = ['user', 'wifLocation']

# grab steem user data
with open('config/userData', 'r') as userData:
    steemInfo = dict(zip(userFormat,userData.read().splitlines()))

# get private posting key from location
with open(steemInfo['wifLocation'], 'r') as wifRaw:
    wif = wifRaw.read().replace('\n', '')

# set up steem keys and account name
steem = Steem(keys=[wif])
account = Account(steemInfo['user'], steem_instance=steem)

# Send custom json init message
steem.custom_json('nebulus_node', '{"node": "initialized"}',
        required_posting_auths=[account["name"]])