· 6 years ago · Jan 13, 2020, 08:52 PM
1import sys
2import requests
3
4
5# This is programmed for ease of use with a Linux terminal.
6# Written by @Th3Tr1ckst3r.
7# paste_up.py example.txt 'Test Post'
8
9
10def Main(file_location, name):
11 try:
12 data = open(file_location, 'r').readlines()
13 pile = ''.join(data)
14 structure = {'api_option':"paste",
15 'api_paste_private':"0",
16 'api_paste_name':name,
17 'api_paste_code':pile,
18 'api_dev_key':"INSERT YOUR PASTEBIN API KEY HERE"}
19 response = requests.post("https://pastebin.com/api/api_post.php", data=structure)
20 print(response.text)
21 except KeyboardInterrupt:
22 sys.exit(1)
23
24
25if __name__ == '__main__':
26 Main(sys.argv[1], sys.argv[2])
27 sys.exit(1)