Last active
April 9, 2025 02:58
-
-
Save uriel1998/f877760ebefb86f2a9e9b7708c82141c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
export SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" | |
ID2="${SCRIPT_DIR}/output.txt" | |
IDs="${SCRIPT_DIR}/workfile.txt" | |
if [ $# == 0 ]; then | |
echo -n "number of IDs to generate> " | |
read num | |
else | |
num=$1 | |
fi | |
if [ -f IDs ]; then | |
rm IDs | |
fi | |
echo "making fake ids" | |
# https://www.networkworld.com/article/969592/random-identity-generation-in-linux.html | |
if [ -d "${SCRIPT_DIR}/location_data" ];then | |
rig -d "${SCRIPT_DIR}/location_data" -c $num > $IDs | |
else | |
rig -c $num > $IDs | |
fi | |
echo "fixing up phone #s" | |
cat $IDs | while IFS= read -r line || [[ -n $line ]]; | |
do | |
echo "$line" | |
if [[ $line == *"xxx-xxxx" ]]; then | |
echo "found $line" | |
areacode=`echo $line | cut -c1-5` | |
#areacode=765 | |
echo -n "$areacode " >> $ID2 | |
echo $((100 + RANDOM % 899))-$((1000 + RANDOM % 8999)) >> $ID2 | |
# get email | |
# https://rapidapi.com/johndevz/api/gmailnator | |
# Free plan = 50 a day | |
# Or manually through https://www.emailnator.com/ | |
echo "adding email address" | |
wget --quiet \ | |
--method POST \ | |
--header 'x-rapidapi-key: YOUR API KEY HERE' \ | |
--header 'x-rapidapi-host: gmailnator.p.rapidapi.com' \ | |
--header 'Content-Type: application/json' \ | |
--body-data '{"options":[1,2,3]}' \ | |
--output-document \ | |
- https://gmailnator.p.rapidapi.com/generate-email | awk -F '"' '{print $4}' >> $ID2 | |
else | |
echo "$line" >> $ID2 | |
fi | |
done | |
rm "${IDs}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment