From 7cfdb6d608380b7a3a3ca4e9465307373cb734e5 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sat, 20 May 2023 22:16:45 -0400 Subject: [PATCH] added shitmail --- shitmail | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 shitmail diff --git a/shitmail b/shitmail new file mode 100755 index 0000000..3ddaba0 --- /dev/null +++ b/shitmail @@ -0,0 +1,26 @@ +#!/bin/sh +# 1secmail api - developed by acidvegas (https://git.acid.vegas/random) + +api="https://www.1secmail.com/api/v1" +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" + +usage() { + echo "./shitmail domains | return a list of domains used with 1secmail" + echo "./shitmail generate [amount] | generate a random email (optionally set the [amount] to generate more than 1)" + echo "./shitmail inbox | check the inbox for @" + echo "./shitmail read | read a specific email message from the @ inbox (read inbox to get message )" +} + +#todo: proper arguement checking & usage() +if [ '$1' = 'domains']; then + curl --request GET --url "$api/?action=getDomainList" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" +elif [ '$1' = 'generate']; then + #todo: parse count arguement (optional, default to 1) + curl --request GET --url "$api/?action=genRandomMailbox&count=$1" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" +elif [ '$1' = 'inbox' ]; then + #todo: parse login & domain arguements + curl --request GET --url "$api/?action=getMessages&login=$1&domain=$2" --user-agent "$user_agent" --header "accept: application/json" --header "content-type: application/json" +elif [ '$1' = 'read' ]; then + #todo: parse login, domain, & id arguments + 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" +fi \ No newline at end of file