Last active
December 27, 2023 21:19
-
-
Save m8sec/ecf9c7b5f1a38db8de37f3425e4b4782 to your computer and use it in GitHub Desktop.
Revisions
-
m8sec revised this gist
Jul 12, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/usr/bin/env python2.7 # Author: m8r0wn # Description: Python class to interact with Pastebin API import urllib2 import urllib -
m8sec revised this gist
Jun 8, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/usr/bin/env python2.7 # Author: m8r0wn # Description: Python script to interact with Pastebin API import urllib2 import urllib -
m8sec revised this gist
Jun 8, 2018 . 1 changed file with 2 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,7 @@ #!/usr/bin/env python2.7 #Author: m8r0wn #Description: Python script to interact with Pastebin API import urllib2 import urllib -
m8sec renamed this gist
Mar 12, 2018 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,6 @@ #!/usr/bin/env python2.7 # Author: m8r0wn # Description: # Code to interact with the pastebin API -
m8sec revised this gist
Feb 2, 2018 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,6 @@ # Author: m8r0wn # Script: paste_it.py # Description: # Code to interact with the pastebin API -
Mike revised this gist
Jan 5, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -122,8 +122,8 @@ def scraper_paste_metadata(self, paste_key): req = urllib2.urlopen('https://pastebin.com/api_scrape_item_meta.php?i=' + paste_key, timeout=7) return req.read() #Example Usage: #List trending pastes try: paste = paste_it() print paste.list_trending() -
Mike revised this gist
Dec 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #!/usr/bin/env python2.7 # Author: m8r0wn # Script: paste_it.py -
m8r0wn revised this gist
Sep 28, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # Author: m8r0wn # Script: paste_it.py # Category: Info Gathering # Description: # Code to interact with the pastebin API -
m8r0wn revised this gist
Sep 26, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def user_key(self): return req.read().decode() def list_trending(self): #list Trending Pastes, max of 18 results allowed: api_option = 'trends' data = {'api_dev_key':self.api_dev_key, 'api_option':api_option} -
m8r0wn revised this gist
Sep 26, 2017 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,11 +34,10 @@ def user_key(self): return req.read().decode() def list_trending(self): #list Trending Pastes, max of 18results allowed: api_option = 'trends' data = {'api_dev_key':self.api_dev_key, 'api_option':api_option} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read() -
m8r0wn revised this gist
Sep 26, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def list_trending(self): 'api_option':api_option, 'api_results_limit':self.api_results_limit} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read() def apiuser_pastes(self): #list API user's Pastes: -
m8r0wn revised this gist
Sep 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # Author: m8r0wn # Script: paste_it.py # Category: API # Description: # Code to interact with the pastebin API -
m8r0wn revised this gist
Sep 12, 2017 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -125,5 +125,8 @@ def scraper_paste_metadata(self, paste_key): #Exampl Usage: #List trending pastes try: paste = paste_it() print paste.list_trending() except Exception as e: print "[!] API Error:",e -
m8r0wn revised this gist
Sep 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -108,7 +108,7 @@ def create_paste(self,data): req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read().decode() #The following requires your source IP address to be white-listed def scraper(self): #Fetch most recent pastes #Add ?limit=# to limit responses, max=250, default=50 -
m8r0wn created this gist
Sep 12, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,129 @@ #!/user/bin/python2.7 # Author: m8r0wn # Script: paste_it.py # Category: Recon # Description: # Code to interact with the pastebin API # Disclaimer: # Use at your own risk. import urllib2 import urllib class paste_it(): #Class Variables #Pastebin API Key api_dev_key = '' #Pastebin Username username = '' #Pastebin Password password = '' #Max results api_results_limit = 25 #default=50, min=1, max=1000 def user_key(self): #create user key user_key_data = {'api_dev_key':self.api_dev_key, 'api_user_name':self.username, 'api_user_password':self.password} req = urllib2.urlopen('https://pastebin.com/api/api_login.php', urllib.urlencode(user_key_data).encode('utf-8'), timeout=7) return req.read().decode() def list_trending(self): #list Trending Pastes: api_option = 'trends' data = {'api_dev_key':self.api_dev_key, 'api_option':api_option, 'api_results_limit':self.api_results_limit} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read().decode() def apiuser_pastes(self): #list API user's Pastes: api_option = 'list' data = data = {'api_dev_key':self.api_dev_key, 'api_user_key':self.user_key(), 'api_option':api_option, 'api_results_limit':self.api_results_limit} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'), timeout=7) return req.read().decode() def apiuser_details(self): #list API user's details: api_option = 'userdetails' data = {'api_dev_key': self.api_dev_key, 'api_user_key': self.user_key(), 'api_option': api_option, 'api_results_limit': self.api_results_limit} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'), timeout=7) return req.read().decode() def show_apiuser_paste(self, paste_key): #Print Raw paste created by api_user api_option = 'show_paste' api_paste_key = paste_key data = {'api_dev_key':self.api_dev_key, 'api_user_key':self.user_key(), 'api_option':api_option, 'api_paste_key':api_paste_key} req = urllib2.urlopen('https://pastebin.com/api/api_raw.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read().decode() def show_paste(self, paste_key): #Print Raw paste req = urllib2.urlopen('https://pastebin.com/raw/'+paste_key, timeout=7) return req.read() def delete_paste(self, paste_key): #Delete one of API user's pastes api_option = 'delete' api_paste_key = paste_key data = {'api_dev_key': self.api_dev_key, 'api_user_key': self.user_key(), 'api_option': api_option, 'api_paste_key': api_paste_key} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read().decode() def create_paste(self,data): #Create paste on api user's account api_option = 'paste' api_paste_code = data #paste text body api_paste_private = 0 #0=public, 1=unlisted, 2=private api_paste_name = 'title' #title of paste api_paste_expire_data = 'N' #available: N=never, 10M=10min, 1H=1hour, 1D=1Day, 1W=1week, 2W=2weeks, 1M=1Month, 6M=6months, 1Y=1year api_paste_format = 'text' #text=None, mysql-MYSQL, perl=Perl, python=Python, sql=SQL, vbscript=VBscript, xml=XML, html4strict=HTML, html5=HTML5, data = {'api_dev_key':self.api_dev_key, 'api_user_key':self.user_key(), 'api_option':api_option, 'api_paste_code':api_paste_code, 'api_paste_private':api_paste_private, 'api_paste_name':api_paste_name, 'api_paste_expire_data':api_paste_expire_data, 'api_paste_format':api_paste_format} req = urllib2.urlopen('https://pastebin.com/api/api_post.php', urllib.urlencode(data).encode('utf-8'),timeout=7) return req.read().decode() #The following require your source IP address to be white-listed def scraper(self): #Fetch most recent pastes #Add ?limit=# to limit responses, max=250, default=50 req = urllib2.urlopen('https://pastebin.com/api_scraping.php',timeout=7) return req.read() def scraper_paste(self, paste_key): req = urllib2.urlopen('https://pastebin.com/api_scrape_item.php?i=' + paste_key, timeout=7) return req.read() def scraper_paste_metadata(self, paste_key): req = urllib2.urlopen('https://pastebin.com/api_scrape_item_meta.php?i=' + paste_key, timeout=7) return req.read() #Exampl Usage: #List trending pastes paste = paste_it() print paste.list_trending()