xstress

xstress is a SMTP stress tester program.
Download

xstress Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Amit Singh
  • Publisher web site:
  • http://xk0der.wordpress.com

xstress Tags


xstress Description

xstress is a SMTP stress tester program. 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 mails1) TO address list2) FROM address list3) SUBJECT list4) list of BODY content files5) list of ATTACHMENT content filesxstress randomly makes a combination from the available list and sends mails to your SMTP server.Building binarySwitch user to root and type the following command from the directorywhere you have un-compressed the xstress source archive and run thefollowing command to build the xstress binary.# makeThe 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 cleanAlternatively you may run the build shell script by typing# ./buildwhich runs `make clean' first and then does a `make'Usage and command line optionsMove to the bin folder and type ./xstress to invoke the tool.Syntax: $ xstress 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 settingsConfiguration fileBy 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 theCONFIG section, TO section, SUBJECT section and FROM section arecompulsory.COMMENTS start with the hash (#) sign on the 'first column only'.Blank lines are ignored. The parser is not designed to handle extra spacesso don't play with them.Var = Value : will NOT workVar=Val : will work!Var=Val : will NOT workTO 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 thesefiles is used as the mail's body text.ATTACHMENT Sections contains list of (text) files which will beattached to the mails being sent out from xstress. The file list canprfixed by an optinal FILETYPE tag as followspath/to/file!typeThe exclamation sign (!) separates the attachment file name from the type.Following types ares understood by xstress.1) bin - binary fileseg: MS Word document, compressed archives, MP3 files etc.** Whenever in doubt use this type2) plain - Plain text fileseg: Source Code, Text files, scripts etc.3) html - HTML source4) image - Image filesAny image file, treated as `bin' but disposition is inline.CONFIG Section contains variables that configure the mail serverto be used, number of threads and the like.Variables understood by xstress are described belowSERVER - Specify the SMTP Mail Server's IP here.Example: 172.16.0.1PORT - Specify the SMTP Mail Server's port number here.This is typically 25.THREADS - Specify number of threads to spwanThe value can range from 1 to 100A Value of 15 is found to be optimum forlow end PCs.A thread represents one connection to the Mails Server.Higher the number of threads, more mails per secondcan be sent by xstress, but the machine on whichxstress will be running might becomeunresponsive.MAILS_PER_THREAD - Speciy the number of mails to be sent perthread. The value for this can range from0 to 60,000.value of ZERO means unlimited number of mails perthread. You have to use ^C (control + C) to quitxstress if you use ZERO for this variable.LOG_FILE - Set the log file to be used if you dont want to use thedefault log file 'xstress.log'TIMEOUT - Specify connection timeout in seconds after which xstresswill give up.TIP: If you are specifying ZERO for MAILS_PER_THREAD, put a lowvalue here, as you would not like xstress to wait for too long beforeit sends a new mail. A low will timeout that session sonner and xstresswill try sending a new mail (taking corrective action if possible).If you specify some amount of mails, you may like to put a large numberfor TIMEOUT, so that before calling it quit, xstress will wait to seeif the server responds.Example attachment and body filesThe bin directory contains some example body and attachment files.The default configuration file xstress.conf lists these files to beused as body and attachment for the mail.Body Files:body1.txt - Plain Text filebody2.txt - Plain Text fileAttachment Files:xstress.jpg - Image fileattach1.htm - HTML File* The source code has been tested with GNU C/C++ compiler version 4.1.2 20070502Requirements:· GNU C/C++ Compiler and libcWhat'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 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. · Thanks to George Stathakopoulos for testing out the 0.37 beta release.


xstress Related Software