Is there a way to locate the source or URL linked to a button on a form or webpage?

Currently, I am extracting data feeds from a webpage by clicking a button that is similar to the 'Login' button displayed on the following link:

However, this button acts as a 'Download' request that initiates the download of a csv report.

Instead of manually visiting the webpage to download the data every time, I am trying to automate the process of downloading the report to input into my scripts. However, I am struggling to determine the link for this 'get' request or how to directly download the file using wget. Essentially, I am trying to figure out what is the source behind the button.

How can I discover this information?

Despite examining the page source, I have not been able to find any clues regarding this.

Answer №1

The key components of your webpage can be summarized as follows:

<form method="post" action="AMWEBLOGIN.aspx" id="form1">

     <input name="txtUsername" type="text" id="txtUsername" style="border-width:1px;border-style:Solid;font-family:Calibri;font-size:14pt;width:250px;" autocomplete="off">

     <input name="txtPassword" type="password" id="txtPassword" style="border-width:1px;border-style:Solid;font-family:Calibri;font-size:14pt;width:250px;">

     <input type="submit" name="btnLogin" value="Login" id="btnLogin" style="font-family:Calibri;font-size:14pt;">
</form>

This form initiates an HTTP-Post request to using the variables txtUsername and txtPassword.

This process is concerning since it sends and receives sensitive information such as usernames and passwords in plain text, potentially exposing the forms authentication cookie to interception.

An example of the wget command line for this action would be:

wget --post-data "txtUsername=$USERNAME&txtPassword=$PASSWORD" --save-cookies cookies.txt  --user-agent=Mozilla/5.0 http://www.cebumode.com/AMWEBLOGIN.aspx 

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Addressing simple JavaScript "async" AJAX requests that are sequenced and reliant on each other

I'm currently developing an application that includes a dashboard on its main page. In order to address any potential loading issues, the content of the dashboard is being calculated asynchronously using Ajax. This means that users do not have to wait ...

Skipping MongoDB in loop operations in a Node.js environment.The original text was modified to

Apologies for the beginner question (The following code is related to express framework and mongoose DB) I am attempting to iterate through the array 'Users' which contains usernames. Then, I am trying to match them in the mongoose database to r ...

Troubles with Promise.all and json() in JavaScript causing errors being logged as "invalid function"

I'm experiencing some difficulties with the "Promise.all" method. Essentially, I have an array of URLs (here is a simple one if you want to test it: const urlArray = [ "https://coverartarchive.org/release/985adeec-a1fd-4e79-899d-10c54b6af299&qu ...

Is it possible to conceal an HTML form once it has been submitted

I have a form on my website that sends the entered information to a PHP script which then emails me the details. I've implemented JavaScript form validation and jQuery Ajax to ensure the page doesn't need to be reloaded. Here is the HTML code fo ...

What is the process for updating the header of the group column from "Group" to "my custom heading"?

In my project, I need to replace the header "Group" with "MyCustomHeading". I am implementing this change using treeData in Material UI. ...

I encountered an issue while trying to integrate VideoJS with React

While using VideoJS, the video plays without any issues. However, I am facing an issue where the available source options are not being displayed as they should be. I attempted to use a plugin for the sources, but even then, the options didn't show u ...

Using the v-for directive before applying the Vue directive

I need help with displaying images in a carousel from data fetched via Firebase. I have created a directive, but the problem lies with the v-for loop. The directive is executed before the v-for loop, resulting in no items in the carousel. Directive: di ...

Update the Navbar links to smoothly slide along the navigation bar as the width decreases, instead of awkwardly

When in full screen, the Navbar links are displayed horizontally. https://i.stack.imgur.com/0mOLp.png However, when the width changes, they appear like this https://i.stack.imgur.com/2ylgZ.png Is there a way to ensure they shift to the left while maint ...

What is the best way to include a MongoDB match argument when it is received from the frontend, and to exclude it if it is not provided?

I'm currently working on creating an aggregation in MongoDB using NodeJS. The goal is to add an argument to the MongoDB match function if it exists when the resolver function is called. However, I'm encountering an issue where if no addition is m ...

The ultimate guide to disabling iframe scrolling on Internet Explorer 8

After extensively searching for a solution, I realized that most answers focused on removing scrollbars rather than completely preventing the page from scrolling. My issue involves embedding an index.php file in an iframe on my website. Within the index.ph ...

The type 'undefined' cannot be assigned to the type 'string | Buffer | { key: string | Buffer; passphrase: string; } | GetPublicKeyOrSecret'

Verification Code for JWT This function is used to verify a jwt using typescript. public verify( token: string, secretOrPublicKey?: string | Buffer, options?: jwt.VerifyOptions ): Promise<object | string> { if (!secretOrPublicKey) { ...

React Component - Element with an undefined value

When I tried implementing an Ionic Modal as a React Component, I encountered the following error message: Type '({ onClose, tipo }: PropsWithChildren<{ onClose: any; tipo: number; }>) => Element | undefined' is not assignable to type & ...

Is it possible to automatically refresh the Next Auth Session upon page reloads using API data updates?

There is a scenario I'm facing where I need to ensure the Next Auth Session is updated every time the page reloads in order to reflect the latest "Users" Details. My requirement involves making an API call upon each page reload to fetch the Users dat ...

Leveraging Vue.js's capabilities with an external setup file

Is it feasible for a Vue App to access an external configuration file? I envision a setup where I deploy the application along with the config file; then, I should be able to modify the configuration in the external file without needing to rebuild the enti ...

Unable to display shadows in Three.js

I've hit a roadblock with the shadow effect at the moment, despite trying various solutions for hours, it's still not appearing. Can anyone point out what I may have done incorrectly? Below is the code snippet for my current scene: //Setting up ...

How can I fetch a value from a database and set it as the selected option in a

I am facing an issue with the usage of the selectpicker plugin from Bootstrap in order to select multiple items. My requirement is to create a modal for editing where the data is fetched from previous records, particularly an array. I am looking for a way ...

Decoding JSON data within a Flatlist component in React Native

As a newcomer to React Native, I am currently working on developing an Ecommerce application. For the backend, I am using Woocommerce (Wordpress) and trying to integrate the Woocommerce API response into my React Native App. However, I am facing an issue w ...

What is the best way to retrieve an attribute from an object dynamically using JavaScript?

Inside my object, I have the following values: obj.resposta1 obj.resposta2 obj.resposta3 obj.resposta4 How can I access each value inside a loop like this: for ( var int = 1; int < 5; int++) Thank you, Celso ...

Obtain the URL within each promise

I'm currently utilizing Bluebird.js and the request-promise NPM module. My goal is to be able to access the promise URL or item.transactionID as shown in the code snippet below. After numerous attempts, I have not been successful in achieving this. Ho ...

Show blank value if there are no search results, along with an additional menu option

I am currently working on a Typeahead feature with a customized menu using the renderMenu method. In this setup, I have added 2 custom menu items at the bottom - one divider and a button. An issue arises when there are no search results. If I do not inclu ...