Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # script to send text to pastebin.com
- read -p "username: " un
- read -sp "password: " pw
- read -p "paste title: " pname
- read -p "format (code type): " format
- uk=$(curl -d api_dev_key="dc9d95e68d7db0549edf6131d5233804" -d api_user_name="$un" -d api_user_password="$pw" http://pastebin.com/api/api_login.php)
- if [[ $1 = "list" ]];
- then
- curl -d api_dev_key="dc9d95e68d7db0549edf6131d5233804" -d api_user_key="$uk" -d api_user_name="$un" -d api_user_password="$pw" -d api_option="list" http://pastebin.com/api/api_post.php
- else
- pc=$(cat $1)
- curl -d api_dev_key="dc9d95e68d7db0549edf6131d5233804" -d api_user_key="$uk" -d api_user_name="$un" -d api_user_password="$pw" -d api_option="paste" -d api_paste_code="$pc" -d api_paste_name="$pname" -d api_paste_format="$format" http://pastebin.com/api/api_post.php
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement