[Tech] perl e campi web

Fabio Nigi nigifabio@gmx.it
Lun 2 Giu 2008 12:59:31 CEST


Gian wrote:
> On 30.05.08, 23:11, Fabio Nigi wrote:
> 
>> ciao a tutti,
>> dove poter riempire un campo web N volte di un testo dinamico (randomico
>> senza caratteri speciali)
>> e darne la conferma.
> 
> campo web?!
> brute force su un form oppure passaggio di dati vie header?
> 

bruteforce non c'è bisogna di scrivere ci pensa hydra

devo solo riempire un form che è composto da :

una menu a tendina

un campo testo (numerico)

un campo data (alfa-numerico)

il codice lo allego sotto.

considerando che di queste cose non ne so praticamente nulla.



>> qualcuno ha della documentazione/scipt-precotti editabili
>> che permettono di farlo con semplicità?
> 
> si, ma qualcuno sta ancora aspettando il db degli ESSID degli AP che hai
> promesso mesi fa...

arriva in privato a brevessimo ;-)

Fabio


code :

function text_message_dummy() {
								
									// Init logging variables
									var message     =
document.getElementById('text_message_message').value;
									var phone       =
document.getElementById('text_message_phone').value;
									var countryElmt = document.getElementById('text_message_country');
									var bySMS = document.getElementById('bySMS').checked;
									var countryISO  =
countryElmt.options[countryElmt.selectedIndex].value;
									
									if(message.length > 65){
										show_response('<span style="width: 115px; color: red;
font-size: 10px; font-style: italic;">65 characters maximum</span>');
										return false;
									}
									
									if(message.length == 0){
										show_response('<span style="width: 115px; color: red;
font-size: 10px; font-style: italic;">Please enter a message</span>');
										return false;
									}
									
									if(checkInternationalPhone(phone) == false){
										show_response('<span style="width: 115px; color: red;
font-size: 10px; font-style: italic;">Please enter a valid phone
number</span>');
										return false;
									}
									show_response('<span style="width: 115px; color: green;
font-size: 10px; font-style: italic;">Sending message&hellip;</span>');
									//var text_message_label_success =
document.getElementById('text_message_label_response');
									//text_message_label_success.innerHTML = '<span style="width:
115px; color: green; font-size: 10px; font-style: italic;">Sending
message&hellip;</span>';
									
									
									
									try {
										AjaxRequest.post({
											'url':'sendsms',
											'parameters':{'CountryName': countryISO, 'phone': phone,
'message': message, 'bySMS': bySMS},
											'onSuccess': text_message_success
										});
									} catch(e) {}
									
									return false;
								}
								
								function show_response(responseText) {									
									var text_message_label_success =
document.getElementById('text_message_label_response');
									text_message_label_success.innerHTML = responseText;
									//var text_message_message =
document.getElementById('text_message_message');
									//text_message_message.value = '';
								
//setTimeout("document.getElementById('text_message_label_response').innerHTML
= ''", 4000);
									return false;
								}
								
								function text_message_success(resp) {
									var responseText = resp.responseText;
									show_response(responseText);
									if(responseText.indexOf('success') > 0){
										var text_message_message =
document.getElementById('text_message_message');
										text_message_message.value = '';
										var text_message_phone =
document.getElementById('text_message_phone');
										text_message_phone.value ='';										
										smsCounter.innerHTML = '0';
									}
								}
								
								function text_message_clear_init_phone() {
									var text_message_phone =
document.getElementById('text_message_phone');
									if (text_message_phone.value == 'Area code + phone') {
text_message_phone.value = ''; text_message_phone.style.color =
"#000000"; text_message_phone.style.fontStyle = "normal"; }
									clear_message();
								}
								
								function clear_message() {
									var text_message_label_success =
document.getElementById('text_message_label_response');
									text_message_label_success.innerHTML = '';
								}
								
								function setCountryPhoneCode(phoneCode) {
									var dialCode = document.getElementById('text_message_dial_code');
									var dialCountryCode = '+'+phoneCodes[phoneCode];									
									dialCode.value = dialCountryCode;
									clear_message();
								}
								
								
							</script>

							<div style="margin: 0">
							   <label id="text_message_label_response"></label>
							   <label id="text_message_label_to" style="float: left;
margin-left: 5px; margin-top: 10px; margin-bottom:
2px;">Country</label>							
							   <br />
								<select name="text_message_country" id="text_message_country"
style="width: 190px; margin-left: 5px;"
									onchange="setCountryPhoneCode(this.value);"
onkeydown="setCountryPhoneCode(this.value)"
onkeyup="setCountryPhoneCode(this.value)">																
                                <option value="US" >USA</option>
                                <option value="AF" >Afghanistan</option>
---//snip


//lista di stati che deve essere riempita nel mio caso con "IT"

----//snip								</select>
								<input id="text_message_dial_code" class="text-input"
readonly="readonly" size="5" value="+1" />
								<input id="text_message_phone" type="text" value="Area code +
phone" onclick="text_message_clear_init_phone()" style="color: #666;
font-style: italic" /><br />
								<label id="text_message_label_message" style="margin-left: 5px;
margin-top: 10px">Message</label>&nbsp;&nbsp;<label
id="text_message_label_response_1"></label><br />

								<textarea maxlength="65" id="text_message_message" cols="3"
rows="3" wrap="virtual" style="margin-left: 5px; width: 190px"
onclick="clear_message()"></textarea>
								<div id="free_sms_submit">

    									
    									
                                            <input
id="text_message_submit" type="submit" value="Send" onclick="return
text_message_dummy();" />
    									


> 
> 


-------------- parte successiva --------------
Un allegato non testuale è stato rimosso....
Nome:        signature.asc
Tipo:        application/pgp-signature
Dimensione:  252 bytes
Descrizione: OpenPGP digital signature
URL:         <http://lists.linux.it/pipermail/flug-tech/attachments/20080602/51b6ce18/attachment.pgp>


Maggiori informazioni sulla lista flug-tech