xstress 0.375 Beta

xstress is a SMTP stress tester program.
xstress
  2 Screenshots
xstress is a SMTP stress tester program. It creates multiple connections (using threads) to the (configured) mail server and sends mails with varying subject, body, attachment and TO/FROM addresses. The combination is made randomly during runtime.

xstress understands only SMTP protocol. No authentication
mechanism is supported at the moment.

Using xstress you can specify a list of the following to be used for sending mails

1) TO address list
2) FROM address list
3) SUBJECT list
4) list of BODY content files
5) list of ATTACHMENT content files

xstress randomly makes a combination from the available list and sends mails to your SMTP server.

Building binary

Switch user to root and type the following command from the directory
where you have un-compressed the xstress source archive and run the
following command to build the xstress binary.

# make

The above command will create the xtress binary in the bin folder and copy the default xstress.conf file to the bin folder. If the file already exists you'll be aksed if you want to over-write it or not.

The make command also creates the base64 utility used by xstress and copies it to the bin directory

** NOTE: base64 utility is required for xstress to send binary attachments properly.

If you get any error while doing a `make', run the following command befor you do make.

# make clean

Alternatively you may run the build shell script by typing

# ./build

which runs `make clean' first and then does a `make'

Usage and command line options

Move to the bin folder and type ./xstress to invoke the tool.

Syntax:

$ xstress [options]

Options:

-v, --ver, --version Display xstress version and exit.
-h, --help Display this help message
-t < value >, --threads < value > Set number of threads to spawn.
Range for value is 1 to 100, inclusive.
-m < value >, --mails < value > Set number of mails to send per thread.
range for value is 0 to 60000, inclusive.
* A Value of 0 for mails means unlimited mail.
-s < IP >, --server < IP > Set the mail server IP
IP is in dotted decimal format
-p < value >, --port < value > Set the mail server port
value is the port number of the mail server
--timeout < value > Set connection timeout (in seconds)
values is a non zero positive integer
--conf < filename > Configuration file to use, instead of the
default file 'xstress.conf'.
`filename` is the full path to the alternate
configuration file.
--logfile < filename > Set alternate log file to use, instead of the
default 'xstress.log' file.
`filename` is the full path to the alternate
log file.

**Note: command line options always override configuration file settings

Configuration file

By default xstress reads its configuration from the file 'xstress.conf'.
This file should be present from where you invoke the xstress program.

A typical configuration file consists of six sections. Out of these the
CONFIG section, TO section, SUBJECT section and FROM section are
compulsory.

COMMENTS start with the hash (#) sign on the 'first column only'.
Blank lines are ignored. The parser is not designed to handle extra spaces
so don't play with them.

Var = Value : will NOT work
Var=Val : will work!
Var=Val : will NOT work

TO and FROM sections contains list of email addresses, one per line,
to be used as recipent address and sender address respectively.

SUBJECT Section contains list of subject text, one per line,
to used for e-mails being sent by xstress.

BODY Section contains list of (text) files. The content of these
files is used as the mail's body text.

ATTACHMENT Sections contains list of (text) files which will be
attached to the mails being sent out from xstress. The file list can
prfixed by an optinal FILETYPE tag as follows

[ATTACHMENT]
path/to/file!type

The exclamation sign (!) separates the attachment file name from the type.
Following types ares understood by xstress.

1) bin - binary files
eg: MS Word document, compressed archives, MP3 files etc.
** Whenever in doubt use this type
2) plain - Plain text files
eg: Source Code, Text files, scripts etc.
3) html - HTML source
4) image - Image files
Any image file, treated as `bin' but disposition is inline.

CONFIG Section contains variables that configure the mail server
to be used, number of threads and the like.

Variables understood by xstress are described below

SERVER - Specify the SMTP Mail Server's IP here.
Example: 172.16.0.1

PORT - Specify the SMTP Mail Server's port number here.
This is typically 25.

THREADS - Specify number of threads to spwan
The value can range from 1 to 100
A Value of 15 is found to be optimum for
low end PCs.

A thread represents one connection to the Mails Server.

Higher the number of threads, more mails per second
can be sent by xstress, but the machine on which
xstress will be running might become
unresponsive.

MAILS_PER_THREAD - Speciy the number of mails to be sent per
thread. The value for this can range from
0 to 60,000.

value of ZERO means unlimited number of mails per
thread. You have to use ^C (control + C) to quit
xstress if you use ZERO for this variable.

LOG_FILE - Set the log file to be used if you dont want to use the
default log file 'xstress.log'

TIMEOUT - Specify connection timeout in seconds after which xstress
will give up.

TIP: If you are specifying ZERO for MAILS_PER_THREAD, put a low
value here, as you would not like xstress to wait for too long before
it sends a new mail. A low will timeout that session sonner and xstress
will try sending a new mail (taking corrective action if possible).

If you specify some amount of mails, you may like to put a large number
for TIMEOUT, so that before calling it quit, xstress will wait to see
if the server responds.

Example attachment and body files

The bin directory contains some example body and attachment files.
The default configuration file xstress.conf lists these files to be
used as body and attachment for the mail.

Body Files:
body1.txt - Plain Text file
body2.txt - Plain Text file

Attachment Files:
xstress.jpg - Image file
attach1.htm - HTML File


* The source code has been tested with GNU C/C++ compiler version 4.1.2 20070502

Requirements:

· GNU C/C++ Compiler and libc

What's New in This Release:

· A critical bug fix that that caused connection with the SMTP server to drop
· Compilation warnings fixed
· Some minor optimizations

last updated on:
February 19th, 2009, 15:04 GMT
price:
FREE!
homepage:
xk0der.wordpress.com
license type:
GPL (GNU General Public License) 
developed by:
Amit Singh
category:
ROOT \ Communications \ Email
xstress
Download Button

In a hurry? Add it to your Download Basket!

user rating 36

4.3/5
 

0/5

Rate it!
2 Screenshots
xstress
What's New in This Release:
  • Fixed : mails were not sent if Auth Info not specified.
  • Fixed : At times MAIL FROM was being sent without an address.
  • Re-factored some code in sendmail.cc and thread.cc source file.
read full changelog

Add your review! 2 USER REVIEWS SO FAR

SUBMIT