![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-23 14:09 |
47,812 topics / 349,917 posts / today 0 new / 48,273 members |
| DOS批处理 & 脚本技术(批处理室) » p-mailsend_4.0.cmd (send email from command line, mass mailing\multiple attachments\anonymous) |
| Printable Version 83,110 / 122 |
| Floor16 bjsh | Posted 2007-04-26 01:24 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
This morning I analyzed the code of Brother vkill;
Here I will explain it; so that beginners can learn; The overall process is: 1. Check file integrity or download 2. Check parameters 3. Test login 4. Write full configuration file 5. Inject via nc and send email |
|
| Floor17 bjsh | Posted 2007-04-26 01:27 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
I looked it over; I found some minor issues; and here are some suggestions below;
To avoid using it only once /x, it is suggested to initialize user and others at the beginning : There is a missing goto :eof at the end of the sending program This error will lead to : After the sending program is executed, it will immediately execute :Judge whether the login is successful; Add a sentence after call :Judge whether the login is successful if errorlevel 1 goto :del_ Otherwise, it will continue to send the letter regardless of whether the login is successful; When calling call :Judge whether the sending is successful, some other unnecessary information will appear; and if the sending is not successful, the prompt for unsuccessful sending will appear twice; And finally, it will also echo All letters sent successfully; It is suggested to add cls if errorlevel 1 echo Sending failed & goto del_ before call :del echo All letters sent successfully In the :Interactive mode if not defined user (set/p=Username:<nul&set/p "user= ") It can be simply written as: if not defined user (set/p "user=Username: ") And so on for /f "tokens=2 delims=" %%? in ('ping -n 1 smtp.163.com ^|findstr /i "^Pinging"') do (set "ip=%%?") It is suggested to change Pinging to ping otherwise Vista cannot successfully find the ip Vista's echo is:
It should move the if "%1"=="vkill" goto :eof under help to before help; otherwise it will lose its proper function; |
|
| Floor18 wudixin96 | Posted 2007-04-26 01:33 |
| 银牌会员 Posts 931 Credits 1,928 | |
|
Good stuff. But still need to rely on vbs? !
|
|
| Floor19 bjsh | Posted 2007-04-26 01:35 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
Code for Brother vkill
Slightly modified according to the above suggestions and wrote some comments slightly The code is as follows
|
|
| Floor20 bjsh | Posted 2007-04-26 04:12 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
According to Brother vkill's code; I rewrote it directly to generate test and post files; avoiding the summation and copying of 9 files; it is a bit easier to understand:
The code is as follows:
|
|
| Floor21 vkill | Posted 2007-04-26 07:41 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
bjsh brother
I use copy + + entirely for multi-party sending, because when sending to multiple parties, only the rcpt to: is modified, and nothing else changes at all. Try start nc -nvv... when you send an email with copy ++, hehe The explanation on floor 19 is wonderful,佩服 In interactive mode if not defined user (set/p=用户名:<nul&set/p "user= ") Can be completely abbreviated as: if not defined user (set/p "user=用户名: ") And so on I just tried set/p "user=用户名: " and set/p=用户名:<nul&set/p "user= " are the same, thank you brother for the guidance |
|
| Floor22 vkill | Posted 2007-04-26 07:44 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
还有看来bjsh 兄这么有意研究这个,再说说吧!
>>post echo mail from: ^<%user%@%server%^> >>post echo rcpt to: ^<%to%^> mail from: can remove this, or can write other email boxes, should also be able to write text and so on, similar to anonymous, haha rcpt to: can remove this, so others can't see who you are sending to at the same time, I believe it's impossible to do this at mail.163.com |
|
| Floor23 bjsh | Posted 2007-04-26 07:44 |
| 银牌会员 Posts 621 Credits 2,000 | |
Oh, I see! I really didn't expect multi-recipient sending; indeed |
|
| Floor24 bjsh | Posted 2007-04-26 07:48 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
I still want to make it universal within the school;
Unfortunately, after thinking for a long time, I didn't understand what the school's email server uses; It seems to be 80; As for smtp, it's completely imitating yours; As for the meaning, I really don't understand; I really need to learn network protocols when I have time; If Brother vkill doesn't mind my being depressed; Help me get the email sending done within the school; I'm really grateful; |
|
| Floor25 vkill | Posted 2007-04-26 07:51 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
The following ones are completely about mime, http://blog.yx127.com/?action=show&id=190, it's very detailed here.
Check the one from the school by telnetting in, example: telnet 192.168.0.1 25 help See what comes out [ Last edited by vkill on 2007-4-26 at 07:52 AM ] |
|
| Floor26 bjsh | Posted 2007-04-26 08:00 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
Port 25 is not open;
Asked some people in the school Said that both smtp and pop3 are not open; |
|
| Floor27 vkill | Posted 2007-04-26 08:01 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
Brother bjsh
Are you interested in writing together? I want to write p-mailsend to support more email boxes, at least I want to support several major ones now, 163 yahoo qq hotmail gmail 56 sina sohu 21cn == Usage: p-163ms.cmd /u username@server /p password /t recipient /s subject |
|
| Floor28 vkill | Posted 2007-04-26 08:03 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by bjsh at 2007-4-26 08:00: If this is not open, then there is no way to use telnet. Using Foxmail, OE, etc. is also not possible. Only sending emails through the web form is possible. You can write a VBS to log in to the email and send an email. Hehe, it's customized. |
|
| Floor29 bjsh | Posted 2007-04-26 08:14 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
He only has these ports:
80(HTTP) 21(FTP Control) 3306(MYSQL) 22(SSH) 389(LDAP) Really need to use vbs; Write in May Day |
|
| Floor30 bjsh | Posted 2007-04-26 08:15 |
| 银牌会员 Posts 621 Credits 2,000 | |
Originally posted by vkill at 2007-4-25 07:01 PM: Okay! This way I can learn good things from you; hehe |
|
| Prev 1 2 3 4 5 … 9 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |