-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.sh
92 lines (83 loc) · 3.42 KB
/
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
# Script Name: main.sh
# Description: Main script for Wayback Machine crawling with various features.
# Author: lmcodeofpwnosec
# Date: 18/10/2024
# Color Variables
CYAN='\033[0;36m'
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Display ASCII logo
function display_logo() {
echo -e "${CYAN}"
echo "██╗ ██╗ █████╗ ██╗ ██╗██████╗ █████╗ ███████╗██╗ ██╗"
echo "██║ ██║██╔══██╗╚██╗ ██╔╝██╔══██╗██╔══██╗██╔════╝██║ ██║"
echo "██║ █╗ ██║███████║ ╚████╔╝ ██████╔╝███████║███████╗███████║"
echo "██║███╗██║██╔══██║ ╚██╔╝ ██╔══██╗██╔══██║╚════██║██╔══██║"
echo "╚███╔███╔╝██║ ██║ ██║ ██████╔╝██║ ██║███████║██║ ██║"
echo " ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝"
echo -e "${NC}"
}
# Display copyright, author, and current date/time
function display_info() {
echo "==============================================================="
echo "Copyright (C) 2024 by lmcodeofpwnosec"
echo "Date: $(date +"%Y-%m-%d %H:%M:%S")"
echo "==============================================================="
}
# Display help and usage information
function display_help() {
echo "Usage: ./wayback.sh [option]"
echo
echo "Options:"
echo " 1) Filter by Date Range"
echo " 2) Include HTTP Status Codes"
echo " 3) Filter by MIME Type"
echo " 4) Track URL Changes Over Time"
echo " 5) Download Archived Pages"
echo " 6) Enable Verbose Mode"
echo " -help Show this help menu"
echo " -exit Exit the script"
echo
echo "Description:"
echo " This script retrieves URLs archived in the Wayback Machine and offers features"
echo " such as filtering by date range, tracking changes, including HTTP status codes,"
echo " filtering by MIME type, and more."
}
# Main menu
function main_menu() {
echo -e "${CYAN}Select a feature:${NC}"
echo "1) Filter by Date Range"
echo "2) Include HTTP Status Codes"
echo "3) Filter by MIME Type"
echo "4) Track URL Changes Over Time"
echo "5) Download Archived Pages"
echo "6) Enable Verbose Mode"
echo "7) Exit"
read -p "Enter your choice: " choice
case $choice in
1) source ./features/filter_by_date.sh ;;
2) source ./features/include_status.sh ;;
3) source ./features/filter_by_mimetype.sh ;;
4) source ./features/track_changes.sh ;;
5) source ./features/download_archived.sh ;;
6) source ./features/verbose_mode.sh ;;
7) echo -e "${GREEN}Exiting...${NC}"; exit 0 ;;
*) echo -e "${RED}Invalid choice. Please try again.${NC}"; main_menu ;;
esac
}
# Check for help option
if [[ "$1" == "-help" ]]; then
display_help
exit 0
fi
# Check for exit option
if [[ "$1" == "-exit" ]]; then
echo "Exiting..."
exit 0
fi
# Run the ASCII art, info, and main menu
display_logo
display_info
main_menu