Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string latte_choice = visit_url("main.php?latte=1",false);
- //sample radio button html:
- // <input type="radio" name="l1" value="mUJjAC2DGpIGOyTVIE75KYnrSKC5HLLS0GaWGsBfWcRSdvYLdECFL5vFtPpDfrocSlU5MlFqMXE3UUNKQjJWU3NoT09EZz09"> Cinna- </td>
- //debugging.
- //print(latte_choice);
- string[int][int] latte_radio_buttons = latte_choice.group_string("type=\"radio\"\\s?name=\"(l\\d+)\"\\s?value=\"([^\"]+)\">([^<]+)<");
- string[string] ingredient;
- //farming latte:
- ingredient["l1"] = "Cajun";
- ingredient["l2"] = "rawhide";
- ingredient["l3"] = "with carrot";
- //debug latte:
- /*
- ingredient["l1"] = "Cinna";
- ingredient["l2"] = "vanilla";
- ingredient["l3"] = "with a hint of autumn";
- */
- string[string] obfuscated_value;
- foreach i in ingredient{
- foreach j in latte_radio_buttons{
- //debug.
- //print(j+","+k+": "+latte_radio_buttons[j][k]);
- if(obfuscated_value[i].length() > 0){
- break;
- }
- if(latte_radio_buttons[j][3].contains_text(ingredient[i]) && latte_radio_buttons[j][1] == i ){
- obfuscated_value[i] = latte_radio_buttons[j][2];
- }
- }
- }
- visit_url("choice.php?whichchoice=1329&option=1&pwd&l1="+obfuscated_value["l1"]+"&l2="+obfuscated_value["l2"]+"&l3="+obfuscated_value["l3"]);
- //moar debug.
- /*
- print(ingredient["l1"]+": "+obfuscated_value["l1"]);
- print(ingredient["l2"]+": "+obfuscated_value["l2"]);
- print(ingredient["l3"]+": "+obfuscated_value["l3"]);
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement