Advertisement
yojimbos_law

latte thing that does work.

Oct 3rd, 2018
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. string latte_choice = visit_url("main.php?latte=1",false);
  2.  
  3.  
  4. //sample radio button html:
  5. // <input type="radio" name="l1" value="mUJjAC2DGpIGOyTVIE75KYnrSKC5HLLS0GaWGsBfWcRSdvYLdECFL5vFtPpDfrocSlU5MlFqMXE3UUNKQjJWU3NoT09EZz09"> Cinna- </td>
  6. //debugging.
  7. //print(latte_choice);
  8.  
  9. string[int][int] latte_radio_buttons = latte_choice.group_string("type=\"radio\"\\s?name=\"(l\\d+)\"\\s?value=\"([^\"]+)\">([^<]+)<");
  10. string[string] ingredient;
  11.  
  12. //farming latte:
  13. ingredient["l1"] = "Cajun";
  14. ingredient["l2"] = "rawhide";
  15. ingredient["l3"] = "with carrot";
  16. //debug latte:
  17. /*
  18. ingredient["l1"] = "Cinna";
  19. ingredient["l2"] = "vanilla";
  20. ingredient["l3"] = "with a hint of autumn";
  21. */
  22. string[string] obfuscated_value;
  23. foreach i in ingredient{
  24. foreach j in latte_radio_buttons{
  25. //debug.
  26. //print(j+","+k+": "+latte_radio_buttons[j][k]);
  27. if(obfuscated_value[i].length() > 0){
  28. break;
  29. }
  30. if(latte_radio_buttons[j][3].contains_text(ingredient[i]) && latte_radio_buttons[j][1] == i ){
  31. obfuscated_value[i] = latte_radio_buttons[j][2];
  32. }
  33.  
  34. }
  35. }
  36.  
  37. visit_url("choice.php?whichchoice=1329&option=1&pwd&l1="+obfuscated_value["l1"]+"&l2="+obfuscated_value["l2"]+"&l3="+obfuscated_value["l3"]);
  38.  
  39. //moar debug.
  40. /*
  41. print(ingredient["l1"]+": "+obfuscated_value["l1"]);
  42. print(ingredient["l2"]+": "+obfuscated_value["l2"]);
  43. print(ingredient["l3"]+": "+obfuscated_value["l3"]);
  44. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement