OWASP ZAP: Is it possible to prevent AJAX spider from clicking a button while spidering? - ajax

I would like to prevent ajax spider from clicking a specific button on the app I am scanning. The button brings the browser back to the homepage of the app. The spider starts at the homepage and first presses the button, basically causing the homepage to rerender but with slightly different url parameters. The spider thinks it is a "new" page and presses the button again, continuing to go through this cycle while hardly spidering through other pages. If there was a way the spider could identify this button through class name, id, etc, and avoid it, it would be very helpful. Is there some type of script or other way of accomplishing this?
I've tried excluding urls with regex following the url pattern of the homepage after the button has been clicked. However, the spider still visits all these pages. I believe it doesn't know it has reached an excluded page until after it is rendered by the button click, which will not prevent it from clicking in the first place.

Related

PupeteerSharp - Feature For Browser Lock

I am trying to scrape hyperlinks that are initiated by JS. The problem is when I click on items such as tags, the browser navigates away in the "Request" event. Then all of the following elements error out when clicking because the page is no longer there. Is there a way to prevent the page from navigating away?
Thanks!

Refresh a Fusion block on click of a button wordpress Avada

I have some buttons on a page and on click of each button the page gets reload and the data changes. Now, I would like to refresh that particular fusion block only without reloading the page. The buttons are added to the page as a widget (with some valid reasons) and the fusion block is on the page itself. Would it be possible to achieve what I am looking for?

How will an RSVP form stay on the same section after submitting on a one page WordPress layout

I have a one page layout WordPress page and an RSVP form at the bottom and The RSVP form works just fine.
THE PROBLEM:
When I try to submit the name of the guest, the page loads and you will brought now at the topmost section of the page instead of the bottom part where you will continue to fill up the RSVP form. The RSVP form has two parts, first the name of the guest and second, the actual selection of the RSVP options. So after submitting, you will need to scroll down at the bottom of the page just to see if you entered your name correctly or if your RSVP has been completed.
This RSVP form is a plugin from WordPress: RSVP plugin
I just want to use this RSVP form to work on a one page layout.
SOME SOLUTIONS THAT I'M THINKING:
AJAX - I think using AJAX will do the trick but I really don't know how to put AJAX into the plugin and into my WordPress page. I tried installing AJAX plugins but I'm not sure how to work it out.
ANCHOR TAG - I think if there is an anchor tag at the end of the URL, the page will force the browser to stay at the bottom of the page where the RSVP section is located. But this anchor tag should be automatically be there when you scroll on every section of the one page layout. But how will I do that?
I also tried malsup's Jquery Form Plugin but I really don't know how to work on it. Whenever I submit the form, an alert pops out.

There can be AJAX behavior even when the URL changes in browser?

If using the current Chrome, Firefox, and Safari, when switching between
http://www.facebook.com/my_name
http://www.facebook.com
The side panel for feed and chat, and any chat box actually stays. I thought when the URL changes, the page has to refresh as a whole, but obviously, this is not the case here. How is that done?
On IE 9, the URL actually became http://www.facebook.com/#! and using the "hash" to do ajax without refreshing the page, which is more understandable.
You can change the URL and page history from javascript without actually reloading the page.
See this answer on another question.
Note, that if you type the new URL by yourself and press enter the whole page reloads.
this might be the internal linking in the webpage with hidden DIVs with IDs and onClick those Hidden DIVs get visible with javascript and with AJAX content is loaded it will be a good if you browse the site disabling javascipt

AJAX webpage to navigate on previous page

The data is displayed in gridview with paging on an AJAX enabled webpage. The gridView contains Item templates containing a link button. On itemCommand event, page redirects to display data in new page. When the Back button on browser is pressed, the previous state of the page doesn't load.
Perhaps set a cookie and use it to get the right page when initializing the gridview. Or modify the hash at the end of the URL (eg, add "#page2" to the location bar and read it back on init).
Look at this js stuff from google
Use Google Web Toolkit, it allows the state to be bookmarked and isn't affected by back/forward button.
Otherwise your options are:
Telling the user to not press the back button.
Putting the state in the url, e.g mypage.asp#page_123 and using that to determine the state in your javascript at page load.

Resources