Author Topic: Inspect element automation in browser  (Read 2278 times)

0 Members and 1 Guest are viewing this topic.

Offline romancodis

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -9
    • View Profile
Inspect element automation in browser
« on: December 23, 2015, 10:29:10 am »
Hai,
i have some question about "inspect element", which is a option in major browsers to view source code of web pages . I want to make a script to automate inspect element tool


Thanks in advance  :)
« Last Edit: December 23, 2015, 10:29:46 am by romancodis »

Offline Twerpzilla

  • NULL
  • Posts: 4
  • Cookies: -4
    • View Profile
Re: Inspect element automation in browser
« Reply #1 on: December 23, 2015, 10:39:21 am »
uhh...?

Do you want to scrape and download the source automatically.. or.. do you want a script to press f12 for you?

Offline ShadowCloud

  • Serf
  • *
  • Posts: 33
  • Cookies: 31
  • -My word is my bond
    • View Profile
Re: Inspect element automation in browser
« Reply #2 on: December 23, 2015, 11:01:43 am »
I think you are sort of missing the point...  Take a look at the DOM (Document Object Model) this is probably better suited for what you want to do?
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.

Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: Inspect element automation in browser
« Reply #3 on: December 23, 2015, 11:02:06 am »
what do you meant source code? All the broswer sees is HTML, under normal circumstances that nothing is fucked in the server, and i hope this is what you mean mate, the HTML.

This my friend is as simple as fucking a whore, and rather just a short.
Code: (ruby) [Select]
require 'net/http'

url = URI.parse('http://evilzone.org')
req = Net::HTTP::Get.new(url.to_s)
res = Net::HTTP.start(url.host, url.port) {|http|
  http.request(req)
}
puts res.body

Code: (python) [Select]
import requests

r = requests.get('https://evilzone.org')
print r.text

Code: (javascript) [Select]
//Node.js, feel la kenjoe41 baby.
var request = require("request");

var parseHTML = function(html) {
    //parse it anyway you want
};

request("http://evilzone.org", function (error, response, body) {
    if (!error) {
        parseHtml(body);
    } else {
        console.log(error);
    }
});

Code: (D) [Select]
import std.net.curl, std.stdio;

auto content = get("http://evilzone.org");

writeln(content);

* kenjoe41 thinks that is enough.
« Last Edit: December 23, 2015, 11:04:18 am by kenjoe41 »
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]

Offline romancodis

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -9
    • View Profile
Re: Inspect element automation in browser
« Reply #4 on: December 24, 2015, 10:32:45 am »
uhh...?

Do you want to scrape and download the source automatically.. or.. do you want a script to press f12 for you?

i dont want to download source code automatically, instead of changing the coding in client side for change the working of particular website for our use

Offline romancodis

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -9
    • View Profile
Re: Inspect element automation in browser
« Reply #5 on: December 24, 2015, 10:35:44 am »
I think you are sort of missing the point...  Take a look at the DOM (Document Object Model) this is probably better suited for what you want to do?
its possible to make inspect element by DOM, sorry i dont know about DOM .but i want to know please tell me way to make inspect element automation using DOM

Offline romancodis

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -9
    • View Profile
Re: Inspect element automation in browser
« Reply #6 on: December 24, 2015, 10:43:59 am »
what do you meant source code? All the broswer sees is HTML, under normal circumstances that nothing is fucked in the server, and i hope this is what you mean mate, the HTML.

This my friend is as simple as fucking a whore, and rather just a short.
Code: (ruby) [Select]
require 'net/http'

url = URI.parse('http://evilzone.org')
req = Net::HTTP::Get.new(url.to_s)
res = Net::HTTP.start(url.host, url.port) {|http|
  http.request(req)
}
puts res.body

Code: (python) [Select]
import requests

r = requests.get('https://evilzone.org')
print r.text

Code: (javascript) [Select]
//Node.js, feel la kenjoe41 baby.
var request = require("request");

var parseHTML = function(html) {
    //parse it anyway you want
};

request("http://evilzone.org", function (error, response, body) {
    if (!error) {
        parseHtml(body);
    } else {
        console.log(error);
    }
});

Code: (D) [Select]
import std.net.curl, std.stdio;

auto content = get("http://evilzone.org");

writeln(content);

* kenjoe41 thinks that is enough.

wow man, is awesome . and i need to do edit the contents of website by using inspect element by automation, not only view the source code and modifying on client side

Offline ShadowCloud

  • Serf
  • *
  • Posts: 33
  • Cookies: 31
  • -My word is my bond
    • View Profile
Re: Inspect element automation in browser
« Reply #7 on: December 25, 2015, 07:28:45 am »
 :o

So what you want is a universal hack that would change websites for everyone, everywhere, automatically? 
You need to do some serious reading up on web servers how and how web based content is delivered, view source is only client side...  Whenever this is done server side it's done using dynamic content (or I guess some shoddy devs would do it with time based logic but that's beside the point)
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.

Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: Inspect element automation in browser
« Reply #8 on: December 25, 2015, 08:53:06 am »
JavaScript, and some other server side language like php or python. You got this.
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]

Offline aaanathan

  • /dev/null
  • *
  • Posts: 5
  • Cookies: -1
    • View Profile
Re: Inspect element automation in browser
« Reply #9 on: January 14, 2016, 05:32:16 am »
wow man, is awesome . and i need to do edit the contents of website by using inspect element by automation, not only view the source code and modifying on client side
Hi,

I think you are not getting the point dude. If you inspect the page, anyhow you are going to land on HTML page. What the mentioned Python code will do is exactly same. It's going to give you a HTML response to you. You have manipulate that to achieve what you are trying.

You can see the following URL as sample.
http://www.arock.in/python/have-you-got-tired-of-waiting-for-web-service/

Sent from my A0001 using Tapatalk


Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: Inspect element automation in browser
« Reply #10 on: January 15, 2016, 12:16:56 pm »
OP was last here on 30th december.
He shot me a PM i was lazy to answer but from what he wanted, javascript is the answer.

If he still is interested and still doesn't find the answer with more googling using that trigger word, then i might elaborate otherwise i am lazy now.
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]