12.07.2013 Views

One-way Web Hacking

One-way Web Hacking

One-way Web Hacking

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Loop<br />

Field.ContentDisposition=C_D<br />

Field.FilePath=SFN<br />

Field.FileName=GFN(SFN)<br />

Field.ContentType=C_T<br />

Field.Length=FC.Length<br />

Set Field.Value=FC<br />

Fields.Add FFN,Field<br />

TCAEB=BTS(MidB(Binary,PCB+LenB(Boundary), 2))<br />

iLB=TCAEB="--"<br />

If Not iLB Then<br />

POB=PCB<br />

PCB=InStrB(POB + LenB(Boundary), Binary, Boundary)<br />

End If<br />

Set SeparateFields = Fields<br />

End Function<br />

Function GetHeadFields(ByVal Head, C_D, Name, FileName, C_T)<br />

C_D=LTrim(SeparateField(Head,"content-disposition:",";"))<br />

Name=(SeparateField(Head, "name=", ";"))<br />

If Left(Name, 1) = """" Then Name = Mid(Name, 2, Len(Name) - 2)<br />

FileName = (SeparateField(Head, "filename=", ";"))<br />

If Left(FileName, 1) = """" Then<br />

FileName = Mid(FileName, 2, Len(FileName) - 2)<br />

End If<br />

C_T = LTrim(SeparateField(Head, "content-type:", ";"))<br />

End Function<br />

Function SeparateField(From, ByVal sStart, ByVal sEnd)<br />

Dim PosB, PosE, sFrom

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!