File: ajentiorg.py

package info (click to toggle)
python-catcher 0.1.7%2Bgit20140530-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 116 kB
  • ctags: 37
  • sloc: python: 257; makefile: 47
file content (11 lines) | stat: -rw-r--r-- 279 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
from base64 import b64encode
import requests
import zlib


class AjentiOrgUploader:
    def upload(self, data):
        return requests.post(
            'http://ajenti.org/catcher/submit',
            data={'text': b64encode(zlib.compress(data.encode('utf-8')))}
        ).text