Untitled
unknown
plain_text
a year ago
1.1 kB
6
Indexable
#!/bin/bash # Define the text file containing the list of words list_file="list.txt" # Check if the list file exists if [ ! -f "$list_file" ]; then echo "Error: List file '$list_file' not found!" exit 1 fi # Specify the output file to save filtered results output_file="filtered_results.txt" # Read the list file and store the words in an array readarray -t words < "$list_file" # Check if the array is empty if [ ${#words[@]} -eq 0 ]; then echo "Error: No words found in the list file!" exit 1 fi # Loop over each word in the array for word in "${words[@]}"; do # Construct the command command="python3 50181.py -u $word -f web.config -p 'C:\Users\public'" echo "Executing command: $command" # Execute the command and capture the response response=$(eval "$command") # Check if the response contains "fileinfo" if [[ $response == *fileinfo* ]]; then # If "fileinfo" is found, save the word followed by "=> found" to the output file echo "$word => found" >> "$output_file" fi done echo "Filtered results saved in $output_file"
Editor is loading...
Leave a Comment