zerotoroot - My Journey to Becoming a Hacker

zerotoroot - My Journey to Becoming a Hacker


Follow the path to becoming a hacker!

Julius
Author

Share


Subscribe to zerotoroot - My Journey to Becoming a Hacker


Subscribe to my newsletter to receive article notifications and regular updates.

Tags


Pasty Bins - How to Pipe Command Line Output to a Pastebin

Pastebins come in handy, when you need to share text or code quickly. For a hacker, it is even more useful to be able to directly share output from the command…

JuliusJulius

Pastebins come in handy, when you need to share text or code quickly. For a hacker, it is even more useful to be able to directly share output from the command line to a pastebin.

In this case, we will look at sprunge.us, which offers the simplest and most effective way of sharing information via the commandline.

Command Line Output to Pastebin

Relying on sprunge.us allows us to stay clean and light. And it simplifies the sharing process over operating systems, as all that is required is curl.

The command to paste output from the command line:

curl -F 'sprunge=<-' http://sprunge.us

The input you want to share needs to be piped to the curl command. In this case it will be a simple .txt file.

$ cat myfile.txt | curl -F 'sprunge=<-' http://sprunge.us
http://sprunge.us/UGPG

The returned URL is where the paste can be found.

An alias further allows you to simplify the command, only having to type sppaste.

alias sppaste="curl -F 'sprunge=<-' http://sprunge.us"

If you want to make the alias persistent, add it to the .bashrc file in your home directory.

References and Further Reading

Julius
Author

Julius

View Comments