def remove_shellcommand_pastebin_cmd(words, words_eol, *args):
    apiname = words[1]
    api = pastebins.get_api_by_name(apiname)
    if isinstance(api, pastebins.ShellCommandPastebin):
        api.remove_api()
    else:
        raise FloodControlError("{} is not a ShellCommandPastebin, cannot remove.".format(apiname))
    print_fc("Shell command Pastebin API added. Name: {}".format(apiname))
Esempio n. 2
0
def remove_shellcommand_pastebin_cmd(words, words_eol, *args):
    apiname = words[1]
    api = pastebins.get_api_by_name(apiname)
    if isinstance(api, pastebins.ShellCommandPastebin):
        api.remove_api()
    else:
        raise FloodControlError(
            "{} is not a ShellCommandPastebin, cannot remove.".format(apiname))
    print_fc("Shell command Pastebin API added. Name: {}".format(apiname))
Esempio n. 3
0
def _pastebin(contents, **kwargs):
    pastebin = pastebins.get_api_by_name(kwargs['service'])
    print_fc("Sending paste to {}...".format(kwargs['service']))
    start_time = time.time()
    result = pastebin.write(contents, **kwargs)
    if result[1] is not None:
        print_fc("Response from {}:".format(kwargs['service']))
        print_fc(result[1])
        print_fc("Time taken: {}".format(time.time() - start_time))
    return result[0]
def _pastebin(contents, **kwargs):
    pastebin = pastebins.get_api_by_name(kwargs['service'])
    print_fc("Sending paste to {}...".format(kwargs['service']))
    start_time = time.time()
    result = pastebin.write(contents, **kwargs)
    if result[1] is not None:
        print_fc("Response from {}:".format(kwargs['service']))
        print_fc(result[1])
        print_fc("Time taken: {}".format(time.time() - start_time))
    return result[0]