Thursday, September 22, 2011

Usage

When writing code from scratch, all bit is known... every condition, branch, loop. Testing your own code is simple too.  But for another tester, and later on for user job is hard.  And thats why is needed usage instructions.

Talking about wwwPoster, first of all You need configure settings.ini file. Ini file basic structure is as follows:

[section]
data=value
data=value
[section]
data=value
data=value

wwwPoster settings.ini file section names is Location<locationnumber>,
Scan, ScanDir<dirnumber>. Currently only Location<locationnumber> is used.
Location section you can have as much as want, bun location number must be unicue. Location
number will be used for determining where you want to post files.
Location section data consists of:

LocationName= name of location, currently not used
LoginField= login form username field naming
LoginValue= username
PassField= login form password filed naming
PassValue= password
LoginPage= login page to authenticate
AuthPage= page to check authentitacion
Adress= server adress to post files
Port= server port, usualy 80
Host= server host
UploadPage= file porcessing page, usualy file uploading form directs here
Workdir= server directory consisting all required pages
Authenticate= 1 if is needed to authenticate, else 0
AuthRedir= 1 if after auththentication server automaticaly redirects, else 0
timeout= server timeout in ms for one chunk of data. currently chunk consists of 32Kb
DataCount= adtional data field count, like buttons, input text and etc.
DataField1= adtional data field name 1
DataValue1= adtional data field data 1
DataField2= adtional data field name 2
DataValue2= adtional data field data 2 and etc.
prevloc= currently not used
nextloc= currently not used

my settings.ini used for test with local server looks like this:

[Location1]
LocationName=localhost
LoginField=login
LoginValue=Admin
PassField=pass
PassValue=NotForU
LoginPage=login.php
AuthPage=user.php
Adress=localhost
Port=80
Host=
UploadPage=filepost.php
Workdir=/vietine/
Authenticate=1
AuthRedir=1
timeout=100
DataCount=2
DataField1=aditionaldata
DataValue1=cia yra aditional data
DataField2=ok
DataValue2=Post
prevloc=
nextloc=

So, after configuring settings.ini, file posting is very simple
./wwwPoster -loc <locnum> <filetopost>
for Linux and
wwwPoster -loc <locnum> <filetopost>
for windows

No comments:

Post a Comment