Вверх ↑
Ответов: 411
Рейтинг: 13
#1: 2019-06-20 19:55:07 ЛС | профиль | цитата
Не загружается картинка на сервер, нет ответа от сервера, картинку отправляю, а в ответ тишина.
Add(MainForm,2953706,21,105)
{
Width=530
Height=529
WindowsState=2
Point(onClose)
link(onCreate,4138094:doEvent1,[(61,125)(61,111)])
link(onClose,4169119:del,[])
}
Add(HTTPClient,11518582,196,252)
{
URL="http://www.imagebam.com/"
UserAgent="Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
Referer="http://www.imagebam.com/"
link(onFinish,14997163:doEvent1,[])
}
Add(MultiElementEx,4169119,105,119)
{
}
BEGIN_SDK
Add(EditMultiEx,16512711,21,21)
{
WorkCount=#5:write|3:del|
link(write,3634544:doPart,[(95,27)(95,97)])
link(del,8467764:doDeleteValue,[(87,34)(87,160)])
}
Add(Registry,8467764,154,140)
{
HKey=1
Key="SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION\"
DataType=0
Point(doDeleteValue)
link(Data,12071228:Text,[])
link(Value,3634544:Part,[])
}
Add(Application,4084507,168,42)
{
}
Add(FilePartElm,3634544,168,91)
{
Point(Part)
link(onPart,8467764:doWrite,[(207,97)(207,125)(144,125)(144,153)])
link(FileName,4084507:AppFileName,[])
}
Add(VisualStrings,12071228,154,21)
{
Lines=#5:11001|
Width=46
}
END_SDK
Add(WebBrowser,9492360,245,98)
{
Width=514
Height=491
Align=5
URL=""
Silent=0
Point(PHandle)
Point(doFromText)
}
Add(Hub,4138094,70,105)
{
link(onEvent1,4169119:write,[(94,111)(94,125)])
link(onEvent2,10979458:doData,[(153,118)(153,104)])
}
Add(DoData,10979458,175,98)
{
Data=String(http://www.imagebam.com/)
}
Add(Button,11419334,140,252)
{
Left=5
Top=5
Width=80
Caption="Загрузить"
link(onClick,11518582:doLoadString,[])
}
Add(Memo,11496362,329,560)
{
Left=30
Top=260
Width=475
Height=210
ScrollBars=2
}
Add(BlockFind,6857384,301,259)
{
IncludeBlock=1
StartBlock="var base_url = ""
EndBlock="";"
link(onSearch,16269169:doString,[])
}
Add(FormatStr,16269169,357,259)
{
DataCount=4
Mask="%1/%2/%3/%4/0/1/"
Point(FString)
link(onFString,2820237:doEvent1,[])
link(Str2,3100803:Text,[])
link(Str3,408464:Text,[])
link(Str4,14389077:Text,[])
}
Add(VisualStrings,3100803,364,217)
{
Lines=#3:jpg|
}
Add(VisualStrings,408464,371,182)
{
Lines=#3:350|
}
Add(VisualStrings,14389077,378,147)
{
Lines=#4:crop|
}
Add(HTTPClient,6023390,196,483)
{
Method=1
UserAgent="Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
Referer="http://www.imagebam.com/"
FileField="file"
Point(UploadFile)
link(URL,16269169:FString,[(202,342)(363,342)])
link(onFinish,1978204:doEvent2,[(254,496)(254,573)])
link(UploadFile,14946849:Text,[])
}
Add(Hub,2820237,413,259)
{
OutCount=3
link(onEvent1,2953706:doCaption,[(439,265)(439,76)(13,76)(13,111)])
link(onEvent3,6023390:doLoadString,[(441,279)(441,427)(184,427)(184,489)])
}
Add(VisualStrings,14946849,210,441)
{
Lines=#68:C:\Users\Sersey\Desktop\Multi Image Upload\2018-6-7_20-21-26.803.jpg|
Width=102
}
Add(BlockFind,5283488,301,301)
{
@Hint=#4:UPID|
StartBlock="name="UPID""
EndBlock=""/>"
link(onSearch,3004918:doSearch,[])
AddHint(-90,7,41,13,@Hint)
}
Add(BlockFind,16187695,301,343)
{
@Hint=#3:sec|
StartBlock="name="sec""
EndBlock=""/>"
link(onSearch,15783820:doSearch,[])
AddHint(-80,10,32,13,@Hint)
}
Add(Hub,14997163,245,259)
{
OutCount=5
link(onEvent1,6857384:doSearch,[])
link(onEvent2,5283488:doSearch,[(280,272)(280,307)])
link(onEvent3,16187695:doSearch,[(280,279)(280,349)])
link(onEvent4,6741206:doString,[(275,286)(275,398)])
link(onEvent5,4019130:doTimer,[(271,293)(271,412)(130,412)(130,559)])
}
Add(BlockFind,3004918,371,301)
{
IncludeBlock=1
StartBlock="value=""
EndBlock="""
link(onSearch,7303803:doData,[])
}
Add(BlockFind,15783820,371,343)
{
IncludeBlock=1
StartBlock="value=""
EndBlock="""
link(onSearch,9402659:doData,[])
}
Add(EventFromData,9402659,469,343)
{
}
Add(EventFromData,7303803,462,301)
{
}
Add(FormatStr,6741206,462,392)
{
Mask="method=post\r\nUPID=%1&sec=%2"
Point(FString)
link(Str1,7303803:GetData,[])
link(Str2,9402659:GetData,[])
}
Add(HTTPClient,5389009,196,553)
{
URL="http://www.imagebam.com/sys/upload/done/"
Method=1
UserAgent="Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
Referer="http://www.imagebam.com/"
FileField="file"
SSLProtocols=1
Point(Headers)
link(onFinish,1978204:doEvent1,[])
link(Headers,6741206:FString,[(216,533)(468,533)])
}
Add(Timer,4019130,140,553)
{
Interval=15000
Enable=1
AutoStop=3
link(onTimer,5389009:doLoadString,[])
}
Add(Hub,1978204,280,560)
{
InCount=2
OutCount=1
link(onEvent1,11496362:doAdd,[])
}

Данные с Fiddler: Запрос на загрузку картинки
POST http://www.imagebam.com/sys/upload/flashsave/0/8e7nibrs63ewfqdw6nk8w9tv32psga7o/f61e2a099e4e254ddd59351bb7eda816/jpg/350/resize/0/1/ HTTP/1.1
Accept: text/*
Content-Type: multipart/form-data; boundary=----------ei4KM7gL6KM7KM7cH2ei4ei4cH2gL6
User-Agent: Shockwave Flash
Host: www.imagebam.com
Content-Length: 531473
Connection: Keep-Alive
Pragma: no-cache
Cookie: _тут куки

------------ei4KM7gL6KM7KM7cH2ei4ei4cH2gL6
Content-Disposition: form-data; name="Filename"

2018-6-7_20-29-9.479.jpg
------------ei4KM7gL6KM7KM7cH2ei4ei4cH2gL6
Content-Disposition: form-data; name="name"

2018-6-7_20-29-9.479.jpg
------------ei4KM7gL6KM7KM7cH2ei4ei4cH2gL6
Content-Disposition: form-data; name="file"; filename="2018-6-7_20-29-9.479.jpg"
Content-Type: application/octet-stream

Тут картинка, символы и буквы JFIF    C 
В схеме ссылка запроса формируется и остальные данные тоже

Теперь запрос на получение ссылок
POST http://www.imagebam.com/sys/upload/done/ HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */*
Referer: http://www.imagebam.com/
Accept-Language: ru-RU
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: www.imagebam.com
Content-Length: 74
Connection: Keep-Alive
Pragma: no-cache
Cookie: _ga=GA1.2.697164434.1561031310; _gid=GA1.2.735566100.1561031310; __utma=187550128.546316087.1561031310.1561039544.1561048218.25; __utmb=187550128; __utmz=187550128.1561031310.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); _gat=1; __utmc=187550128

UPID=8e7nibrs63ewfqdw6nk8w9tv32psga7o&sec=cb1df6406dcdbd8a595dfc38baf9ffb1
Для запроса UPID и sec в схеме получаю. Не приходят ответы от сервера, помогите разобраться, как правильно запрос с HTTPClient-а отправить. Распаковка gzip не помогает
карма: 4

0
Редактировалось 1 раз(а), последний 2019-06-20 19:57:36