This file contains 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 characters
<?php | |
/** | |
* Decrypt a file generated with the command line: | |
* openssl enc -aes-256-cbc -in file-to-encrypt -out encrypted-file -k password | |
* | |
* To decrypt: | |
* php decrypt.php encrypted-file password decrypted-file | |
* | |
* NOTE: this script has been tested with OpenSSL v.1.1, for old version | |
* please check if you need to use MD5 instead of SHA256 in EVP_BytesToKey() |
This file contains 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 characters
import requests | |
consumer_key = "YOUR_CONSUMER_KEY" | |
consumer_secret = "YOUR_CUSTOMER_SECRET" | |
username = "YOUR_USER_NAME" | |
password = "YOUR_PASSWORD" | |
payload = { | |
'grant_type': 'password', | |
'client_id': consumer_key, |