Skip to content

F2Codes/GemScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Super Cool Network Scanner 🌟

Ruby Platform License

A powerful and awesome Ruby script for network scanning, pinging, port scanning with nmap, and fetching WHOIS domain info! πŸ“‘πŸ” It displays results with cool emojis and saves them in JSON and XML files. πŸ’Ύ


🎯 Features

  • πŸ”— IP Resolution: Resolves the IP address of a domain or host.
  • πŸ“‘ Ping: Shows ping stats (packets transmitted/received, packet loss, and RTT).
  • πŸ” Nmap Port Scan: Detects open ports (e.g., HTTP, HTTPS) using nmap.
  • 🏰 WHOIS Info: Checks domain availability, country, registrar, creation/expiration dates.
  • πŸ’Ύ Save Results: Stores results in JSON and XML files.
  • 🎨 Beautiful Output: Displays results with emojis and a clean, readable format.

πŸ›  Prerequisites

To run this script, you need to install some tools and libraries. Don’t worry, we’ll walk you through it step by step! 😎

πŸ–₯ Operating System

  • Linux or Termux (tested on Termux for Android).
  • Windows: May work with proper tool installation, but not tested.

🐍 Ruby Version

  • Ruby 3.4.0 or higher
    ruby --version

πŸ“¦ System Packages nmap: For port scanning. libxml2 and libxslt: Required for the nokogiri gem. iputils: For the ping command (optional if using net-ping gem). πŸ’Ž Ruby Gems whois: For WHOIS queries. json: For JSON output. nokogiri: For XML output. πŸ“₯ Installation Follow these steps to set up the environment and run the script.

  1. Install System Packages In Termux (or Linux), install the required packages: pkg update && pkg upgrade pkg install nmap libxml2 libxslt iputils Verify nmap is installed: nmap --version
  2. Install Ruby Gems Install the necessary Ruby gems: gem install whois json nokogiri If you encounter issues with nokogiri, try a specific version: gem install nokogiri -v '1.16.7' Verify gems are installed: gem list You should see whois, json, and nokogiri in the list.
  3. Optional: Install net-ping for Robust Ping If the default ping command fails (common in Termux), install the net-ping gem: gem install net-ping
  4. Grant Storage Permissions (Termux) To allow saving JSON and XML files: termux-setup-storage
  5. Set File Permissions Make the script executable: chmod +x scanner.rb πŸš€ Usage Run the script by passing a target domain or IP address as an argument: ruby scanner.rb google.com Or, if you made it executable: ./scanner.rb google.com Example Output 🌟🌟🌟 Super Cool Network Scan for google.com 🌟🌟🌟 πŸ”— Resolved IP: 142.250.185.174 πŸ“‘ Ping Stats: πŸ“€ Transmitted: 4 packets πŸ“₯ Received: 4 packets πŸ“‰ Packet Loss: 0.0% ⏱️ RTT (min/avg/max/mdev): 10.123/12.456/14.789/1.234 ms πŸ” Nmap Port Scan (Common Ports): πŸšͺ 80/tcp (http) πŸšͺ 443/tcp (https) πŸ“œ Full Nmap Output: Starting Nmap 7.98... PORT STATE SERVICE 80/tcp open http 443/tcp open https ... 🏰 Domain WHOIS & Availability: ❌ Already registered. πŸ˜” 🌍 Country: United States πŸ“‹ Registrar: MarkMonitor Inc. πŸ“… Created: 1997-09-15 ⏰ Expires: 2028-09-14 πŸ“ Notes: πŸ”’ Secure domain, check renewal status. ⚠️ πŸŽ‰ Scan Complete! Results saved to XML and JSON files. πŸ’Ύ Results are saved as google.com_results.json and google.com_results.xml in the current directory. ⚠️ Troubleshooting If you run into issues, try these steps:
  6. Ping Failure If you see ❌ Ping failed: Check if ping works manually: ping -c 4 google.com Install iputils if missing: pkg install iputils Alternatively, use the net-ping gem (see Installation section). If root access is available (e.g., with tsu in Termux), try: tsu ruby scanner.rb google.com
  7. Nmap Issues If nmap shows unexpected results (e.g., too many open ports): Run nmap manually to verify: nmap -p 80,443,22,21,25,53,110,143,445,3389 google.com Ensure you’re not behind a proxy or firewall that interferes with results. Try running with root (if available): tsu nmap -p 80,443 google.com
  8. WHOIS Errors If WHOIS fails (e.g., "server not found"): Check your network connection. Test with another domain (e.g., example.com). Ensure the whois gem is installed: gem list | grep whois
  9. Gem Installation Issues If gems fail to install: Update RubyGems: gem update --system For nokogiri, ensure system dependencies are installed: pkg install libxml2 libxslt πŸ’‘ Tips Run as Root: Some nmap scans or ping commands may require root access in Termux. Install tsu for root: pkg install tsu Test with Different Targets: Try domains like example.com or IPs to ensure the script works as expected. Check Output Files: JSON and XML files are saved in the current directory. Use cat or a text editor to view them: cat google.com_results.json πŸ“œ License This project is licensed under the MIT License. Feel free to use, modify, and share! πŸš€ πŸ™Œ Contributing Got ideas to make this script even cooler? Submit a pull request or open an issue! Let’s make it more awesome together. 😎 πŸ“¬ Contact Questions? Bugs? Suggestions? Reach out on GitHub Issues or ping me on X! 🐦 Happy scanning! πŸŽ‰

About

A net tool Developed with RubyπŸ’Ž.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages