matamorphosis / Scrummage

A Holistic OSINT and Threat Hunting Platform
GNU General Public License v3.0
510 stars 82 forks source link

Add to wiki: How to get the tumblr oauth tokens #50

Closed ItsIgnacioPortal closed 2 years ago

ItsIgnacioPortal commented 2 years ago

The tumblr oauth docs are insanely complicated. I've found a far easier way of getting an Oauth Token and the Oauth Token Secret

Install requests-oauthlib

python -m pip install requests_oauthlib

Run the following in a python console:

# Credentials from the application page
key = '<the app key>'
secret = '<the app secret>'

# OAuth URLs given on the application page
request_token_url = 'http://www.tumblr.com/oauth/request_token'
authorization_base_url = 'http://www.tumblr.com/oauth/authorize'
access_token_url = 'http://www.tumblr.com/oauth/access_token'

# Fetch a request token
from requests_oauthlib import OAuth1Session
tumblr = OAuth1Session(key, client_secret=secret, callback_uri='http://www.tumblr.com/dashboard')
tumblr.fetch_request_token(request_token_url)

A response like the following should appear:

{'oauth_token': 'REDACTED', 'oauth_token_secret': 'REDACTED', 'oauth_callback_confirmed': 'true'}
matamorphosis commented 2 years ago

@PinkDev1 yep this is something I can put into the next release of Scrummage (3.8) if it makes life easier. I'd actually encourage you as someone who seems to know Python to have a crack at implementing it yourself, as we recognise there are sometimes better ways of integrating Scrummage with third-parties than what we provide in the freely available, open-source tools. In fact this entire project is built due to the founders being dissatisfied with the way OSINT is being handled by other platforms. If you do this your name will pop up as a contributor in the project.

The plugin you would need to update is: https://github.com/matamorphosis/Scrummage/blob/main/app/plugins/Tumblr_Search.py

Additionally, if you go down that road, please add the library to https://github.com/matamorphosis/Scrummage/blob/main/installation/support_files/python_requirements.txt

It may seem a little hard at first due to Scrummage being heavily frameworked, but I can assure you it's not too difficult, especially if you follow our plugin development guide https://github.com/matamorphosis/Scrummage/wiki/Plugin-Development-Guide

Lastly, due to this not actually being a bug, I am transferring this to a discussion.