python 3.x - Is it safe to read a dangerous website with urllib -


some websites can dangerous , see if can understand why so. i've understood such sites considered risky since run malicious javascripts. wonder if safe open dangerous site urllib. i've written following code tries print source code of user input website screen. know if following lead critical issues

import urllib urllib import request  url = input('url:\n')  x = urllib.request.urlopen(url) raw = x.read()  try:     print(raw.decode('utf-8')) except exception e:     print(type(e), e)     if type(raw) == bytes:         print(raw.decode('latin-1')) 

we may underline fact each time visit website, website (via access.log) & isp (transparent proxy log + routeur log) & governement (via massive surveillance program) have keep traces of visit - @ least timestamp, public ip adress , url visited-

the public ip address point of view start point potential malicious/dangerous things (a man in middle attack example).

if know , assume that, can confirm html code (which potentially contain javascript code too) cannot dangerous until js code interpreted somewhere.

best regards.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -