Pre-Alpha version can be now downloaded:
bynaries for windows:
http://sourceforge.net/projects/wwwposter/files/wwwPoster-0.1.1/wwwPoster-bin/wwwPoster-bin-win.zip/download
bynaries for linux:
http://sourceforge.net/projects/wwwposter/files/wwwPoster-0.1.1/wwwPoster-bin/wwwPoster-bin-linux.tar.gz/download
source code:
http://sourceforge.net/projects/wwwposter/files/wwwPoster-0.1.1/wwwPoster-src/wwwPoster-src.zip/download
--Installation--
Just download and unarchyvate using for favorite archive manager like zip, rar or etc.
--Compiling code--
For compiling code You'll need Lazarus IDE or Fpc... main file is ltclient.lpi
Friday, September 23, 2011
Http protocol explained 1
All internet structure is build on two protocols: Tcp/ip and upd. Last one by itself don't ensure connection integrity, so it isn't used very often. There are many libraries for data sending over internet using TPC/IP, so I don't discus it in details. TCP/IP basics is as follows:
1. client opens socket and sends connection initiation data to server
2. server opens connection socket and keeps it open for specific ip
3. client and server exchange data
4. client or server sends connection closing string
5. client and server closes socket
Talking about http protocols, they uses TPC/IP for every byte exchange. And best part of it - all data is human readable... Like bigger part of all, non-encripted, higher level internet protocols. Don't believe? Just take any telnet terminal, connect to google.com using port 80 hit <enter>, type "GET /index.html" without coutes and hit enter again.
You should get response similar to this:
GET index.html
HTTP/1.0 302 Found
Location: http://www.google.com/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Fri, 23 Sep 2011 16:34:11 GMT
Server: sffe
Content-Length: 219
X-XSS-Protection: 1; mode=block
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<T
ITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HR
EF="http://www.google.com/">here</A>.
</BODY></HTML>
section between <HTML> and </HTML> looks familiar? rest of data is html headers
1. client opens socket and sends connection initiation data to server
2. server opens connection socket and keeps it open for specific ip
3. client and server exchange data
4. client or server sends connection closing string
5. client and server closes socket
Talking about http protocols, they uses TPC/IP for every byte exchange. And best part of it - all data is human readable... Like bigger part of all, non-encripted, higher level internet protocols. Don't believe? Just take any telnet terminal, connect to google.com using port 80 hit <enter>, type "GET /index.html" without coutes and hit enter again.
You should get response similar to this:
GET index.html
HTTP/1.0 302 Found
Location: http://www.google.com/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Fri, 23 Sep 2011 16:34:11 GMT
Server: sffe
Content-Length: 219
X-XSS-Protection: 1; mode=block
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<T
ITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HR
EF="http://www.google.com/">here</A>.
</BODY></HTML>
section between <HTML> and </HTML> looks familiar? rest of data is html headers
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
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
Tuesday, September 20, 2011
First byte
There are mechanisms to upload data to http server. Simplest - method GET. Using this method, we actually add custom string to address, like running executable with params. But there is drawback - data size is limited to small amount.
Another method - POST. And that's tricky... there are special formats, headers and etc. But it's possible to post large amounts of data.
For my software development, I found some useful http protocol explanations and examples:
http://chxo.com/be2/20050724_93bf.html
http://www.http.header.free.fr/http.html
http://www.jmarshall.com/easy/http/
I'm big fan of open source, so for compiling the code, I use Lazarus IDE and FPC compiler and as core TCP/IP protocol implementations - lnet package for lazarus
pre-alpha version of code can be found at Sourceforge
Another method - POST. And that's tricky... there are special formats, headers and etc. But it's possible to post large amounts of data.
For my software development, I found some useful http protocol explanations and examples:
http://chxo.com/be2/20050724_93bf.html
http://www.http.header.free.fr/http.html
http://www.jmarshall.com/easy/http/
I'm big fan of open source, so for compiling the code, I use Lazarus IDE and FPC compiler and as core TCP/IP protocol implementations - lnet package for lazarus
pre-alpha version of code can be found at Sourceforge
Monday, September 19, 2011
Starting project
While ago, I realized a need of simple file posting to web client. Yes, there are a lot of ftp clients over web. But I need something different… Posting files via fpt is ok, but when you need process those files in server, problem occurs.
Solution is, but… In system like that, there is need of writing a cron job. And thats not posible everywhere. Another solution – recreating all of yours system to post files via http, and let web server process those files.
After some research, I figured out, there is no effective, free and simple client to achieve this. I think, I’ve got some code to do this.
Solution is, but… In system like that, there is need of writing a cron job. And thats not posible everywhere. Another solution – recreating all of yours system to post files via http, and let web server process those files.
After some research, I figured out, there is no effective, free and simple client to achieve this. I think, I’ve got some code to do this.
Subscribe to:
Posts (Atom)