Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

126
Visualizações
Project to make an extension to detect phishing URL

Objective: This project aims to make a chrome extension that can detect any phishing URL whenever a page loads.

Current Processes: I have made an API in which whenever we pass any URL, it will give a response as it is a phishing or not phishing URL. After making the API, I m following the method to make the manifest, HTML, and JavaScript files. API Payload: URL: https://phishingurldetectorapi.herokuapp.com/predict1 (Method = Post)

Body:
{
    "url" : "www.google.com"
}

Response:
"It is  not a phishing url"

I want to pass the URL of any page whenever it loads in the "url" field of my API and it can display the response.

Issues: I am currently stuck in the part on how to pass the URL using javascript in my API body. Can anyone help with this?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can send current page url through ajax body as below.


(()=>{

   let current_page_url = window.location.href;
   fetch('https://phishingurldetectorapi.herokuapp.com/predict1',{
       method:'POST',
       headers:{
           'Content-Type':'application/json'
       },
       body:JSON.stringify({url:current_page_url})
   })
   .then(e=>e.json())
   .then(res=>console.log(res))
   .catch(err=>console.log(err))

})()

To work in all pages, you have to set https://*/* in matches array. e.g

"content_scripts": [
      {
        "matches": [
          "https://*/*"
        ]
      }
 ]

https://phishingurldetectorapi.herokuapp.com/predict1

Unfortunately, this server is not allowed for cross domain request, if you own it you must allow cors first. Otherwise, you won't able to send the request from your chrome extension.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda