Skip to content

Simple nodejs script for checking mixed content on https page

Notifications You must be signed in to change notification settings

cerberus-ab/get-mixed-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

338df4a · Mar 10, 2017

History

11 Commits
Mar 8, 2017
Mar 10, 2017
Mar 9, 2017

Repository files navigation

Get mixed content

Simple nodejs script for checking HTTPS page for unsecure HTTP requests which are considered mixed content.

About

What Is Mixed Content? | Web | Google Developers by Jo-el van Bergen
Mixed content - Web security | MDN

This is not a production-ready code, just my simple script which helped me one day and which also can be a little example of using JavaScript. The script does not render document and does not process inline styles.. so, it should be the next iteration. Also the script does not classify mixed content as passive/display or active content, it is pretty simply.

Instruction

Be sure you have nodejs >=6.0.0, and then:

$ node getmixc.js URL

will show you unsecure requests on the HTTPS page by URL.

Examples

Page with unsecure requests:

$ node getmixc.js https://courses.pepperdine.edu/access/content/user/alan.regan/public/Content%20Example%20Unsecured
Mixed content requests on the page (2):
<embed allowfullscreen="true" allowscriptaccess="always" height="315" src="http://www.youtube.com/v/GigYWy2UmOY?hl=en_US&amp;version=3&amp;rel=0" type="application/x-shockwave-flash" width="560">
<script language="JavaScript" src="http://courses.pepperdine.edu/access/content/user/alan.regan/public/countdown.js">

Healthy page without unsecure requests:

$ node getmixc.js https://www.apple.com
The page doesn`t have mixed content requests

Page is redirected to another localtion (has returned 3xx status code):

$ node getmixc.js https://apple.com
Error: The page is redirected to "https://www.apple.com/"

Page has returned another status code:

$ node getmixc.js https://www.apple.com/hello
Error: The page has returned 404 status code

See also

List redirect chain

About

Simple nodejs script for checking mixed content on https page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published