Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by cyfer65

  1. Not vary good with regex expressions, the code doesnt work, i was just trying to match all the data between the the <form> and <table> tags but I cant seem to get it to work.. I think it needs to also include matching linefeeds or carriage returns in the (.*) brackets but I'm not familiar with this regex replace functions or variables.. var DIV = document.getElementsByTagName("div");for(i=0;i<DIV.length;i++){ DIV[i].innerHTML = DIV[i].innerHTML.replace(/\<form\>(.*)\<\/form\>/g, '');DIV[i].innerHTML = DIV[i].innerHTML.replace(/\<table\>(.*)\<\/table\>/g, '');}
  2. I need a lil help with a greasemonkey script im trying to make..I need it to take all the Forms in the source HTML <form>(.*)</form>And place them all before/above all the Tables in the HTML <table>(.*)</table>so originally it looks like this <div><table></table><form></form></div> I want to change it to this <div><form></form><table></table></div> How would I do this?
  3. is there anyway to terminate the connection or the curl execution right after the response headers are received..?
  4. I want to test server mem/disk caching settings/properties..The file is mp3Is what im wanting to do even possible though..?
  5. Is there any way using curl in php to send out a GET request for a file but not to download the file..?I know of the sending the HEAD request with the CURLOPT_NOBODY param...But I need to send the GET request without having to download the actual file back to my server.. Can this be done at all? are there any CURL Params to set to accomplish something this..?
  6. I have script that takes a POST request and executes a function based on the POST Vars that takes from 30-60 seconds to finish.. then does a Header('Location: XXX'); to a website.. Is there anyway to have the script forward to the site first then perform the time consuming function in the background without having the browser page stuck on loading for a 30-60 seconds..?
  7. cyfer65

    Array Assigning..?

    Is there an easier way to assign all array row values the same variable without having to specify each array row value like this.. $ARRAY[0] = $AAA;$ARRAY[1] = $AAA;$ARRAY[2] = $AAA; but instead have some way to to just say have a array with 100 rows and all values of each row = $AAAcan something like that be done, or do i have to specify the same value for every row from $ARRAY[0] to $ARRAY[100] ..?
  8. everything is occurring on one index.php file..when first visited the index.php echos out the html code and form.when the form is submitted the target is itself index.php - so the page just refreshes passing the $_POST array back to itself where there is php code to interpret the $_POST array and perform other functions accordingly.. But i need to switch out the input value of "AAA" to "111" in the $_POST array before it is read on the submit/refresh
  9. im not sure if your understanding what im wanting to do..? I have a form like this $AAA = "111"$BBB = "222"<form method="post"><input type="submit" name="AAA" value="AAA"/><br><input type="submit" name="BBB" value="BBB"/></form>What I'm wanting to do is, when one of the input buttons are pressed/submitted its value is replaced by a variable that is already set that corresponds the existing input value or name.So during the form submission before the page refreshes passing on the $_POST array, the input value of "AAA" needs to be switched out to "111" in the $_POST array..Is that possible at all..?
  10. not sure what code to put together though..?what code or function could be used to intercept a post before its transmitted to the next page..?
  11. so it cant be intercepted/changed before its submitted to the new page then..?
  12. would there be anyway for when the form is submitted to intercept/check the submitted value against an already set variable, then replace the existing input value with that variable like: $VALUE[XXX] = "ABC123";and you have a form input like:<input type="submit" value="XXX"/>so when its submitted the "XXX" value gets replaced with "ABC123"
  13. is that the only way to do a hidden data pass on form submit..?because i already new this method, thus why i asked if there was anyway to pass a variable/data on a form post without having it displayed in html source code..
  14. Are you just saying to use hidden inputs like:<input type="hidden" name="AAA" value="XXX"/>and using $_POST["AAA"] to get the "XXX" value..??
  15. Is there anyway to pass a variable/data on a form post without having it displayed in html source..?Like insert the value of an input right as the post occurs...So if $DATA = ABC123and you have a form input like:<input type="submit" id="1" name="AAA" value="XXX"/>Would there be anyway to tack on the $DATA = ABC123 to the end of the input value "XXX" when the form is submitted like "XXX-ABC123" ..?
  16. unshuffles a shuffled string derp!abc123 -> c3a1b2c3a1b2 -> abc123
  17. I know there is a PHP function to shuffle a string.But is there a function to unshuffle that string..?If not, how could accomplish a shuffle -> unshuffle string function..?
  18. But don't sessions require cookies to be enabled..?Isn't there some way to get like the Form Name or ID or something from the previous page where the Post is submitted from..?I dont really need the referrer, but rather just the query_string to be somehow transferred to a new tab without it showing in the Browsers URL..so say a post is made on website.com/AAAA it opens website.com in a new tab and the AAAA gets transferred and interpreted without being displayed in the browsers URL bar.. is there anyway to do that without session cookies or whatnot..?
  19. Is there any way to get the referring url/server_query from a Form Post made from my index.php to the same index.php that cant be spoofed at all..?
  20. how can i replace only one occurrence of a string in a main string if there are multiple occurrences of it..?if there are 3 occurrences in the main string how can I only replace the 2nd occurrence..?
  21. so then would that sample test code i just posted be safe then from any vulnerability of viewing the entire php source code..?
  22. can you explain that to me a lil more in detail please..?does file_get_contents() have to be used in my php file with unfiltered user input as the parameter or on someone elses php file that reads my php file..?kinda confused here.. This is just a basic index.php im using as a test - nothing is output to the viewer/user.it just reads itself and then replaces the AAA sting with whatever is entered into the Query_String as long as my password is in there too.now given that - how can I prevent anyone from viewing the complete php source code from beginning to end..?<?php$DATA = $_SERVER['QUERY_STRING'];If (stristr($DATA, "MY-PASSWORD")){$DATA = substr($DATA, 11);$FILE = file_get_contents('index.php');$TEXT = str_replace('AAA', $DATA, $FILE);//AAAfile_put_contents('index.php', $TEXT);}exit();?>
  • Create New...