Skip to content

Chrome extension to improve safety while browsing

License

Notifications You must be signed in to change notification settings

JustSouichi/hackerai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ HackerAI - Link Confirmation

HackerAI Banner

πŸ“Š Project Status

Status Badge
License License
Release Release
Stars Stars
Contributors Contributors
Issues Issues
Pull Requests Pull Requests
Build Status Build Status
Code Size Code Size
Languages Languages
Forks Forks

HackerAI is an open-source Chrome extension designed to improve online security by alerting users before they open potentially harmful links. It provides a lightweight solution to mitigate phishing attacks and suspicious links by prompting users for confirmation before they proceed.


βœ… Key Features

Feature Description
πŸ›‘ Link Confirmation Dialog Displays a confirmation dialog before opening any link, ensuring users are aware of their actions.
πŸ”— Support for Custom Links Handles both standard HTML links (<a> tags) and custom attributes like data-link.
🀝 Beginner-Friendly Designed for non-technical users to add an extra layer of security.
⚑ Lightweight and Efficient Minimal performance impact while providing essential protection.
🌍 Open-Source Fully transparent codebase, open to contributions and community collaboration.

πŸ› οΈ Installation

Follow these steps to install the extension locally:

  1. πŸ–₯️ Clone the repository:
    git clone https://github.com/JustSouichi/hackerai.git
  2. 🌐 Go to the Chrome Extensions page: Open chrome://extensions/ in your browser.
  3. πŸ› οΈ Enable Developer Mode: Toggle the Developer mode in the top-right corner.
  4. πŸ“‚ Load the extension: Click Load unpacked and select the folder containing the project files.
  5. βœ… Done: The extension is now active and ready to use!

βš™οΈ How It Works

HackerAI injects a content.js script into all web pages. This script intercepts clicks on links and displays a confirmation dialog, allowing the user to decide whether to proceed or cancel.

πŸ” Example Workflow:

  1. A user clicks on a link.
  2. ⚠️ A dialog appears:
    Do you really want to open this link?
    https://example.com
    
  3. 🟒 The user can choose to proceed or πŸ›‘ cancel.

πŸ“„ Code Overview

manifest.json

Defines the extension’s metadata and permissions:

{
  "manifest_version": 3,
  "name": "HackerAI - Link Confirmation",
  "version": "1.0",
  "description": "Prompts confirmation before opening a link.",
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["content.js"]
    }
  ]
}

content.js

Handles link interception and confirmation prompts:

document.body.addEventListener('click', function (event) {
    let target = event.target;

    while (target && target !== document.body) {
      if (target.tagName === 'A' && target.href) {
        event.preventDefault();
        const confirmed = confirm(`Do you really want to open this link?
${target.href}`);
        if (confirmed) {
          window.location.href = target.href;
        }
        return;
      } else if (target.getAttribute && target.getAttribute('data-link')) {
        event.preventDefault();
        const link = target.getAttribute('data-link');
        const confirmed = confirm(`Do you really want to open this link?
${link}`);
        if (confirmed) {
          window.location.href = link;
        }
        return;
      }
      target = target.parentElement;
    }
});

🎯 Future Goals

Feature Status
πŸ€– AI-Powered Link Analysis 🟑 Planned
πŸ›‘οΈ Phishing Database Integration 🟑 Planned
πŸ“§ Email Security Features 🟑 Planned
✏️ Customizable Prompts 🟑 Planned
πŸ–₯️ Integration with Antivirus Tools 🟑 Planned
πŸ“Š User-Friendly Dashboard 🟑 Planned
🌐 Browser Compatibility 🟑 Planned

πŸ™Œ Contributing

Contributions are welcome! Follow these steps to get started:

  1. πŸ”€ Fork the repository on GitHub.
  2. πŸ–₯️ Clone your fork locally:
    git clone https://github.com/<your-username>/hackerai.git
  3. 🌱 Create a new branch:
    git checkout -b feature-name
  4. πŸ› οΈ Make your changes and test them thoroughly.
  5. πŸ“€ Push your changes to your fork:
    git push origin feature-name
  6. πŸ” Submit a pull request: Provide a clear description of your changes.

Please refer to our Contributing Guidelines for more details.


πŸ› οΈ Issues

If you encounter any problems or have feature requests, feel free to open an issue on GitHub: https://github.com/JustSouichi/hackerai/issues.


🌐 Social Links

Stay updated with the latest developments and connect with the creator:


πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


🀝 Acknowledgements

HackerAI is inspired by the need to make online security accessible for everyone, especially for those with little technical expertise. Special thanks to the open-source community for their support and resources.

About

Chrome extension to improve safety while browsing

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published