Skip to content

Instantly share code, notes, and snippets.

View mrzslr's full-sized avatar
🤘
Slapping on the keyboard.

MohammadReza Salari mrzslr

🤘
Slapping on the keyboard.
View GitHub Profile
@mrzslr
mrzslr / seek-and-destroy-wv-ios.sh
Created September 26, 2024 07:44
Simulate WebView process getting killed by iOS
#/bin/bash
# Find process with name containing 'launchd_sim'
SIMULATOR_PID=$(pgrep launchd_sim)
echo "Simulator PID: $SIMULATOR_PID"
# Find sub-processes for the app's WebViews
WEBKIT_CONTENT_PID=$(pgrep -P $SIMULATOR_PID 'com.apple.WebKit.WebContent')
echo "WebKit WebContent PID(s):"
echo $WEBKIT_CONTENT_PID
@mrzslr
mrzslr / seek-and-destroy-wv-aos.sh
Created September 26, 2024 07:43
Simulate WebView process getting killed by Android
#!/bin/bash
# Array of potential package names associated with the WebView
PACKAGE_NAMES=("com.android.webview" "com.google.android.webview")
# Loop through each package name
for PACKAGE_NAME in "${PACKAGE_NAMES[@]}"
do
echo "Checking for package: $PACKAGE_NAME"