Skip to content

Instantly share code, notes, and snippets.

@marduk191
Last active November 11, 2021 02:49
Show Gist options
  • Save marduk191/65d5a3ca3126e16c207d to your computer and use it in GitHub Desktop.
Save marduk191/65d5a3ca3126e16c207d to your computer and use it in GitHub Desktop.
This is a shell script to install command line "termbin" online paste service from virtualhacker.net
#!/bin/bash
## Termbin installer
## By marduk191
## email: [email protected]
printf "%s\n" "Checking dependencies"
if ! dpkg-query -W netcat | grep .
then printf "%s\n" "netcat isn't installed. Setting up netcat."
gksudo apt-get install netcat
else printf "%s\n" "netcat is already installed!"
fi
if ! dpkg-query -W xclip | grep .
then printf "%s\n" "xclip isn't installed. Setting up xclip."
gksudo apt-get install xclip
else printf "%s\n" "xclip is already installed!"
fi
#Save some lines: modify if you are using POSIX without bash style echo
echo 'alias termbin="netcat virtualhacker.net 9999"' >> ~/.bashrc
echo 'alias copy="xclip -selection c"' >> ~/.bashrc
sleep 1
source ~/.bashrc
clear
printf "%s\n" "Usage: input | termbin | copy. Then paste the link from your X clipboard"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment