Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Redirecting to a third party site with injected HTML

Reply
Thread Tools

Redirecting to a third party site with injected HTML

 
 
guytamir1@gmail.com
Guest
Posts: n/a
 
      06-09-2013
Hi all,

new to group and pretty new to python.

I'm working on a new project and i want to receive a request from a user and to redirect him to a third party site, but on the page after i redirect my users i want to them to see injected html (on the third party site.)

i'm not really sure how to approach this problem..
hints

regards,
Guy
 
Reply With Quote
 
 
 
 
Joel Goldstick
Guest
Posts: n/a
 
      06-09-2013
On Sun, Jun 9, 2013 at 1:09 PM, <(E-Mail Removed)> wrote:

> Hi all,
>
> new to group and pretty new to python.
>
> I'm working on a new project and i want to receive a request from a user
> and to redirect him to a third party site, but on the page after i redirect
> my users i want to them to see injected html (on the third party site.)
>
> i'm not really sure how to approach this problem..
> hints
>
> regards,
> Guy
> --
> http://mail.python.org/mailman/listinfo/python-list
>


you can do redirect easily, but you can't inject html in 3rd party without
permission. At any rate, how is this a python question?


--
Joel Goldstick
http://joelgoldstick.com

 
Reply With Quote
 
 
 
 
Fábio Santos
Guest
Posts: n/a
 
      06-09-2013
On 9 Jun 2013 18:15, <(E-Mail Removed)> wrote:
>
> Hi all,
>
> new to group and pretty new to python.
>
> I'm working on a new project and i want to receive a request from a user

and to redirect him to a third party site, but on the page after i redirect
my users i want to them to see injected html (on the third party site.)
>
> i'm not really sure how to approach this problem..
> hints
>
> regards,
> Guy


What web framework are you using?

This does not seem like a python question, instead a HTML/JavaScript one.

 
Reply With Quote
 
guytamir1@gmail.com
Guest
Posts: n/a
 
      06-09-2013
its a python question since the request is received on a python server and i thought that
there may be a way to so from the server that sends the response to the user...

On Sunday, June 9, 2013 8:22:17 PM UTC+3, Fábio Santos wrote:
> On 9 Jun 2013 18:15, <(E-Mail Removed)> wrote:
>
> >

>
> > Hi all,

>
> >

>
> > new to group and pretty new to python.

>
> >

>
> > I'm working on a new project and i want to receive a request from a user and to redirect him to a third party site, but on the page after i redirect my users i want to them to see injected html (on the third party site.)

>
>
> >

>
> > i'm not really sure how to approach this problem..

>
> > hints

>
> >

>
> > regards,

>
> > Guy

>
> What web framework are you using?
>
> This does not seem like a python question, instead a HTML/JavaScript one.

 
Reply With Quote
 
Joel Goldstick
Guest
Posts: n/a
 
      06-09-2013
On Sun, Jun 9, 2013 at 1:52 PM, <(E-Mail Removed)> wrote:

> its a python question since the request is received on a python server and
> i thought that
> there may be a way to so from the server that sends the response to the
> user...
>
> On Sunday, June 9, 2013 8:22:17 PM UTC+3, Fábio Santos wrote:
> > On 9 Jun 2013 18:15, <(E-Mail Removed)> wrote:
> >
> > >

> >
> > > Hi all,

> >
> > >

> >
> > > new to group and pretty new to python.

> >
> > >

> >
> > > I'm working on a new project and i want to receive a request from a

> user and to redirect him to a third party site, but on the page after i
> redirect my users i want to them to see injected html (on the third party
> site.)
> >
> >
> > >

> >
> > > i'm not really sure how to approach this problem..

> >
> > > hints

> >
> > >

> >
> > > regards,

> >
> > > Guy

> >
> > What web framework are you using?
> >
> > This does not seem like a python question, instead a HTML/JavaScript one.

> --
> http://mail.python.org/mailman/listinfo/python-list
>



unless you hack into 3rd party, you can't alter that site

--
Joel Goldstick
http://joelgoldstick.com

 
Reply With Quote
 
Ian
Guest
Posts: n/a
 
      06-09-2013
On 09/06/2013 18:09, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi all,
>
> new to group and pretty new to python.
>
> I'm working on a new project and i want to receive a request from a user and to redirect him to a third party site, but on the page after i redirect my users i want to them to see injected html (on the third party site.)
>
> i'm not really sure how to approach this problem..
> hints
>
> regards,
> Guy

Hi Guy,

It appears to me that you have thought "Inject html" as the solution to
your problem. Sorry, but you can't solve your problem that way. Basic
security.

What is the problem you are trying to solve?

Ian


 
Reply With Quote
 
Tim Chase
Guest
Posts: n/a
 
      06-09-2013
On 2013-06-09 10:09, (E-Mail Removed) wrote:
> I'm working on a new project and i want to receive a request from a
> user and to redirect him to a third party site, but on the page
> after i redirect my users i want to them to see injected html (on
> the third party site.)


As others have stated, I'm not sure this is a Python problem. Two
possibilities occur to me:

1) Your server returns a page with an <iframe> that points to the
page they want, but then injects HTML into that iframe using
ECMAScript. Some browsers may thwart you from doing this. Test
thoroughly in multiple browsers.

2) Your server goes and fetches the contents of the requested page,
then mungs it, and returns it from your server. This might also
require modifying internal links on the target page so that they
redirect through your local site. Be sure to test thoroughly, and
this may also have legality concerns (you're copying others' content
and displaying it on your site, so there may be copyright issues), so
also check with your lawyer.

Generally, these techniques are in the same bag of tricks that
phishers use, so you might also have to make sure that your site is
not getting filed as a phishing site (unless you are trying to make a
phishing site, in which case don't).

-tkc


 
Reply With Quote
 
Roy Smith
Guest
Posts: n/a
 
      06-09-2013
On Sunday, June 9, 2013 8:22:17 PM UTC+3, Fábio Santos wrote:
>> This does not seem like a python question, instead a HTML/JavaScript

one.

In article <(E-Mail Removed)>,
(E-Mail Removed) wrote:

> its a python question since the request is received on a python server and i
> thought that there may be a way to so from the server that sends the response to the
> user...


There are two layers to this question. The first is a
HTTP/HTML/Javascript question. That question is:

"i want to receive a request from a user and to redirect him to a third
party site, but on the page after i redirect my users i want to them to
see injected html (on the third party site.) What HTML, and/or
Javascript, and/or HTTP headers do I need to send to make that happen?

The second layer is a Python question:

"How do I write something in Python which causes the above
HTML/Javascript/HTTP to get sent?"

Until you can find an answer for the first question, it's not worth
asking the second question. And the answer to the first question won't
be found on a python group.
 
Reply With Quote
 
Guy Tamir
Guest
Posts: n/a
 
      06-10-2013
On Sunday, June 9, 2013 9:24:56 PM UTC+3, Ian wrote:
> On 09/06/2013 18:09, (E-Mail Removed) wrote:
>
> > Hi all,

>
> >

>
> > new to group and pretty new to python.

>
> >

>
> > I'm working on a new project and i want to receive a request from a user and to redirect him to a third party site, but on the page after i redirect my users i want to them to see injected html (on the third party site.)

>
> >

>
> > i'm not really sure how to approach this problem..

>
> > hints

>
> >

>
> > regards,

>
> > Guy

>
> Hi Guy,
>
>
>
> It appears to me that you have thought "Inject html" as the solution to
>
> your problem. Sorry, but you can't solve your problem that way. Basic
>
> security.
>
>
>
> What is the problem you are trying to solve?
>
>
>
> Ian


Hi Ian,

the problem i'm working is trying to add funny pictures to the third party sites..
its part of a game, when a user clicks on my urls they are redirected to known sites but i plant funny pictures in them that they need to find..

since i wrote some extensions in the past that allowed me to change the DOM easily i thought there might be an way to do so from the server before redirecting the user..
 
Reply With Quote
 
Fábio Santos
Guest
Posts: n/a
 
      06-10-2013
On 10 Jun 2013 07:58, "Guy Tamir" <(E-Mail Removed)> wrote:
> since i wrote some extensions in the past that allowed me to change the

DOM easily i thought there might be an way to do so from the server before
redirecting the user..

There could be a way to do that, but some of the features in the target
site would not be working. You could load the site yourself on your server,
and modify and serve that HTML to the user. Then you'd have to take care to
rewrite or disable all the links on the page (they may be relative to the
target domain and as such mean nothing on yours). Also images and other
resources' URLs have to be rewritten if they are relative URLs.

Then there are legal problems. Make sure you are legally allowed to do what
you are trying to do. I can't help with that.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with printing a bit pattern with printf and %x matt.jaffe@gmail.com C Programming 9 04-19-2013 12:14 PM
Connecting Third Party Wireless Device to Livebox using Windows XP =?Utf-8?B?VHJhY3k=?= Wireless Networking 2 12-05-2005 07:22 PM
Re: Use Third Party HTML Designer Cowboy \(Gregory A. Beamer\) ASP .Net 2 11-05-2003 10:15 PM
HTML "a name" question from third party site - Query Miles Davenport HTML 5 10-23-2003 09:14 PM
Improved third-party (preferably free) scroll bar Kieran Benton ASP .Net 3 09-11-2003 02:38 AM



Advertisments