I have log file which looks like below:
--f15a0000-A--
[30/Aug/2018:14:06:33 +0200] W4fdyYHC0Xb8YDuIqk5YQgAAAD0 127.0.0.1 55454 127.0.0.1 80
--f15a0000-B--
GET /FormValidation/page1.php HTTP/1.1
Host: localhost
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://localhost/FormValidation/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
tanuser: 00198343
--f15a0000-F--
HTTP/1.1 200 OK
X-Powered-By: PHP/5.6.35
Content-Length: 851
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
--f15a0000-Z--
--bb410000-A--
[30/Aug/2018:14:06:37 +0200] W4fdzYHC0Xb8YDuIqk5YQwAAAD0 127.0.0.1 55454 127.0.0.1 80
--bb410000-B--
POST /FormValidation/validation.php HTTP/1.1
Host: localhost
Connection: keep-alive
Content-Length: 33
Accept: */*
Origin: http://localhost
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://localhost/FormValidation/page1.php
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
tanuser: 00198343
--bb410000-C--
name1=test&email1=ssn%40gmail.com
--bb410000-F--
HTTP/1.1 200 OK
X-Powered-By: PHP/5.6.35
Content-Length: 17
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
--bb410000-Z--
I want to build an array containing one block per position.
Ex-ex:
array[0][‘rawdata’]
contains the first block from --f15a0000-A-- to --f15a0000-Z--
,
array[1][‘rawdata’]
contains the second block from --bb410000-A-- to --bb410000-Z--
.
Can anyone please help me how to do that?