File uploader with support for multiple hosts and progress reporting written in Go.

go-upload

File uploader with support for multiple hosts and progress reporting written in Go. Windows, Linux, macOS and Android binaries

Usage

Upload single file to anonfiles:
go-ul_x64.exe anonfiles -f G:\file.bin

Upload two files to anonfiles and catbox and write output template:
go-ul_x64.exe anonfiles catbox -f G:\file.bin G:\file2.bin -o urls.txt

Upload a single file to FTP server to /x/y/ and overwrite it if it already exists.
go-ul_x64.exe ftp -f G:\file.bin -U ftp://myusername:[email protected]:21/x/y/ -O

Usage: go-ul_x64.exe [--outpath OUTPATH] [--wipe] --files FILES [--private] [--template TEMPLATE] [--overwrite] [--user USER] HOSTS [HOSTS ...]

Positional arguments:
  HOSTS                  Which hosts to upload to.

Options:
  --outpath OUTPATH, -o OUTPATH
                         Path of text file to write template to. It will be created if it doesn't already exist.
  --wipe, -w             Wipe output text file on startup.
  --files FILES, -f FILES
                         Paths of files to upload.
  --private, -P          *Set upload as private.
  --template TEMPLATE, -t TEMPLATE
                         Output text file template. Vars: filename, filepath, fileUrl [default: # {{.filename}}\n{{.fileUrl}}]
  --overwrite, -O        *Overwrite file on host if it already exists.
  --user USER, -U USER   *User form for FTP. Folders will be created recursively if they don't already exist.
  --help, -h             display this help and exit

* = Not supported for all hosts.

Template

Default: # {{.filename}}\n{{.fileUrl}}\n
Output with the default template:

# 2.jpg
https://anonfiles.com/Hde2H4F5ue/2_jpg

Args: filename, filepath, fileUrl

Supported hosts

Host Argument
anonfiles anonfiles
Catbox catbox
file.io fileio
Filemail filemail
FTP ftp
Gofile gofile
MegaUp megaup
pixeldrain pixeldrain
Uguu uguu
zippyshare zippyshare

Host arguments are case insensitive.

Owner
Download Gate Bypasser GPM-DL HRA-DL Idagio-DL MQ-DL Nugs-DL Playlist Migrator Qo-DL / Reborn Ti-DL 日本語もできる。
null
Similar Resources

Dragonfly is an intelligent P2P based image and file distribution system.

Dragonfly is an intelligent P2P based image and file distribution system.

Dragonfly Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in o

Jan 9, 2023

A basic file server automatically generates self certificates and serves the given folder.

A basic file server automatically generates self certificates and serves the given folder.

Jul 20, 2022

Provide an upload endpoint that stores files on pinata and returns a json response with the uploaded file pinata url

Purpose Build a template repository to get to coding as quickly as possible, by starting from a common template which follows the guidelines here Feat

Dec 30, 2021

Extract profiles and tasks information from CSV file

Footsite-Bot ideas from jw6602 Extract profiles and tasks information from CSV f

Nov 25, 2022

A very light-weight file sharing platform, including server and client

file-transporter A very light-weight file sharing platform, including server and client Installation git clone https://github.com/vence722/file-transp

Jan 12, 2022

Upgit - Upgit helps you simply upload any file to your Github repository and then get a raw URL for it

Upgit - Upgit helps you simply upload any file to your Github repository and then get a raw URL for it

Upgit - Upgit helps you simply upload any file to your Github repository and then get a raw URL for it

Dec 27, 2022

🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

Apr 12, 2022

Abstract File Storage

afs - abstract file storage Please refer to CHANGELOG.md if you encounter breaking changes. Motivation Introduction Usage Matchers Content modifiers S

Dec 30, 2022

a tool for handling file uploads simple

baraka a tool for handling file uploads for http servers makes it easier to make operations with files from the http request. Contents Install Simple

Nov 30, 2022
Comments
  • Template is not being parsed correctly

    Template is not being parsed correctly

    I'm using the following command to upload files

    go-upload anonfiles --template "\n{{.filename}}|{{.fileUrl}}\n" -o /root/urls.txt --files file

    But the \n in the template is not being parsed as a new line instead is being added to the file literally.

    if the --template option is removed the new lines in the default are added correctly.

  • workupload support.

    workupload support.

    https://workupload.com/ Everything's written, but the finalise upload post 404s. The host acts as if I never uploaded the file. Source code with workupload implemented: https://anonfiles.com/b8G5Qbjcy4/go-ul_workupload_zip

    --workupload--
    File 1 of 1:
    G:\go\ul_3\1.gif
    100% @ 985 kB/s, 15 MB/15 MB
    Failed to finalise upload.
    Upload failed.
    404 Not Found
    
    package workupload
    
    import (
    	"encoding/json"
    	"errors"
    	"fmt"
    	"main/utils"
    	"net/url"
    )
    
    const (
    	referer         = "https://workupload.com/"
    	getServerUrl    = referer + "api/file/getUploadServer"
    	finaliseUrl     = referer + "generateLink"
    	fileBagRegexStr = `name="filebag" value="([^"]+)"`
    )
    
    // Token is also in the html. File bag is epoch big endian + ?.
    func getTokenAndBag() (string, string, error) {
    	var token string
    	respBody, err := utils.GetHtml(referer)
    	if err != nil {
    		return "", "", err
    	}
    	u, err := url.Parse(referer)
    	if err != nil {
    		return "", "", err
    	}
    	for _, c := range utils.GetCookies(u) {
    		if c.Name == "token" {
    			token = c.Value
    			break
    		}
    	}
    	if token == "" {
    		return "", "", errors.New("The server didn't set the token cookie.")
    	}
    	match := utils.FindStringSubmatch(respBody, fileBagRegexStr)
    	if match == nil {
    		return "", "", errors.New("No regex match for file bag.")
    	}
    	return token, match[1], nil
    }
    
    func getServer() (string, error) {
    	headers := map[string]string{
    		"Referer": referer,
    	}
    	respBody, err := utils.DoGet(getServerUrl, nil, headers)
    	if err != nil {
    		return "", err
    	}
    	defer respBody.Close()
    	var obj GetServerResp
    	err = json.NewDecoder(respBody).Decode(&obj)
    	if err != nil {
    		return "", err
    	}
    	if !obj.Success {
    		return "", errors.New("Bad response.")
    	}
    	return obj.Data.Server, nil
    }
    
    func upload(uploadUrl, path string, size, byteLimit int64, headers, formMap map[string]string) (string, error) {
    	respBody, err := utils.MultipartUpload(uploadUrl, path, "files[]", size, byteLimit, formMap, nil, headers)
    	if err != nil {
    		return "", err
    	}
    	defer respBody.Close()
    	var obj UploadResp
    	err = json.NewDecoder(respBody).Decode(&obj)
    	if err != nil {
    		return "", err
    	}
    	if obj.Files[0].Size != size {
    		return "", errors.New("Byte count mismatch.")
    	}
    	return referer + "file/" + obj.Files[0].Key, nil
    }
    
    func finalise(headers, postMap map[string]string) error {
    	postMap["email"] = ""
    	postMap["emailText"] = ""
    	postMap["g-recaptcha-response"] = ""
    	postMap["password"] = ""
    	postMap["maxDownloads"] = ""
    	postMap["storagetime"] = ""
    	respBody, err := utils.DoPost(finaliseUrl, postMap, headers, nil)
    	if err != nil {
    		return err
    	}
    	respBody.Close()
    	return nil
    }
    
    func Run(args *utils.Args, path string) (string, error) {
    	size, err := utils.CheckSize(path, "2GB")
    	if err != nil {
    		return "", err
    	}
    	headers := map[string]string{
    		"Referer": referer,
    	}
    	token, fileBag, err := getTokenAndBag()
    	if err != nil {
    		fmt.Println("Failed to get token and/or file bag.")
    		return "", err
    	}
    	// fmt.Println(token)
    	// fmt.Println(fileBag)
    	uploadUrl, err := getServer()
    	if err != nil {
    		fmt.Println("Failed to get upload server URL.")
    		return "", err
    	}
    	formMap := map[string]string{
    		"token":   token,
    		"filebag": fileBag,
    	}
    	fileUrl, err := upload(uploadUrl, path, size, args.ByteLimit, headers, formMap)
    	if err != nil {
    		return "", err
    	}
    	err = finalise(headers, formMap)
    	if err != nil {
    		fmt.Println("Failed to finalise upload.")
    		return "", err
    	}
    	return fileUrl, err
    }
    
  • Fix AnonFiles.

    Fix AnonFiles.

    No longer working, no clue why.

    {
       "status":false,
       "error":{
          "message":"No file chosen.",
          "type":"ERROR_FILE_NOT_PROVIDED",
          "code":10
       }
    }
    
  • Zippyshare upload failed, error logged

    Zippyshare upload failed, error logged "Upload failed. 403 Forbidden"

    Hi developer, there seems to be a bug when you try to upload to Zippyshare. I'm using a Linux x86_64 system and the appropriate binary package.

    I'm not sure about the other hosting providers, I didn't try them.

    Could be something to do with CAPTCHA bypass, this is a wild. Please update.

go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).
go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).

中文 English 愿景:为用户提供最简单、可靠、高效的分布式文件系统。 go-fastdfs是一个基于http协议的分布式文件系统,它基于大道至简的设计理念,一切从简设计,使得它的运维及扩展变得更加简单,它具有高性能、高可靠、无中心、免维护等优点。 大家担心的是这么简单的文件系统,靠不靠谱,可不

Jan 8, 2023
go tool for working with /etc/hosts files

hostsfile This library, and the associated command line binary, will help you manipulate your /etc/hosts file. Both the library and the binary will le

Dec 30, 2022
Goful is a CUI file manager written in Go.
Goful is a CUI file manager written in Go.

Goful Goful is a CUI file manager written in Go. Works on cross-platform such as gnome-terminal and cmd.exe. Displays multiple windows and workspaces.

Dec 28, 2022
goelftools is library written in Go for parsing ELF file.

goelftools goelftools is library written in Go for parsing ELF file. This library is inspired by pyelftools and rbelftools. Motivation The motivation

Dec 5, 2022
GeeseFS is a high-performance, POSIX-ish S3 (Yandex, Amazon) file system written in Go
GeeseFS is a high-performance, POSIX-ish S3 (Yandex, Amazon) file system written in Go

GeeseFS is a high-performance, POSIX-ish S3 (Yandex, Amazon) file system written in Go Overview GeeseFS allows you to mount an S3 bucket as a file sys

Jan 1, 2023
RIFF file extractor written in Go.
RIFF file extractor written in Go.

RIFF-Extractor RIFF file extractor written in Go. This was written for Dying Light 2, but should also work for other games. I wasn't able to find any

Aug 1, 2022
A PDF document generator with high level support for text, drawing and images

GoFPDF document generator Package go-pdf/fpdf implements a PDF document generator with high level support for text, drawing and images. Features UTF-8

Jan 4, 2023
atomic time package with json Marshal / Unmarshal support

ATime Atomic Time package for Go, optimized for performance yet simple to use. Usage // one line create dt := atime.New() // allocates *AtomicTime dt

Feb 6, 2022
Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site
Bigfile -- a file transfer system that supports http, rpc and ftp protocol   https://bigfile.site

Bigfile ———— a file transfer system that supports http, rpc and ftp protocol 简体中文 ∙ English Bigfile is a file transfer system, supports http, ftp and

Dec 31, 2022
QueryCSV enables you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to a CSV file
QueryCSV enables you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to a CSV file

QueryCSV enable you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to CSV file

Dec 22, 2021