Advertisement
Jackspade9624

ops.sh

Jun 9th, 2025 (edited)
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.41 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Function to check URL status code
  4. check_url_status() {
  5. local url="$1"
  6. echo "Checking status of: $url"
  7. response=$(curl -s -o /dev/null -w "%{http_code}" "$url") # Use curl to fetch the status code
  8. wget $url
  9. echo "Status code: $response"
  10. }
  11.  
  12. # Function to get WHOIS information for a domain
  13. get_whois_info() {
  14. local domain="$1"
  15. echo "Getting WHOIS info for: $domain"
  16. whois "$domain"
  17. }
  18.  
  19. # Function to dig name servers for a domain
  20. dig_domain_servers() {
  21. local domain="$1"
  22. echo "Getting info for: $domain"
  23. dig "$domain" NS
  24. nslookup "$domain"
  25. host -a -A "$domain"
  26. }
  27.  
  28. # Function to perform recursive dns lookup on a domain
  29. recursive_dns_lookup() {
  30. local domain="$1"
  31. echo "Getting info for: $domain"
  32. dig "$domain" +trace
  33. }
  34.  
  35. # Function to reverse dns lookuo for an IP address
  36. reverse_dns_lookup() {
  37. local domain="$1"
  38. echo "Getting info for: $domain"
  39. dig -x "$domain"
  40. }
  41.  
  42. # Function to sslscan a domain
  43. sslscan_domain() {
  44. local domain="$1"
  45. echo "Getting info for: $domain"
  46. sslscan "$domain"
  47. }
  48.  
  49. # Function to webtech scan an url
  50. webtech_urls() {
  51. local domain="$1"
  52. echo "Getting info for: $domain"
  53. webtech -u "$domain" --rua
  54. }
  55.  
  56. # Function to get robots txt and http headers
  57. robots_txt() {
  58. local domain="$1"
  59. echo "Getting info for: $domain"
  60. curl -i "$domain"/page
  61. curl -ILk "$domain"
  62. curl -Lk "$domain"/robots.txt
  63. }
  64.  
  65. # Function to trace a domains script http headers
  66. script_trace() {
  67. local domain="$1"
  68. echo "Getting info for: $domain"
  69. nmap -sV -A "$domain" --script-trace --script=http-headers --unprivileged -o "$domain".scrpt.trace
  70. }
  71.  
  72. # Function to traceroute a domain or IP address
  73. traceroute_scan() {
  74. local domain="$1"
  75. echo "Getting info for: $domain"
  76. traceroute "$domain"
  77. }
  78.  
  79. # Function to scan ports of a domain
  80. scan_ports() {
  81. local domain="$1"
  82. echo "Scanning common ports for: $domain"
  83. nmap -sT -p 80,443,22,21 "$domain" --unprivileged # Scan common web, SSH, and FTP ports
  84. }
  85.  
  86. # Function to scan ports of a domain
  87. speed_test() {
  88. echo "Scanning Your System"
  89. speedtest-cli
  90. }
  91.  
  92. # Main menu loop
  93. while true; do
  94. #clear # Clear the screen
  95. echo ""
  96. echo -e "\033[97m"
  97. echo ""
  98. echo "================================="
  99. echo " OPS - OSINT "
  100. echo "================================="
  101. echo ""
  102. echo " [1] Check URL Status"
  103. echo " [2] Get WHOIS Information"
  104. echo " [3] Domain Name Servers"
  105. echo " [4] Recursive DNS lookup"
  106. echo " [5] Reverse DNS Lookup"
  107. echo " [6] SSL/TLS Scanner"
  108. echo " [7] Webtech Scan Information"
  109. echo " (8] Robots.txt - HTTP Headers"
  110. echo " [9] NMAP Script Trace"
  111. echo " [10] Traceroute Domain or IP"
  112. echo " [11] Scan Common Ports of Domain"
  113. echo " [12] System Speed Test"
  114. echo " [13] Exit"
  115. echo ""
  116. echo "================================="
  117. echo ""
  118. read -p "Enter your choice: " choice
  119.  
  120. case $choice in
  121. 1)
  122. echo ""
  123. echo " [*] Check Status "
  124. echo ""
  125. read -p "[URL]: " url
  126. check_url_status "$url"
  127. echo ""
  128. read -p "Press Enter to continue..."
  129. ;;
  130. 2)
  131. echo ""
  132. echo " [*] WHOIS Lookup "
  133. echo ""
  134. read -p "[Domain] [IP]: " domain
  135. get_whois_info "$domain"
  136. echo ""
  137. read -p "Press Enter to continue..."
  138. ;;
  139. 3)
  140. echo ""
  141. echo " [*] Check Name Servers "
  142. echo ""
  143. read -p "[Domain]: " domain
  144. dig_domain_servers "$domain"
  145. echo ""
  146. read -p "Press Enter to continue..."
  147. ;;
  148. 4)
  149. echo ""
  150. echo " [*] Recursive DNS Lookup "
  151. echo ""
  152. read -p "[Domain]: " domain
  153. recursive_dns_lookup "$domain"
  154. echo ""
  155. read -p "Press Enter to continue..."
  156. ;;
  157. 5)
  158. echo ""
  159. echo " [*] Reverse DNS Lookup "
  160. echo ""
  161. read -p "[IP]: " domain
  162. reverse_dns_lookup "$domain"
  163. echo ""
  164. read -p "Press Enter to continue..."
  165. ;;
  166. 6)
  167. echo ""
  168. echo " [*] Scan For Vulnerabilities"
  169. echo ""
  170. read -p "[Domain]: " domain
  171. sslscan_domain "$domain"
  172. echo ""
  173. read -p "Press Enter to continue..."
  174. ;;
  175. 7)
  176. echo ""
  177. echo " [*] Webtech Scan - Random User Agent Set "
  178. echo ""
  179. read -p "[URL]: " domain
  180. webtech_urls "$domain"
  181. echo ""
  182. read -p "Press Enter to continue..."
  183. ;;
  184. 8)
  185. echo ""
  186. echo " [*] Robots.txt - HTTP Headers "
  187. echo ""
  188. read -p "[Domain] [URL]: " domain
  189. robots_txt "$domain"
  190. echo ""
  191. read -p "Press Enter to continue..."
  192. ;;
  193. 9)
  194. echo ""
  195. echo " [*] NMAP Script Trace "
  196. echo ""
  197. read -p "[Domain]: " domain
  198. script_trace "$domain"
  199. echo ""
  200. echo " File Saved > "$domain".script.trace"
  201. echo ""
  202. read -p "Press Enter to continue..."
  203. ;;
  204. 10)
  205. echo ""
  206. echo " [*] Traceroute Domain or IP "
  207. echo ""
  208. read -p "[Domain] [IP]: " domain
  209. traceroute_scan "$domain"
  210. echo ""
  211. read -p "Press Enter to continue..."
  212. ;;
  213. 11)
  214. read -p "[Domain]: " domain
  215. scan_ports "$domain"
  216. echo ""
  217. read -p "Press Enter to continue..."
  218. ;;
  219. 12)
  220. speed_test
  221. echo ""
  222. read -p "Press Enter to continue..."
  223. ;;
  224. 13)
  225. echo ""
  226. echo "Exiting..."
  227. exit 0
  228. ;;
  229. *)
  230. echo "Invalid choice. Please try again."
  231. echo ""
  232. read -p "Press Enter to continue..."
  233. ;;
  234. esac
  235. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement