get

PHP GET variable array injection

*爱你&永不变心* 提交于 2020-01-12 13:05:48
问题 I've recently learned that it's possible to inject arrays into PHP GET variables to perform code execution? .php?a[]=asd&a[]=asdasd&b[]=$a That was the example I was given. I have no idea how it works and was wondering if this is even possible? 回答1: PHP will parse the query string, and inject those values in the $_GET super-global array (same for $_POST if this was done in a form using POST, btw) . In your case, the $_GET array will contain this : array 'a' => array 0 => string 'asd' (length

How to remove GET parameters from url with htaccess?

喜夏-厌秋 提交于 2020-01-11 13:30:49
问题 My website do not use any GET parameters except on one page. Nonetheless, I can see that Google managed to index a bunch of my pages with GET parameters. This is not great for SEO (duplicate content)... So I'm trying to edit my .htaccess to do 301 redirects between all urls with GET parameters to url without GET parameters (except for one url). Some examples: example.com/?foo=42 => example.com/ example.com/about?bar=42 => example.com/about example.com/r.php?foobar=42 => the url r.php should

Get thread start address

佐手、 提交于 2020-01-11 11:19:08
问题 I'm writing a process viewer, its 99% complete, I just need get the start address of a process' thread, but I don't know how do it. Can anyone help-me? :/ Thx 回答1: You can use the NtQueryInformationThread function passing the ThreadQuerySetWin32StartAddress value of the THREAD_INFORMATION_CLASS enumeration as parameter. check this sample app {$APPTYPE CONSOLE} {$R *.res} uses TlHelp32, Windows, SysUtils; const THREAD_QUERY_INFORMATION = $0040; STATUS_SUCCESS = $00000000;

Replacing backslash with another symbol in PHP

倖福魔咒の 提交于 2020-01-11 09:51:34
问题 Been struggling with replacing a backslash by another symbol such as '.-.' just to indicate the position of backslashes as I could not send a string such as 'C\xampp\etc.' through url as GET variable so I thought I'd first replace the backslashes in that string by another symbol, then send through url, and then replace them back to backslashes in the PHP file that handles it. Though would there be a better way to send such strings through url? Because when I try a script such as: $tmp_name =

Sending a large parametrized data set as a GET request

十年热恋 提交于 2020-01-11 09:22:06
问题 What's the best way to send a large data set via a GET request. I cannot use POST because of some design limitations. I can use jQuery or any other library, sizzle is preferable. I have a complex data set that has nestings within it, and json fits the bill well. Thanks for your help. 回答1: GET requests shouldn't exceed 1-4 kilobytes in size due to browser and server limitations. You would have to split your request in chunks to do this. If the data comes from a form, you could, for example

AJAX and NS_ERROR_DOM_BAD_URI error

无人久伴 提交于 2020-01-11 08:32:07
问题 I have been having the following problem, i think it's probably due to the fact that my approach may be misguided, but hopefully with your help i can sort this out! Basically, for my site i have a search provider (who has been paid, so i am not breaking any terms of use). When the search form is subbmitted i am directed to their domain where the results are displayed. Whilst i can customise the look of the returned results, there is only so far i can take this, and will never get it fitting

How to pass GET and POST data to the php executable?

微笑、不失礼 提交于 2020-01-11 03:06:14
问题 I am writing a web server in C# and I'm trying to add support for PHP. I have it mostly working, except I don't know how to past GET and POST data to the PHP executable when i pass the file to it. I've been testing with GET since I haven't gotten to getting POST requests handled on the server, and I have the string of the arguments that gets passed separated, but I don't know how to feed the information to the php parser. Some tips would be appreciated. 回答1: For GET: The Easy Way (That i've

hide variables passed in URL

删除回忆录丶 提交于 2020-01-11 02:23:45
问题 We've been working on a web application and we've just about got it finished up, but there's one thing that bothering us (although by no means is it going to stop production.) When we call one of the pages (index.html), we sometimes have to pass it a variable in the URL (searchid). So we get a page like http://domain.com/index.html?searchid=string . We'd ideally like to not show the ?searchid=string , but I'm not sure how we'd do that. My group doesn't own the index.html page (but we are

Making HTTP requests via Python Requests module not working via proxy where curl does? Why?

雨燕双飞 提交于 2020-01-10 18:20:29
问题 Using this curl command I am able to get the response I am looking for from Bash curl -v -u z:secret_key --proxy http://proxy.net:80 \ -H "Content-Type: application/json" https://service.com/data.json I have already seen this other post on proxies with the Requests module And it helped me formulate my code in Python but I need to make a request via a proxy. However, even while supplying the proper proxies it isn't working. Perhaps I'm just not seeing something? >>> requests.request('GET',

Setting a custom userAgent in HTML or JavaScript

烂漫一生 提交于 2020-01-10 03:45:25
问题 Is there any way to do this? I'm trying to send a GET request to a website, but I want to customize my UserAgent. Is there any way to do this in pure HTML and JavaScript? I'd like it to all execute locally. 回答1: This is working for me. Object.defineProperty(navigator, 'userAgent', { get: function () { return 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0)'; } }); It is an updated version of code4coffee's answer as Object.prototype.__defineGetter__() is deprecated: