Coder Social home page Coder Social logo

olivierlaflamme / upload-go-fileserver Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 15 KB

Fileserver written in Go with a useful upload feature that can be leveraged to transfer file between machines. Has the option to force authentication before accessing.

Makefile 18.22% Go 81.78%
golang go fileserver pentesting filetransfer fileuploader

upload-go-fileserver's Introduction

Go fileserver with uploads

Build CC COMMIT

About

This is a fileserver written in golang. As of now, this fileserver will not provide encryption or any other security measures besides logon authentication (if ran with -pass & -user flags configured) - this is just a simple fileserver. The script itself was (kinda but not really) inspired by UniIsland/SimpleHTTPServerWithUpload.py a well know python SimpleHTTPServer 'config' - however my fileserver actually works out of the box because its not from 2012 using deprecated python libraries.

As it stands, this fileserver doesn't support multiple file uploads - you can only upload one file at a time so trying to upload an array of files using curl -X POST http://IP:80 -F "upload[]=@/Users/test/a.exe" -F "upload[]=@/Users/boschko/b.dll" -H "Content-Type: multipart/form-data" ... Moreover, this is simply not the intent / use case of this script.

Getting Started

For those of you who are new to go and just want to run this ~ you only have to run go get github.com/gin-gonic/gin once.

Running: go get github.com/gin-gonic/gin && go run filserver.go
Building: go get github.com/gin-gonic/gin && go build -ldflags "-w -s" filserver.go

Or build
First run: go get github.com/gin-gonic/gin

  • env GOOS=windows GOARCH=386 go build -v filserver.go
  • env GOOS=linux GOARCH=amd64 go build -v filserver.go

Or Makefile

Run: Make will build for all OS compatibilities

Usage

Parameter Description
-h, --help show help message and exit
-dir (string) file dir (default "./")
-pass (string) password
-port (string) http port (default "80")
-user (string) username

Example

Start the go fileserver with authentication:

image

Login with credentials

image

Upload file from remote machine or download from local machine

image

View the file on fileserver

image

Resources

upload-go-fileserver's People

Contributors

olivierlaflamme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  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.