Newbie question - Can a kludgy page be modified before loading and sending back to server ?

A

Attila.Iskander

I have to deal with a very inefficient page from my ISP for loading filter
parameter for email
The entries are numbered sequentially
They are ordered and numbered as you enter each one.
To change the order, you have to mark the filter (or filters) by selecting a
check box next to each individual filter and then select one of "move up",
"move down" or delete to make the change

I would like to take the HTML code, re-order and renumber the filters,
reload the page on the browser and then send it back to the server, as if I
just entered a change....

I can take the HTML and save it as a text file, where I can most easily
write a BASIC or PERL program to massage the text to re-order and re-number
the various filter elements

So the question is, If I create a text file where EVERYTHING but the portion
with the sequence of filter elements is identical, can I reload the page and
send it on to the server
And if so, how can I do that ?
 
D

dorayme

Attila.Iskander said:
I have to deal with a very inefficient page from my ISP for loading filter
parameter for email ....

So the question is, If I create a text file where EVERYTHING but the portion
with the sequence of filter elements is identical, can I reload the page and
send it on to the server
And if so, how can I do that ?

If it is something the ISP uses to control things, I doubt if you
can replace their doc or their scripts?
 
V

VanguardLH

Attila.Iskander said:
I have to deal with a very inefficient page from my ISP for loading filter
parameter for email
The entries are numbered sequentially
They are ordered and numbered as you enter each one.
To change the order, you have to mark the filter (or filters) by selecting a
check box next to each individual filter and then select one of "move up",
"move down" or delete to make the change

I would like to take the HTML code, re-order and renumber the filters,
reload the page on the browser and then send it back to the server, as if I
just entered a change....

I can take the HTML and save it as a text file, where I can most easily
write a BASIC or PERL program to massage the text to re-order and re-number
the various filter elements

So the question is, If I create a text file where EVERYTHING but the portion
with the sequence of filter elements is identical, can I reload the page and
send it on to the server
And if so, how can I do that ?

You aren't sending the web page (its code) back to the server. You're
sending back form data which they structure so their server-side script
or program can parse it. Modifying the web page (a local copy on your
host) won't do anything to alter what they expect for structure in the
form data you send back to them.

I suppose you could figure out from their web page code (what gets
delivered to you) what is the structure for their form data and use your
own local page with your scripts to provide a nicer (to you) screen and
behavior which composes the form data that your local page sends to the
server for its server-side program to parse. Unless you like doing that
sort of thing as an exercise, you'd be wasting your time because later
they could change the web page, server-side program, and form data
structure so what you wrote up is no longer valid.

Yes, you could compose your own web page to behave how you like and to
see if the server accepts your form data. Yet it's possible they'll use
HTTP-Referer, or the window name attribute (set by the parent page that
served the config page), or a hash key in the URL, or a session ID to
ensure that the page composing the form data was a page that came from
them while you were properly logged into your account. It's likely
there is some security involved to ensure what they get back was from
the actual and validated user of the account.
 
L

Lewis

In message said:
Attila.Iskander wrote:
You aren't sending the web page (its code) back to the server. You're
sending back form data which they structure so their server-side script
or program can parse it. Modifying the web page (a local copy on your
host) won't do anything to alter what they expect for structure in the
form data you send back to them.

No, but you could use something like Greasemonkey yo completely rewrite
their HTML into something useable. It's tricky though, probably
especially so if the page is poorly done, as it may be hard to parse out
what to send.

Of course, you would have to be sure not to change anything that caused
your session to become invalid, and it would take a LOT of testing.
Enough that their webmonkeys might notice you hitting the site 8,000
times and block you as a hacker.

--
They were the observers of the operation of the universe, its clerks,
its auditors. They saw to it that things spun and rocks fell. And they
believed that for a thing to exist it had to have a position in time and
space. Humanity had arrived as a nasty shock. Humanity practically was
things that didn't have a position in time and space, such as
imagination, pity, hope, history and belief. Take those away and all you
had was an ape that fell out of trees a lot. --The Thief of Time
 
B

Brian Cryer

Attila.Iskander said:
I have to deal with a very inefficient page from my ISP for loading filter
parameter for email
The entries are numbered sequentially
They are ordered and numbered as you enter each one.
To change the order, you have to mark the filter (or filters) by selecting
a
check box next to each individual filter and then select one of "move
up",
"move down" or delete to make the change

I would like to take the HTML code, re-order and renumber the filters,
reload the page on the browser and then send it back to the server, as if
I
just entered a change....

I can take the HTML and save it as a text file, where I can most easily
write a BASIC or PERL program to massage the text to re-order and
re-number
the various filter elements

So the question is, If I create a text file where EVERYTHING but the
portion
with the sequence of filter elements is identical, can I reload the page
and
send it on to the server
And if so, how can I do that ?

There are lots of issues involved in rewriting the page - many of which
others have touched upon.

As an alternative you could put together your own application using an
embedded web-browser and get it to issue the commands to do the reordering.
That would get around any issues with cookies, session state, etc that you
might encounter if you try to modify the html directly yourself.

However, if you are a newbie then to be quite honest the safest approach is
to live with what you've been provided with :(
 
A

Attila.Iskander

Brian Cryer said:
There are lots of issues involved in rewriting the page - many of which
others have touched upon.

As an alternative you could put together your own application using an
embedded web-browser and get it to issue the commands to do the
reordering. That would get around any issues with cookies, session state,
etc that you might encounter if you try to modify the html directly
yourself.

However, if you are a newbie then to be quite honest the safest approach
is to live with what you've been provided with :(
--

'm only a newbie with HTML and browser stuff
But have recently played with Perl and JAVAScript.
But this is my 40th year in IT, starting with COBOL, FORTRAN, assorted
assemblers in IBM, CDC, HP, PDP computer from mainframes to desktops.

This is not a problem that needs to be solved on a recurring basis
It's more like an occasional change, a few times a year

Imagine the package received from the server as made up of x parts.
The only portion that I wish to modify is part "n".
"n" contains y elements to resequence and the only change in each element
are the sequence numbers that would be re-ordered.
Otherwise each element remains the same size and the total size of "n"
remains the same too.
And the changes to "n" are internal only and everything else remains the
same

Since the data set can actually be changed before it's sent to the server,
(otherwise how can you signal that you want to change things) , I believe
that only problem is how to change the source of the package sent.
 
D

Denis McMahon

Since the data set can actually be changed before it's sent to the
server, (otherwise how can you signal that you want to change things) ,
I believe that only problem is how to change the source of the package
sent.

Changing the data set is not the problem. Sending the correct information
back to the server in a valid format is.

Can it be done? Yes, undoubtedly, in various ways.

Can you do it? The fact that you're asking here suggests that you don't
at present have the skillset or knowledge you need to do it.

Can you learn to do it? Almost definitely, but it's not a skillset you're
going to pick up quickly. For a start, your initial post leads me to
suspect that you little knowledge of how a basic http request / response
transaction works, how forms function, the intricacies of sessions and
referrer, and if I said "does the site use ajax?" I suspect your answer
would be "what's ajax?".

Can someone provide you with a simple, quick and generic solution? Not a
snowflakes chance in a blast furnace. There's just too many variables.

Rgds

Denis McMahon
 
L

Lewis

In message said:
Imagine the package received from the server as made up of x parts.
The only portion that I wish to modify is part "n".
"n" contains y elements to resequence and the only change in each element
are the sequence numbers that would be re-ordered.
Otherwise each element remains the same size and the total size of "n"
remains the same too.
And the changes to "n" are internal only and everything else remains the
same

Greasemonkey seems like your best option. It's available for Firefox 4,
I have no idea of later versions as I stopped using FF.


--
This man was clearly mad, but at the heart of his madness was a cold,
dreadful sanity, a core of pure interstellar ice in the centre of the
furnace. She'd thought him weak under a thin shell of strength, but it
went a lot further than that. Somewhere deep inside his mind, somewhere
beyond the event horizon of rationality, the sheer pressure of insanity
had hammered his madness into something harder than diamond. --Wyrd
Sisters
 
A

Attila.Iskander

Brian Cryer said:
Attila.Iskander said:
No offense intended.

No offense taken
But I'm not the type to take what's been provided without trying to
change things if they can be better

The page is written in JavaScript
If I can fool the server to accept my corrected page I'm happy
 
D

Denis McMahon

The page is written in JavaScript
If I can fool the server to accept my corrected page I'm happy

But you do not send the page to the server. You send form data and page
requests to the server, and the server responds with responses that can
include web pages, json encoded strings, images, pdf documents etc.

What you can do is rewrite the form(s) using javascript, fill in the
modified forms, and then send the form data back to the server.

See that post where I said you clearly don't understand the most basic
aspects of web-browser <-> web-server communication. Thinking that you
send the "page" back to the server when you submit data is an example of
this lack of understanding.

Rgds

Denis McMahon
 
A

Attila.Iskander

Denis McMahon said:
But you do not send the page to the server. You send form data and page
requests to the server, and the server responds with responses that can
include web pages, json encoded strings, images, pdf documents etc.

What you can do is rewrite the form(s) using javascript, fill in the
modified forms, and then send the form data back to the server.

See that post where I said you clearly don't understand the most basic
aspects of web-browser <-> web-server communication. Thinking that you
send the "page" back to the server when you submit data is an example of
this lack of understanding.

What I find amusing is idiots who have a need to demonstrate that they may
have more knowledge in on area than someone else
EVEN WHEN the other person has stated so right from the get-go

It's not about you and your need to demonstrate some kind of superiority to
salve your needy ego, bubby

I ALREADY KNOW, that I don't know
And I have no need for a shithead to tell me so

Since clearly you are UNABLE to answer the REAL question asked, I have no
need to read anything else from you

<flush>
 
T

Tim Streater

Attila.Iskander said:
What I find amusing is idiots who have a need to demonstrate that they may
have more knowledge in on area than someone else
EVEN WHEN the other person has stated so right from the get-go

It's not about you and your need to demonstrate some kind of superiority to
salve your needy ego, bubby

I ALREADY KNOW, that I don't know
And I have no need for a shithead to tell me so

Since clearly you are UNABLE to answer the REAL question asked, I have no
need to read anything else from you

<flush>

And what was the real question, precisely? I've lost track.

(Note: if the "real question" is as per the subject line, then the
answer is No.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top