mardi 19 juin 2018

i want to verify if an email existe in database of the website or no

i want to verify if the email i am using exist in website or no so i post the email with random password then from the code source using searching method i want to see if string "email invalid" or whatever exist in source code or not if it exist then its invalid if not then it's valid email and it exist in database of the website i tried this

require 'net/http'`
require 'uri'`
require 'json'`

uri = URI.parse("https://www.facebook.com")
header = {'Content-Type': 'text/json'}
user = {user: {
               email: 'chahin1@gmail.com',
               password: 'mterm581998'
                  }
        }
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = user.to_json
response = http.request(request)
puts response
puts request.body
source = Net::HTTP.get(uri)
puts source

Aucun commentaire:

Enregistrer un commentaire