Browse Source

REFERENCING CURRENT HOSTING

master
Andrea Spacca 5 years ago
parent
commit
91877f64db
7 changed files with 786 additions and 785 deletions
  1. +748
    -747
      bindata_gen.go
  2. +2
    -2
      src/download.code.html
  3. +1
    -1
      src/includes/head.html
  4. +1
    -1
      src/includes/navigation.html
  5. +23
    -23
      src/index.html
  6. +10
    -10
      src/index.txt
  7. +1
    -1
      src/scripts/mainbk.js

+ 748
- 747
bindata_gen.go
File diff suppressed because it is too large
View File


+ 2
- 2
src/download.code.html View File

@@ -9,7 +9,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{.Filename}} - transfer.sh</title>
<title>{{.Filename}} - {{.Hostname}}</title>
<meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
@@ -45,7 +45,7 @@

<div id="navigation">
<div class="wrapper">
<h1>transfer.sh</h1>
<h1>{{.Hostname}}</h1>
<ul class="hidden-xs">
<li><a href="#samples">sample use cases</a>
</li>


+ 1
- 1
src/includes/head.html View File

@@ -1,7 +1,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>transfer.sh - Easy and fast file sharing from the command-line.</title>
<title>{{.Hostname}} - Easy and fast file sharing from the command-line.</title>
<meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->


+ 1
- 1
src/includes/navigation.html View File

@@ -1,7 +1,7 @@
<div id="navigation">
<div class="wrapper">
<a href="/">
<h1>transfer.sh</h1>
<h1>{{.Hostname}}</h1>
</a>
<ul class="hidden-xs">
<li><a href="/">home</a>


+ 23
- 23
src/index.html View File

@@ -43,11 +43,11 @@ include "includes/head.html"
</div>
<div id="terminal" class="terminal">
<code class="code-wrapper"><span class="code-title"># Upload using cURL</span>
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt https://transfer.sh/66nb8/hello.txt
$ curl --upload-file ./hello.txt {{.WebAddress}}/hello.txt {{.WebAddress}}/66nb8/hello.txt

<span class="code-title"># Using the shell function</span>
$ transfer hello.txt
##################################################### 100.0% https://transfer.sh/eibhM/hello.txt
##################################################### 100.0% {{.WebAddress}}/eibhM/hello.txt
</code>
</div>
<div id="web">
@@ -137,14 +137,14 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Uploading is easy using curl</span>
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
https://transfer.sh/66nb8/hello.txt
$ curl --upload-file ./hello.txt {{.WebAddress}}/hello.txt
{{.WebAddress}}/66nb8/hello.txt

$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt https://transfer.sh/hello.txt
https://transfer.sh/66nb8/hello.txt
$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt {{.WebAddress}}/hello.txt
{{.WebAddress}}/66nb8/hello.txt

<span class="code-title"># Download the file</span>
$ curl https://transfer.sh/66nb8/hello.txt -o hello.txt
$ curl {{.WebAddress}}/66nb8/hello.txt -o hello.txt
</code>
</div>
</div>
@@ -154,7 +154,7 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Add this to .bashrc or .zshrc or its equivalent</span>
transfer(){ if [ $# -eq 0 ];then echo &quot;No arguments specified.\nUsage:\n transfer &lt;file|directory&gt;\n ... | transfer &lt;file_name&gt;&quot;&gt;&amp;2;return 1;fi;if tty -s;then file=&quot;$1&quot;;file_name=$(basename &quot;$file&quot;);if [ ! -e &quot;$file&quot; ];then echo &quot;$file: No such file or directory&quot;&gt;&amp;2;return 1;fi;if [ -d &quot;$file&quot; ];then file_name=&quot;$file_name.zip&quot; ,;(cd &quot;$file&quot;&amp;&amp;zip -r -q - .)|curl --progress-bar --upload-file &quot;-&quot; &quot;https://transfer.sh/$file_name&quot;|tee /dev/null,;;else cat &quot;$file&quot;|curl --progress-bar --upload-file &quot;-&quot; &quot;https://transfer.sh/$file_name&quot;|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file &quot;-&quot; &quot;https://transfer.sh/$file_name&quot;|tee /dev/null;fi;}
transfer(){ if [ $# -eq 0 ];then echo &quot;No arguments specified.\nUsage:\n transfer &lt;file|directory&gt;\n ... | transfer &lt;file_name&gt;&quot;&gt;&amp;2;return 1;fi;if tty -s;then file=&quot;$1&quot;;file_name=$(basename &quot;$file&quot;);if [ ! -e &quot;$file&quot; ];then echo &quot;$file: No such file or directory&quot;&gt;&amp;2;return 1;fi;if [ -d &quot;$file&quot; ];then file_name=&quot;$file_name.zip&quot; ,;(cd &quot;$file&quot;&amp;&amp;zip -r -q - .)|curl --progress-bar --upload-file &quot;-&quot; &quot;{{.WebAddress}}/$file_name&quot;|tee /dev/null,;;else cat &quot;$file&quot;|curl --progress-bar --upload-file &quot;-&quot; &quot;{{.WebAddress}}/$file_name&quot;|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file &quot;-&quot; &quot;{{.WebAddress}}/$file_name&quot;|tee /dev/null;fi;}

<span class="code-title"># Now you can use transfer function</span>
$ transfer hello.txt
@@ -174,11 +174,11 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper">
$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/
$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt {{.WebAddress}}/

<span class="code-title"># Combining downloads as zip or tar archive</span>
$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz
$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip
$ curl {{.WebAddress}}/(15HKz/hello.txt,15HKz/hello.txt).tar.gz
$ curl {{.WebAddress}}/(15HKz/hello.txt,15HKz/hello.txt).zip
</code>
</div>

@@ -190,10 +190,10 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Encrypt files with password using gpg</span>
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}/test.txt

<span class="code-title"># Download and decrypt</span>
$ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
$ curl {{.WebAddress}}/1lDau/test.txt|gpg -o- > /tmp/hello.txt
</code>
</div>
</div>
@@ -207,10 +207,10 @@ include "includes/head.html"
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Scan for malware or viruses using Clamav</span>
$ wget http://www.eicar.org/download/eicar.com
$ curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan
$ curl -X PUT --upload-file ./eicar.com {{.WebAddress}}/eicar.com/scan

<span class="code-title"># Upload malware to VirusTotal, get a permalink in return</span>
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
$ curl -X PUT --upload-file nhgbhhj {{.WebAddress}}/test.txt/virustotal
</code>
</div>
</div>
@@ -220,7 +220,7 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Backup, encrypt and transfer</span>
$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}/test.txt</code>
</div>
</div>
</div>
@@ -243,9 +243,9 @@ include "includes/head.html"
<code class="code-wrapper"><span class="code-title"># Import keys from keybase</span>
$ keybase track [them]
<span class="code-title"># Encrypt for recipient(s)</span>
$ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' https://transfer.sh/test.txt
$ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' {{.WebAddress}}/test.txt
<span class="code-title"># Decrypt</span>
$ curl https://transfer.sh/sqUFi/test.md |keybase decrypt
$ curl {{.WebAddress}}/sqUFi/test.md |keybase decrypt
</code>
</div>
</div>
@@ -257,7 +257,7 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># wget</span>
$ wget --method PUT --body-file=/tmp/file.tar https://transfer.sh/file.tar -O - -nv
$ wget --method PUT --body-file=/tmp/file.tar {{.WebAddress}}/file.tar -O - -nv
</code>
</div>
</div>
@@ -267,7 +267,7 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># grep syslog for pound and transfer</span>
$ cat /var/log/syslog|grep pound|curl --upload-file - https://transfer.sh/pound.log
$ cat /var/log/syslog|grep pound|curl --upload-file - {{.WebAddress}}/pound.log
</code>
</div>
</div>
@@ -280,7 +280,7 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Upload using Powershell</span>
PS H:\&gt; invoke-webrequest -method put -infile .\file.txt https://transfer.sh/file.txt
PS H:\&gt; invoke-webrequest -method put -infile .\file.txt {{.WebAddress}}/file.txt
</code>
</div>
</div>
@@ -290,7 +290,7 @@ include "includes/head.html"
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># HTTPie</span>
$ http https://transfer.sh/ -vv &lt; /tmp/test.log
$ http {{.WebAddress}}/ -vv &lt; /tmp/test.log
</code>
</div>
</div>
@@ -305,7 +305,7 @@ include "includes/head.html"
<span class="code-title"># transfersh-cli (https://github.com/tanrax/transfersh-cli)</span>
$ trasnfersh photos.zip
<span class="code-title"># Uploading file</span>
<span class="code-title"># Download from here: https://transfer.sh/xxxxxx/photos.zip</span>
<span class="code-title"># Download from here: {{.WebAddress}}/xxxxxx/photos.zip</span>
<span class="code-title"># It has also been copied to the clipboard!</span>
</code>
</div>


+ 10
- 10
src/index.txt View File

@@ -1,37 +1,37 @@
transfer.sh: Easy file sharing from the command line
{{.Hostname}}: Easy file sharing from the command line
===
made with <3 by DutchCoders

Upload:
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
$ curl --upload-file ./hello.txt {{.WebAddress}}/hello.txt

Encrypt & upload:
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}/test.txt

Download & decrypt:
$ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
$ curl {{.WebAddress}}/1lDau/test.txt|gpg -o- > /tmp/hello.txt

Grep pound from syslog and transfer
cat /var/log/syslog|grep pound|curl --upload-file - https://transfer.sh/pound.log
cat /var/log/syslog|grep pound|curl --upload-file - {{.WebAddress}}/pound.log

Using Keybase:
# import keys from keybase
$ keybase track [them]

# encrypt for recipients
$ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' https://transfer.sh/test.txt
$ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' {{.WebAddress}}/test.txt

# decrypt
$ curl https://transfer.sh/sqUFi/test.md |keybase decrypt
$ curl {{.WebAddress}}/sqUFi/test.md |keybase decrypt

Upload to Virustotal:
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
$ curl -X PUT --upload-file nhgbhhj {{.WebAddress}}/test.txt/virustotal

Virusscan:
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/scan
$ curl -X PUT --upload-file nhgbhhj {{.WebAddress}}/test.txt/scan

Add shell function to .bashrc or .zshrc or its equivalent:
===
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null,;;else cat "$file"|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;}
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "{{.WebAddress}}/$file_name"|tee /dev/null,;;else cat "$file"|curl --progress-bar --upload-file "-" "{{.WebAddress}}/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "{{.WebAddress}}/$file_name"|tee /dev/null;fi;}
===
$ transfer test.txt

+ 1
- 1
src/scripts/mainbk.js View File

@@ -2,7 +2,7 @@ $(document).ready(function () {

// Terminal typing animation
$("#from-terminal p").typed({
strings: ["curl --upload-file ./hello.txt https://transfer.sh/hello.txt\nhttps://transfer.sh/66nb8/hello.txt \n "],
strings: ["curl --upload-file ./hello.txt {{.WebAddress}}/hello.txt\n{{.WebAddress}}/66nb8/hello.txt \n "],
typeSpeed: 0,
loop: true,
});


Loading…
Cancel
Save