Coder Social home page Coder Social logo

netgo's Introduction

netgo

A tool like netcat but may be better.

Functions

  • Listen local port
  • Connect to ip:port
  • Transform command to remote machine
  • "Fake" port forwarding

How to install it

Install go first.

After you install go and config it well:

go get github.com/grt1st/netgo
go build github.com/grt1st/netgo
./netgo

How to use it

  1. Basic mode:
  • Server mode: ./netgo -l -p 6666
  • Client mode: ./netgo -a localhost -p 6666

You can use the modes just the way you use in netcat.

  1. You can use it to transform file also:
./netgo -l -p 6666 > 2.txt
cat 1.txt | ./netgo -a localhost -p 6666

  1. Also use it to transform shell:

Forward shell:

./netgo -l -p 6666
./netgo -a localhost -p 6666 -e /bin/bash

Reverse shell:

./netgo -l -p 6666 -e /bin/bash
./netgo -a localhost -p 6666

Another way:

bash -c "bash -i &>/dev/tcp/localhost/6666 0>&1"
./netgo -l -p 6666

  1. What's more, try it:
./netgo -a www.baidu.com -p 80 -html

  1. Port forwarding

The first: Listen two port at the same time, and two ports are connected:

./netgo -a localhost -p 6666 -p 6667

Use it when you don't have public ip address:

./netgo -a xx.xx.xx.xx -p 6666 -e /bin/bash
./netgo -a xx.xx.xx.xx -p 6667

The second: Forward your local port to the remote machine which has a public ip address.

./netgo -a localhost -p 6666 -p 6667

And bind you local port forward by:

./netgo -a localhost -p 80 -rhost xx.xx.xx.xx:6666

Then others can visit your port by:

./netgo -a xx.xx.xx.xx -p 6667

Note: The two port forwarding way has a disadvantage: the port can only get 1 client, so I say it's fake :)

To do list

  • Rebuild Code
  • Specification error message
  • Limit client number more effective
  • Encrypted message

How to contribute

Fork it and push.

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.