Giter VIP home page Giter VIP logo

pwnagotchi-connshare's Introduction

Pwnagotchi Connection Share Script

This is a script to share your internet connection with your Pwnagotchi in Linux

Original Script

The original version of this script can be found at Linux Pwnagotchi Connection Share on SourceForge. All credit for the original creation goes to @DoctorX.

Enhancements

The script has been modified to:

  1. Ask probing questions to gather and select information to automate the creation of the connection share.
  2. Allow the user to choose a DNS IP address, suggesting popular choices.
  3. Automatically scan for USB Ethernet Gadget interfaces and provide a selection for the user.
  4. Scan for and allow the user to choose non-Ethernet gadget interfaces for the upstream connection.
  5. Added command-line argument support for advanced users:
    • -u or --username: Set the username for the Pwnagotchi.
    • -d or --dns: Set the DNS IP address to use.
    • -p or --pwnagotchi: Set the Pwnagotchi USB Ethernet device name.
    • -w or --upstream: Set the upstream device name.
    • --config: Specify a configuration file.
  6. Implemented a help function to display usage instructions.
    • -h or --help
  7. Improved logging to provide detailed progress and error information.
  8. Included validation to ensure appropriate permissions for modifying iptable rules.
  9. Added fallback to interactive selection if command-line arguments are not provided.
  10. Refactored code to improve readability and maintainability.
  11. Automatic loading of configuration from gotchi_connshare.conf if present in the same directory.
  12. Error handling for SSH connections to the Pwnagotchi device.
  13. Prompt to connect to the Pwnagotchi via SSH after setup completion.

Usage

To use this script:

  1. Clone the repo:
    git clone https://github.com/ludothegreat/pwnagotchi-connshare.git
    cd pwnagotchi-connshare
  2. Make the script executable:
    chmod +x gotchi_connshare.sh
  3. Run the script:
    sudo ./gotchi_connshare.sh
  4. Optional - Run the script in your terminal with arguments:
    sudo ./gotchi_connshare.sh -u <username> -d <dnsserver> -p <pwnagotchiusbethdevicename> -w <upstreamdevicename>
    example:
    sudo ./gotchi_connshare.sh -u pi -d 1.1.1.1 -p enp0s20fu8 -w wlan0
  5. Connect to your Pwnagotching:

Sample config file

Save as gotchi_connshare.conf and place it in the same directory as the main script

# Enter your Pwnagotchi's username
username="pi"

# Enter your prefered DNS server
YOUR_DNS="1.1.1.1"

# Enter your Pwnagotchi's ethernet interface
pwnagotchi_iface="usb0"

# Enter your computers internet interface
upstream_iface="wlan0"

pwnagotchi-connshare's People

Contributors

ludothegreat avatar

Stargazers

MMarchjr avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.