Jump to content
UBot Underground

How to scrape onclick javascript


Recommended Posts

Hello mates.

I didn't find answer for this question.

How to scrape an attribute, for example

<onclick="javascript:go('http://yourpage.com/onclick.php?', 'demo'); return false;">

How to scrape only this yourpage.com/onclick.php? ?

 

or what about this thing(if found only few sites with this)

 

onclick="startLead(this, '/redirect--wufoD0qauiXpTlPsx8v6iNdOzn/Kp9UvRYZsYLF9R4skvUMzZAf78/Z6lP2NGfuJrtALnI4N0vVn1/XpA9cA4f3SF1Oaf1Cdu91O5wpi+1jv4pxZUD8u8W6MAvO3Lq2VZ4/9YOIg97tW5T5LhgNMCivyrjIJ431lgeAOwz+hg8s7qc7ADnwVoiMsyV2V5uDh5BGQosgXP3WjbYI11oSlRu3veZBR6nOqNi5PmBFI1jczchQTh8aldKaWLmTfbBMl');

 

Thanks for reply!

 

Is it even possible to do?

Link to post
Share on other sites

Hello mates.

I didn't find answer for this question.

How to scrape an attribute, for example

<onclick="javascript:go('http://yourpage.com/onclick.php?', 'demo'); return false;">

How to scrape only this yourpage.com/onclick.php? ?

 

or what about this thing(if found only few sites with this)

onclick="startLead(this, '/redirect--wufoD0qauiXpTlPsx8v6iNdOzn/Kp9UvRYZsYLF9R4skvUMzZAf78/Z6lP2NGfuJrtALnI4N0vVn1/XpA9cA4f3SF1Oaf1Cdu91O5wpi+1jv4pxZUD8u8W6MAvO3Lq2VZ4/9YOIg97tW5T5LhgNMCivyrjIJ431lgeAOwz+hg8s7qc7ADnwVoiMsyV2V5uDh5BGQosgXP3WjbYI11oSlRu3veZBR6nOqNi5PmBFI1jczchQTh8aldKaWLmTfbBMl');

Thanks for reply!

 

Is it even possible to do?

What exactly do you want to extract? Just the url in the first example?

You could use regex to do that.

 

set(#tmp1"<onclick=\"javascript:go(\'http://yourpage.com/onclick.php?\' \'demo\'); return false;\">""Global")

alert($find regular expression(#tmp1"(?<=go\\(\\\').+?(?=\\?\\\')"))

 

Cheers

Dan

Link to post
Share on other sites

Thank you Dan.

What about second link?

There is encoded url, and it's working normal on webbrowser like chrome(when you try to click it's opening as new tab, and is redirecting)

what about this?

Link to post
Share on other sites

Thank you Dan.

What about second link?

There is encoded url, and it's working normal on webbrowser like chrome(when you try to click it's opening as new tab, and is redirecting)

what about this?

 

I would have to see the site to give you an answer on this one. Can you share the url?

 

Dan

Link to post
Share on other sites

 

onclick="startLead(this, '/redirect--wufoD0qauiXpTlPsx8v6iNdOzn/Kp9UvRYZsYLF9R4skvUMzZAf78/Z6lP2NGfuJrtALnI4N0vVn1/XpA9cA4f3SF1Oaf1Cdu91O5wpi+1jv4pxZUD8u8W6MAvO3Lq2VZ4/9YOIg97tW5T5LhgNMCivyrjIJ431lgeAOwz+hg8s7qc7ADnwVoiMsyV2V5uDh5BGQosgXP3WjbYI11oSlRu3veZBR6nOqNi5PmBFI1jczchQTh8aldKaWLmTfbBMl');

 

Ok, I looked at the website you showed me. On this site there are 81 links who point to differnet sites. 

Now to click one of those links you need a combination of click with wildcard and element offset.

 

So in your case the element to search for is:

onclick=w"startLead*"

 

All of the links have an onclick atribute. And the all start with startLead

 

Now if you want to navigate to all of them, it would be best to add those links into a list. With list from text.

 

But if you want to navigate to one of them directly, you could also use element offset:

click($element offset(<onclick=w"startLead*">, 0), "Left Click""No")

 

Which will click on the first link in your case.

 

Hope that helps.

Dan

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...