random- collection of un-sorted bollocks |
git clone git://git.acid.vegas/random.git |
Log | Files | Refs | Archive |
shitmail (1706B)
1 #!/bin/sh 2 # 1secmail api - developed by acidvegas (https://git.acid.vegas/random) 3 4 api="https://www.1secmail.com/api/v1" 5 user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" 6 7 usage() { 8 echo "./shitmail domains | return a list of domains used with 1secmail" 9 echo "./shitmail generate [amount] | generate a random email (optionally set the [amount] to generate more than 1)" 10 echo "./shitmail inbox <login> <domain> | check the inbox for <login>@<domain>" 11 echo "./shitmail read <login> <domain> <id> | read a specific email message from the <login>@<domain> inbox (read inbox to get message <id>)" 12 } 13 14 #todo: proper arguement checking & usage() 15 if [ '$1' = 'domains']; then 16 curl --request GET --url "$api/?action=getDomainList" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" 17 elif [ '$1' = 'generate']; then 18 #todo: parse count arguement (optional, default to 1) 19 curl --request GET --url "$api/?action=genRandomMailbox&count=$1" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" 20 elif [ '$1' = 'inbox' ]; then 21 #todo: parse login & domain arguements 22 curl --request GET --url "$api/?action=getMessages&login=$1&domain=$2" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" 23 elif [ '$1' = 'read' ]; then 24 #todo: parse login, domain, & id arguments 25 curl --request GET --url "$api/?action=readMessage&login=$1&domain=$2&id=$3" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" 26 fi