#!/bin/bash Email="[email protected]" Key="xxxxxxxxx" read -p "Search_String:" Search_String read -p "Save file:" search_file encode_string=`echo ${Search_String} | base64 -w 0` echo "${Search_String}" echo "${encode_string}" curl "https://fofa.so/api/v1/search/all?email=$Email&key=$Key&size=10000&fields=ip,port&full=true&qbase64=${encode_string}" > temp cat temp |sed -e "s/\",\"/\:/g" -e "s/\"\],\[\"/\n/g" -e "s/\[\[\"/\n/g" -e "s/\"\]\]/\n/g"|sed -e "1d" -e "\$d"> ${search_file}.txt