Jump to content
UBot Underground

How To Grab Redirect Url Of Http Header Area?


Recommended Posts

I am trying to figure out how to do this but so far no clue to code it. Here is what I wanted to do:


 


I have a list of around 2K urls. when we open this url on browser it redirect to a website via two redirect in between. Like this:


 


Raw URL ==> URL redirect1 ==> URL redirect2 ==> Main URL


 


I want to extract this " URL redirect1, URL redirect2' from each raw url from 2K list. 


Need your expert advise Plz!!


 


Thanks in advance.


Link to post
Share on other sites

Here you go:

plugin command("HTTP post.dll", "http auto redirect", "No")
set(#url,"https://httpbin.org/redirect/6","Global")
set(#hostname,$plugin function("HTTP post.dll", "$URL Hostname", #url),"Global")
clear list(%redirects)
set(#redirect,"true","Global")
loop while($comparison(#redirect,"=","true")) {
    set(#get,$plugin function("HTTP post.dll", "$http get", #url, "", "", "", ""),"Global")
    set(#headers,$plugin function("HTTP post.dll", "$http response", "response headers"),"Global")
    if($contains(#headers,"Location|")) {
        then {
            set(#url,"http://{#hostname}{$trim($find regular expression(#headers,"(?<=Location\\|).*"))}","Global")
            add item to list(%redirects,#url,"Don\'t Delete","Global")
        }
        else {
            set(#redirect,"false","Global")
        }
    }
}
Link to post
Share on other sites

This code need http post plugin which is not available, if my issue solved by this plugin then i will buy this plugin.How can i check bro to grab that url which i want once time plz can you post me a demo video for grab those link after that i can buy this plugin.

Link to post
Share on other sites
  • 2 weeks later...

This code need http post plugin which is not available, if my issue solved by this plugin then i will buy this plugin.How can i check bro to grab that url which i want once time plz can you post me a demo video for grab those link after that i can buy this plugin.

 

Heopas plugin also has HTTP requests commands in there so you may be able to get away with using that instead

Link to post
Share on other sites

I try my best Nick but that also fail but i done by php code by google extension "redirect path" i run locally i get all url which i want.

Thanks for your response .

  • Like 1
Link to post
Share on other sites
  • 3 months later...

Heopas plugin also has HTTP requests commands in there so you may be able to get away with using that instead

 

Hi. I've upgraded to Pro version, but its being years since I've stopped playing with uBot.

Where can I get the "Heopas plugin".

 

Also, when I open a code view, it highlights an error in the very first line of your code:

plugin command("HTTP post.dll", "http auto redirect", "No")

I also need to get what the OP needed, but with a difference. Let's suppose that in between redirect 1 and redirect 2 (let's assume 302), there's a 200 response with a page that checks "something" and if "something" is ok, then redirects to redirect 3.

 

So, it would be like this Originial URL => redirct 1 (302) => Dummy page which redirects using JS (200) => redirect 3 (302) => Final Page

 

How can I get a bot / buy a bot that does that ?

 

Thanks a lot if you / somebody can reply.

Link to post
Share on other sites

Hi. I've upgraded to Pro version, but its being years since I've stopped playing with uBot.

Where can I get the "Heopas plugin".

 

Also, when I open a code view, it highlights an error in the very first line of your code:

plugin command("HTTP post.dll", "http auto redirect", "No")

I also need to get what the OP needed, but with a difference. Let's suppose that in between redirect 1 and redirect 2 (let's assume 302), there's a 200 response with a page that checks "something" and if "something" is ok, then redirects to redirect 3.

 

So, it would be like this Originial URL => redirct 1 (302) => Dummy page which redirects using JS (200) => redirect 3 (302) => Final Page

 

How can I get a bot / buy a bot that does that ?

 

Thanks a lot if you / somebody can reply.

 

You can find the Heopas plugin here: http://network.ubotstudio.com/forum/index.php/topic/20002-free-heopas-custom-plugin-thread-lock-sqlite-thread-variables-email-ini-clipboard/

 

For the error in the code, you have to have the HTTP Post plugin and have it installed and activated to get rid of the error.

 

That being said you want to do a JS redirect and what we were talking about was using HTTP requests which won't run JS. You could possibly use the HTTP requests along with the browser in order to run JS though.

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...