View jwt_get_token2.js
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
const axios = require('axios'); | |
// get your secrets from Environment Variables | |
const email = process.env.SERVICE_CLIENT_ID | |
const password = process.env.SERVICE_CLIENT_SECRET | |
const url = process.env.SERVICE_LOGIN_URL | |
const scope = process.env.SERVICE_CLIENT_SCOPE | |
var token = ""; | |
var config = { | |
method: 'post', | |
url: url, |
View jwt_get_token.js
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
// this snippet is saved under https://app.checklyhq.com/snippets | |
var axios = require('axios'); | |
// SERVICE_EMAIL/SERVICE_PASSWORD/SERVICE_LOGIN_URL are saved in the Environment Variables | |
// https://app.checklyhq.com/environment-variables | |
const email = process.env.SERVICE_EMAIL | |
const password = process.env.SERVICE_PASSWORD | |
const url = process.env.SERVICE_LOGIN_URL | |
var data = '{ "email": "' + email + '", "password": "' + password + '" }'; |
View clean_trojan_php.sh
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
#!/bin/bash | |
# updated in 2020 because my bash skills were not that sophisticated in 2012 | |
LIST=/tmp/LIST.TROJANS.$(date '+%Y%m%d').txt | |
PATT="eval(base64_decode" | |
REGEX="eval\(base64_decode" | |
if [[ ! -s "$LIST" ]] ; then | |
# find all infected php files and put them in $LIST file | |
grep -l -R --include=*.php "$PATT" * > "$LIST" | |
fi |