i have an issue. i have this piece of code:
<html>
<body>
<form action="https://testsp.eu/sites/SC1/0a18c942-c443-4d91-954b-e6a2bf6b6061/_layouts/15/listform.aspx">
<input type="hidden" name="PageType" value="4" />
<input type="hidden" name="ListId" value="{F783213B-D85D-4580-A48D-3B7650F39970}" />
<input type="hidden" name="ID" value="429x07ec<script>alert(1)</script>c6lv0" />
<input type="hidden" name="ContentTypeID" value="0x0101009780EDAE3CDE424E865934F078F59B4E00B67EBEA1D4DD80439046916AAD0BBD4C" />
<input type="hidden" name="Source" value="https://testsp.reply.eu/sites/SC1/0a18c942-c443-4d91-954b-e6a2bf6b6061/Attachments/Forms/AllItems.aspx?RootFolder=Attachments%2Ftesting%2Dvia%2Dvpn%2Dopen%2Dedit%2Dand%2Dsave%2Dfiles%2Don%2Dtaamy%2Dnew%2Dfeature" />
<input type="hidden" name="RootFolder" value="Attachments/testing-via-vpn-open-edit-and-save-files-on-tammy-new-feature" />
<input type="hidden" name="AjaxDelta" value="1" />
<input type="hidden" name="isStartPlt1" value="1455724318260" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
for make it work i have the use the following header http:
Pragma: SharePointAjaxDelta=|SITES|SC1|0A18C942-C443-4D91-954B-E6A2BF6B6261:|SITES|SC1|_CATALOGS|MASTERPAGE|TT.MASTER:1.15.0.0.0.15.0.4763.1000.2.FALSE.:en-US:en-US:RW');
Anyone have an idea how i can request that html page with the header "pragma"?
Thanks in advance
Related
I'm testing cardstream payment gateway with sandbox details. I tried to change redirectURL. when I change it I got below error. if I keep it with "https://www.merchant.com/payment/" , it is working.
<html>
<head>
<script src="https://gateway.cardstream.com/sdk/web/v1/js/hostedforms.min.js"></script>
</head>
<body>
<form name="payment-form" method="post" action="https://gateway.cardstream.com/hosted/" data-hostedform-modal>
<input type="hidden" name="merchantID" value="100001" />
<input type="hidden" name="action" value="SALE" />
<input type="hidden" name="type" value="1" />
<input type="hidden" name="currencyCode" value="826" />
<input type="hidden" name="countryCode" value="826" />
<input type="hidden" name="amount" value="1001" />
<input type="hidden" name="orderRef" value="Test purchase" />
<input type="hidden" name="redirectURL" value="https://www.merchant.com/payment/" />
<input type="hidden" name="signature" value="07599ef4cdb2e26cb2bf34a9c65190a7ce82494bc1df144c3bb0d20ee2655d8278dc663b2b0421ef12b8f081e821151bb4c644277c5d65b5523a96539b53b5aa" />
<input type="submit" value="Pay Now">
</form>
<script>
var form = new window.hostedForms.classes.Form(document.forms[0]);
</script>
</body>
</html>
In this page : page.php?id=value
I've this html's code:
<form action="" method="get">
<input type="text" name="key" />
<input type="submit" name="send />
</form>
It's redirect me to: page.php?key=value , i want to redirect to: page.php?id=value&key=value , how i can do it? I must redirect it to this page with PHP ?
simply,
<form action="page.php" method="get">
<input type="hidden" name="id" value="<?php echo $value ?>">
<input type="text" name="key" />
<input type="submit" name="send" />
</form>
You can have the id as a hidden input in your form
<form action="" method="get">
<input type="hidden" value="<?php echo $my_id; /*Suppose this variable contain your value */ ?>" name="id" />
<input type="text" name="key" />
<input type="submit" name="send" />
</form>
put everything you want on the next page in your form:
<form action="page.php" method="get">
<input type="text" name="id" value="<?php echo $_REQUEST['id'];?>" />
<input type="text" name="key" />
<input type="submit" name="send />
</form>
Really though, you should be using POST to send data, and the above code is NOT secure (allows anything in a url to easily end up in a form that could create some sql injection or XSS type issues.
You need to have the form's action set to the page you want it to submit to. If it is blank it will just submit to the same page.
<form action="page.php?id=value&key=value" method="get">
<input type="text" name="key" />
<input type="submit" name="send />
</form>
I have to submit this form to a payment processing gateway on my PHP page. All the credit card payment information will be taken on the next screen but the gateway needs the "HostedKey" and "Gateway_ID" need to be invisible from public code view as well.
<form action="nextpage.php" method ="POST" target="_blank">
Patient Account Number:
<input type="text" name="CustRefID" id="CustRefID">
<input type="hidden" name="HostedKey" id="HostedKey" value="ZZZZZZ" />
<input type="hidden" name="Gateway_ID" id="Gateway_ID" value="XXXXXX" />
<input type="hidden" name="IndustryCode" id="IndustryCode" value="2" />
<input type="hidden" name="Amount" id="Amount" value="" />
<input type="hidden" name="RecurringType" id="RecurringType" value="N" />
<input type="hidden" name="RecurringAmount" id="RecurringAmount" value="" />
<input type="hidden" name="CURL" id="CURL" value="back to my site" />
<input type="hidden" name="AVSRequired" id="AVSRequired" value="Y"/>
<input type="hidden" name="CVV2Required" id="CVV2Required"value="Y"/>
<input type="hidden" name="EmailRequired" id="EmailRequired" value="Y"/>
<input type="hidden" name="PostRspMsg" id="PostRspMsg" value="Y"/>
<input type="hidden" name="SECCode" id="SECCode" value="1" />
<input type="hidden" name="Descriptor" id="Descriptor" value="Online" />
<input type="Submit" name="Submit" id="Submit" value="Pay Online Now" />
</form>
I tried something like this. It hid the Key and ID but the form did not pass on the hidden session variables.
<strong>Patient Account Number: </strong>
<form action="nextpage.php" method"post">
<input type="text" name="CustRefID"/>
<input type="hidden" name="HostedKey" id="HostedKey" value="" />
<input type="hidden" name="Gateway_ID" value="<?php ($Gateway_ID); ?>" />
<input type="hidden" name="HostedKey" value="<?php ($HostedKey); ?>" />
<input type="submit" name="Submit" value="Submit" />
</form>
<?php
if (isset($_POST['Submit']))
{ $_session['CustRefID'] = $_POST['CustRefID'];}
{ $_session['HostedKey'] = $_POST['xxxxxx'];}
{ $_session['Gateway_ID'] = "zzzzzz";}
?>
<strong><? echo $_session['CustRefID'];?></strong>
Any help would be great. My programmer is out sick...
You have repetition in your HTML. Change it to this:
<input type="hidden" name="Gateway_ID" value="<?php ($Gateway_ID); ?>" />
<input type="hidden" name="HostedKey" value="<?php ($HostedKey); ?>" />
2. You didn't specify what POST info should go in the SESSION. Change it to this:
{
$_SESSION['CustRefID'] = $_POST['CustRefID'];
$_SESSION['HostedKey'] = $_POST['HostedKey'];
$_SESSION['Gateway_ID'] = $_POST['HostedKey'];
}
My form is generating an error when I use:
<input type="hidden" name="total_amount" value="<?php=$_POST['total_amount']?>" />
however it works fine when I use:
<input type="hidden" name="total_amount" value="<?=$_POST['total_amount']?>" />
I thought it was insecure to use <?= instead of <?php.
Here is the complete form:
<form name="save_file" action="cyprus_funds_transfer.php" method="post" enctype="multipart/form-data">
<? if($_POST['value_type'] == 1) {?>
<input type="hidden" name="amount" value="<?php=$_POST['account_number']?>" />
<input type="hidden" name="value_type" value="1" />
<input type="hidden" name="total_amount" value="<?php=$_POST['total_amount']?>" />
<? } else { ?>
<input type="hidden" name="amount" value="<?php=$_POST['amount']?>" />
<input type="hidden" name="value_type" value="0" />
<? } ?>
<input type="hidden" name="to" value="<?php=$_POST['send_to']?>" />
<input type="hidden" name="from" value="<?php=$_POST['send_from']?>" />
<input type="hidden" name="message" value="<?php=$_POST['message']?>" />
<input type="hidden" name="mode" value="save" />
<input type="hidden" name="order_id" value="<?php=$order_id?>" />
<input type="hidden" name="email_id" value="<?php=$_POST['email_id']?>" />
</form>
This is wrong way
<?php=$_POST['send_to']?>
this is correct way
<?=$_POST['send_to']?> is similar to <?php echo $_POST['send_to']; ?>
Codepad
Try to replace
<?php=$_POST['send_to'];?>
to this
<?=$_POST['send_to'];?>
or with this
<?php echo $_POST['send_to'];?>
Hello I need to pull out the value of the input that has the name ending in "message" and replace the whole thing with the match. It needs to be a replace. any ideas what the regex is for this?
Thank you for the help.. Cheers -Jeremy
I have tried alot and this is the last one
patteren
/.*?(message" value="(.*?)").*?/is
replacement
$2
wanting
The value specified for "Email" is already in use by another registered user
in
<input type="hidden" name="cntnt01message" value="The value specified for "Email" is already in use by another registered user" />
for this content
<form id="cntnt01moduleform_1" method="post" action="http://www..com/account/registration.html" class="cms_form">
<div class="hidden">
<input type="hidden" name="mact" value="SelfRegistration,cntnt01,default,0" />
<input type="hidden" name="cntnt01returnid" value="60" />
<input type="hidden" name="cntnt01assign" value="CONT" />
<input type="hidden" name="cntnt01returnid" value="60" />
<input type="hidden" name="cntnt01input_username" value="s" />
<input type="hidden" name="cntnt01input_Salon" value="s" />
<input type="hidden" name="cntnt01input_Hairstylist" value="s" />
<input type="hidden" name="cntnt01input_email" value="s#cableone.net" />
<input type="hidden" name="cntnt01input_email_again" value="s#cableone.net" />
<input type="hidden" name="cntnt01input_Firstname" value="s" />
<input type="hidden" name="cntnt01input_Lastname" value="Bass" />
<input type="hidden" name="cntnt01input_phone" value="208-s-s" />
<input type="hidden" name="cntnt01input_Street" value="s21st ave" />
<input type="hidden" name="cntnt01input_city" value="s" />
<input type="hidden" name="cntnt01input_state" value="Idaho" />
<input type="hidden" name="cntnt01input_zip" value="s" />
<input type="hidden" name="cntnt01input_Description" value="" />
<input type="hidden" name="cntnt01input_services" value="Color,Perm/Relaxer,SisterlocksĀ®,Braiding" />
<input type="hidden" name="cntnt01orig_url" value="http://www..com/account/registration.html?mact=SelfRegistration,cntnt01,default,0&cntnt01returnid=60&cntnt01group=Platinum&cntnt01pkg=4" />
<input type="hidden" name="cntnt01group_id" value="4" />
<input type="hidden" name="cntnt01pkg" value="4" />
<input type="hidden" name="cntnt01submit
" value="" />
<input type="hidden" name="cntnt01error" value="1" />
<input type="hidden" name="cntnt01message" value="The value specified for "Email" is already in use by another registered user" />
</div>
You're looking for .? (0 or 1 of any character except a new line). I think you should look for [^"]+ i.e.: /message" value="([^"]+)"/is and replace with $1 (not sure why the other brackets are there unless that's for something else).