metalx1000

Copy Pastebin posts to other sites

Oct 23rd, 2017
622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.62 KB | None | 0 0
  1. #!/bin/bash
  2. #copy pastebin posts to other pasting sites
  3.  
  4. #download list of pastes
  5. wget -q "https://pastebin.com/u/metalx1000" -O- |\
  6.   grep 'href'|\
  7.   grep 'Public paste'|\
  8.   cut -d\" -f 10|\
  9.   while read line;
  10.   do
  11.     echo "https://pastebin.com/raw$line";
  12.   done > dls
  13.  
  14.   #get list of site to paste to
  15.   pastebinit -l|grep '^- '|sed 's/- //g' > sites
  16.  
  17.   cat dls|while read u
  18. do
  19.   echo "# By Kris Occhipinti - http://filmsbykris.com" > p
  20.   echo "# Licensed under the GPLv3 - https://www.gnu.org/licenses/gpl-3.0.txt" >> p
  21.   wget "$u" -O- >> p
  22.   cat sites|while read s
  23. do
  24.   pastebinit -i p -b "$s"  
  25. done
  26. done
Add Comment
Please, Sign In to add comment