Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var post_to_url = function(path, params, method) {
- var openWindow = window.open(path);
- method = method || "post";
- var form = openWindow.document.createElement("form");
- form.setAttribute("method", method);
- form.setAttribute("action", path);
- for(var key in params) {
- var hiddenField = document.createElement("input");
- hiddenField.setAttribute("type", "hidden");
- hiddenField.setAttribute("name", key);
- hiddenField.setAttribute("value", params[key]);
- form.appendChild(hiddenField);
- }
- openWindow.document.body.appendChild(form);
- form.submit();
- };
- post_to_url(
- 'http://www.chronopost.fr/transport-express/livraison-colis/engineName/search/accueil/suivi',
- {search:'test'});
- })()
- (function(){
- var post_to_url = function(path, params, method) {
- method = method || "post";
- var form = window.document.createElement("form");
- form.setAttribute("method", method);
- form.setAttribute("action", path);
- for(var key in params) {
- var hiddenField = document.createElement("input");
- hiddenField.setAttribute("type", "hidden");
- hiddenField.setAttribute("name", key);
- hiddenField.setAttribute("value", params[key]);
- form.appendChild(hiddenField);
- }
- window.document.body.appendChild(form);
- form.submit();
- };
- post_to_url(
- 'http://192.168.0.1/goform/login',
- {loginPassword:'password',loginUsername:'admin'});
- })()
- javascript:'<html><body onload="document.forms[0].submit()"><form action="http://www.example.com" method="POST"><input name="whatever" value="whatever" type="hidden"></form></body></html>'
- file:///C:/getToPost?name1=value1&name2=value2#http://url.com/service
- <html><body><script>
- function dopost() {
- var form = document.createElement("form");
- form.setAttribute("method", "post");
- form.setAttribute("action", har["request"]["url"]);
- var params = har["request"]["postData"]["params"];
- for(var e in params) {
- var hiddenField = document.createElement("input");
- hiddenField.setAttribute("type", "hidden");
- hiddenField.setAttribute("name", params[e]["name"]);
- hiddenField.setAttribute("value", params[e]["value"]);
- form.appendChild(hiddenField);
- }
- document.body.appendChild(form);
- form.submit();
- }
- window.onload=dopost;
- var har=
- //-----PASTE HERE------
- </script>
- </body></html>
- javascript:'
- <html><body%20onload="document.forms[0].submit()">
- <form%20action="https://wwwapps.ups.com/WebTracking/track"%20method="POST">
- <input%20name="trackNums"%20value="%s"%20type="hidden">
- <input%20name="track.x"%20value="anything"%20type="hidden">
- </form>
- </body></html>'
Add Comment
Please, Sign In to add comment