Search Results

Search found 52885 results on 2116 pages for 'http redirect'.

Page 161/2116 | < Previous Page | 157 158 159 160 161 162 163 164 165 166 167 168  | Next Page >

  • Read http body and put it into variables.

    - by Khou
    how do you create a class to read the html body and phase it into a variable? Example the page http://domain.com/page1.aspx display the following plaintext within the html body content item1=xyz&item2=abc&item3=jkl how do you read content of the html body and assign them to a variables in this case variable1=xyz (value taken from item1=) variable2=abc (value taken from item2=) variable3=jkl (value taken from item3=)?

    Read the article

  • C# HTTP Headers crafting

    - by rukqoa
    Since Http Headers can be crafted and customize, how would I change or modify the IP part of it using C# 's HttpWebRequest class. In other words, how can IP Spoofing be done using C#. Thanks for reading.

    Read the article

  • C++/CLI HTTP Proxy problems...

    - by darkantimatter
    Hi, I'm trying(very hard) to make a small HTTP Proxy server which I can use to save all communications to a file. Seeing as I dont really have any experience in the area, I used a class from codeproject.com and some associated code to get started (It was made in the old CLI syntax, so I converted it). I couldn't get it working, so I added lots more code to make it work (threads etc), and now it sort of works. Basically, it recieves something from a client (I just configured Mozilla Firefox to route its connections through this proxy) and then routes it to google.com. After it sends Mozilla's data to google, recieves a responce, and sends that to Mozilla. This works fine, but then the proxy fails to recieve any data from Mozilla. It just loops in the Sleep(50) section. Anyway, heres the code: ProxyTest.cpp: #include "stdafx.h" #include "windows.h" #include "CHTTPProxy.h" public ref class ClientThread { public: System::Net::Sockets::TcpClient ^ pClient; CHttpProxy ^ pProxy; System::Int32 ^ pRecieveBufferSize; System::Threading::Thread ^ Thread; ClientThread(System::Net::Sockets::TcpClient ^ sClient, CHttpProxy ^ sProxy, System::Int32 ^ sRecieveBufferSize) { pClient = sClient; pProxy = sProxy; pRecieveBufferSize = sRecieveBufferSize; }; void StartReading() { Thread = gcnew System::Threading::Thread(gcnew System::Threading::ThreadStart(this,&ClientThread::ThreadEntryPoint)); Thread->Start(); }; void ThreadEntryPoint() { char * bytess; bytess = new char[(int)pRecieveBufferSize]; memset(bytess, 0, (int)pRecieveBufferSize); array<unsigned char> ^ bytes = gcnew array<unsigned char>((int)pRecieveBufferSize); array<unsigned char> ^ sendbytes; do { if (pClient->GetStream()->DataAvailable) { try { do { Sleep(100); //Lets wait for whole packet to get cached (If it even does...) unsigned int k = pClient->GetStream()->Read(bytes, 0, (int)pRecieveBufferSize); //Read it for(unsigned int i=0; i<(int)pRecieveBufferSize; i++) bytess[i] = bytes[i]; Console::WriteLine("Packet Received:\n"+gcnew System::String(bytess)); pProxy->SendToServer(bytes,pClient->GetStream()); //Now send it to google! pClient->GetStream()->Flush(); } while(pClient->GetStream()->DataAvailable); } catch (Exception ^ e) { break; } } else { Sleep(50); //It just loops here because it thinks mozilla isnt sending anything if (!(pClient->Connected)) break; }; } while (pClient->GetStream()->CanRead); delete [] bytess; pClient->Close(); }; }; int main(array<System::String ^> ^args) { System::Collections::Generic::Stack<ClientThread ^> ^ Clients = gcnew System::Collections::Generic::Stack<ClientThread ^>(); System::Net::Sockets::TcpListener ^ pTcpListener = gcnew System::Net::Sockets::TcpListener(8080); pTcpListener->Start(); System::Net::Sockets::TcpClient ^ pTcpClient; while (1) { pTcpClient = pTcpListener->AcceptTcpClient(); //Wait for client ClientThread ^ Client = gcnew ClientThread(pTcpClient, gcnew CHttpProxy("www.google.com.au", 80), pTcpClient->ReceiveBufferSize); //Make a new object for this client Client->StartReading(); //Start the thread Clients->Push(Client); //Add it to the list }; pTcpListener->Stop(); return 0; } CHTTPProxy.h, from http://www.codeproject.com/KB/IP/howtoproxy.aspx with a lot of modifications: //THIS FILE IS FROM http://www.codeproject.com/KB/IP/howtoproxy.aspx. I DID NOT MAKE THIS! BUT I HAVE MADE SEVERAL MODIFICATIONS! #using <mscorlib.dll> #using <SYSTEM.DLL> using namespace System; using System::Net::Sockets::TcpClient; using System::String; using System::Exception; using System::Net::Sockets::NetworkStream; #include <stdio.h> ref class CHttpProxy { public: CHttpProxy(System::String ^ szHost, int port); System::String ^ m_host; int m_port; void SendToServer(array<unsigned char> ^ Packet, System::Net::Sockets::NetworkStream ^ sendstr); }; CHttpProxy::CHttpProxy(System::String ^ szHost, int port) { m_host = gcnew System::String(szHost); m_port = port; } void CHttpProxy::SendToServer(array<unsigned char> ^ Packet, System::Net::Sockets::NetworkStream ^ sendstr) { TcpClient ^ tcpclnt = gcnew TcpClient(); try { tcpclnt->Connect(m_host,m_port); } catch (Exception ^ e ) { Console::WriteLine(e->ToString()); return; } // Send it if ( tcpclnt ) { NetworkStream ^ networkStream; networkStream = tcpclnt->GetStream(); int size = Packet->Length; networkStream->Write(Packet, 0, size); array<unsigned char> ^ bytes = gcnew array<unsigned char>(tcpclnt->ReceiveBufferSize); char * bytess = new char[tcpclnt->ReceiveBufferSize]; Sleep(500); //Wait for responce do { unsigned int k = networkStream->Read(bytes, 0, (int)tcpclnt->ReceiveBufferSize); //Read from google for(unsigned int i=0; i<k; i++) { bytess[i] = bytes[i]; if (bytess[i] == 0) bytess[i] = ' '; //Dont terminate the string if (bytess[i] < 8) bytess[i] = ' '; //Somethings making the computer beep, and its not 7?!?! }; Console::WriteLine("\n\nAbove packet sent to google. Google Packet Received:\n"+gcnew System::String(bytess)); sendstr->Write(bytes,0,k); //Send it to mozilla Console::WriteLine("\n\nAbove packet sent to client..."); //Sleep(1000); } while(networkStream->DataAvailable); delete [] bytess; } return; } Any help would be much appreciated, I've tried for hours.

    Read the article

  • XML parse file from HTTP

    - by Travis
    I have an XML file located at a location such as http://example.com/test.xml I'm trying to parse the XML file to use it in my program with xPath like this but it is not working. Document doc = builder.parse(new File(url)); How can I get the XML file?

    Read the article

  • How do I see the whole HTTP request in Rails

    - by akafazov
    Hi, I have a Rails application but after some time of development/debugging I realized that it would be very helpful to be able to see the whole HTTP request in the logfiles - log/development.log, not just the parameters. I also want to have a separate logfile based on user, not session. Any ideas will be appreciated! Angel

    Read the article

  • Handling multiple HTTP requests from one source (e.g.a hacker)

    - by Haraldo
    Hi there, I have a script to handle http requests. I'm trying to think of some of the security issues I might have with it. My biggest concern at the moment is how I can manage multiple requests from the same source over and over. For instance someone trying to shut down my system. Do I need to be concerned or will Apache handling this issue. If not what is the best approach to take using php? Thanks,

    Read the article

  • Jmeter- HTTP Cache Manager, Unable to cache everything what it is being cached by Browser

    - by chinmay brahma
    I used HTTP Chache Manager to Cache files which are being cached in browser. I am successful of doing it for some of the pages. Number of files being cached in Jmeter is equal to Number of files being cached by browser. But in some cases : I found number files being cached is lesser than the files being cached by browser. Using Jmeter I found only 5 files are being cached but in real browser 12 files are getting cached. Thanks in advance

    Read the article

  • GWT-RPC vs HTTP Call - which is better??

    - by Nirmal Patel
    I am evaluating if there is a performance variation between calls made using GWT-RPC and HTTP Call. My appln services are hosted as Java servlets and I am currently using HTTPProxy connections to fetch data from them. I am looking to convert them to GWT-RPC calls if that brings in performance improvement. I would like to know about pros/cons of each... Also any suggestions on tools to measure performance of Async calls...

    Read the article

  • Does Meta Refresh work during page load?

    - by waquin
    Page A has a meta refresh to redirect to another page, C, after a certain amount of time (time T). From page A a link is clicked that takes a long time to load, longer than time T, and would eventually load another page; B. Will the meta refresh on page A cause the page to be re-directed to C, or will the processing of the link override the meta refresh, eventually loading page B?

    Read the article

  • Prevent abuse of public HTTP directory meant for images

    - by sutre
    The situation: Each user has their own public HTTP directory, meant for images only. This could easily be abused by users using it to serve large files, wasting bandwidth. The question: Is there any fairly simple way to prevent this abuse? Either by allowing the webserver to only images to be served, restricting size, or some other method.

    Read the article

  • [C#] Develop a HTTP Monitor

    - by Tony
    Hi I'd like to develop an application to monitor HTTP traffic to/from my PC. (what websites are being visited by the PC user). The problem is, that I couldn't get any articles how to start developing application like that. Any help ?

    Read the article

  • HTTP Error 0 js/upload in drupal when attaching a file

    - by user349294
    I am trying to attach an 8M .wav file to a "story" in drupal. I can attach similar smaller files, but when i try this one and larger sizes i get in HTTP Error 0 message after a minute or to. I have checked all my max upload, Max Mem sizes they are set at well over 8M at 64M and 256M. Anyone else have this issue uploading files ever?

    Read the article

  • Serialize ASP.NET Web Service HTTP POST request results

    - by nigative
    I am trying to serialize my webmethod output (rename XML element with results), So far [return: System.Xml.Serialization.SoapElementAttribute("results")] before method declaration works fine with soap requests, but I am looking for something that would work the same way with HTTP POST/GET requests as well (right now I get return class name as element name)

    Read the article

  • C# save a file from a HTTP Request

    - by d1k_is
    Im trying to download and save a file from a HttpWebResponse but im having problems saving the file (other than Text Files) properly. I think its something to do with this part: byte[] byteArray = Encoding.UTF8.GetBytes(http.Response.Content); MemoryStream stream = new MemoryStream(byteArray); Text Files work fine with the above code but when I try to save the Content to an Image file it gets corrupted. How do i write this 'string' data to an image file (and other binary files)

    Read the article

  • Browser forgets about registered cookie after leaving domain

    - by Sergej Andrejev
    I have following problem. I register a cookie Set-Cookie EhdSite_SessionId=b0ptrr45xgclea55kjqp2o45; path=/; HttpOnly Do something on the same host (user always sends cookie header) Cookie EhdSite_SessionId=b0ptrr45xgclea55kjqp2o45 then I redirect user to other host After filling all the required data user went back to first host Here user doesn't send the cookie Does that mean that without expiration date cookie is destroyed by browser not when closing browser but when leaving the domain

    Read the article

< Previous Page | 157 158 159 160 161 162 163 164 165 166 167 168  | Next Page >