Leser: 19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
hxxp://192.168.0.222/bm/uploadpr.php>forms
Form [1]
POST hxxp://192.168.0.222/bm/uploadpr.php (multipart/form-data)
title= (text)
theimage[]= (file)
theimage[]= (file)
theimage[]= (file)
theimage[]= (file)
theimage[]= (file)
theimage[]= (file)
duration=15 (option)
keywords= (text)
extra5= (text)
extra6= (text)
notify=yes (option)
userid=x2xxx (hidden readonly)
process=do (hidden readonly)
category=45 (hidden readonly)
MAX_FILE_SIZE=2000000 (hidden readonly)
<NONAME>=Abschicken (submit)
Form [2]
GET hxxp://192.168.0.222/bm/index.php
langid=7 (option)
Form [3]
POST http://192.168.0.222/forum/profile.php?do=dst [dstform]
s= (hidden readonly)
securitytoken=2b99a88985bc7a74 (hidden readonly)
do=dst (hidden readonly)
hxxp://192.168.0.222/bm/uploadpr.php>
Quote$mech->set_fields( $name => $value ... )
This method sets multiple fields of the current form. It takes a list of field name and value pairs. If there is more than one field with the same name, the first one found is set. If you want to select which of the duplicate field to set, use a value which is an anonymous array which has the field value and its number as the 2 elements.
The fields are numbered from 1.
QuoteIf the field is of type file (file upload field), the value is always cleared to prevent remote sites from downloading your local files. To upload a file, specify its file name explicitly.
{ local $^W; $agent->current_form->value('theimage[]', '/home/zion2k/Bilder/bild1.jpg'); };
1 2 3
{ local $^W; $agent->current_form->value(['theimage[]',1], '/home/zion2k/Bilder/bild1.jpg'); }; { local $^W; $agent->current_form->value(['theimage[]',2], '/home/zion2k/Bilder/bild2.jpg'); }; { local $^W; $agent->current_form->value(['theimage[]',3], '/home/zion2k/Bilder/bild3.jpg'); };
$agent->current_form->param( 'theimage[]', ['/home/zion2k/Bilder/bild1.jpg','/home/zion2k/Bilder/bild2.jpg','/home/zion2k/Bilder/bild3.jpg'] )