Skip to content

Instantly share code, notes, and snippets.

View AntoOnline's full-sized avatar

Anto Online AntoOnline

View GitHub Profile
@wadewegner
wadewegner / gettoken_local.py
Last active February 24, 2023 00:39
Simple Python scripts for making a token request against the Force.com REST APIs. The first does not include the security token and the second does. You will want to use the second one.
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,
@ezimuel
ezimuel / decrypt.php
Created April 26, 2018 13:07
Decrypt a file in PHP form an encrypted file with OpenSSL CLI
<?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()