2
if __name__ == '__main__':
top_100_domains = ['google.com','facebook.com','youtube.com','yahoo.com','baidu.com','wikipedia.org','live.com','qq.com','twitter.com','amazon.com','linkedin.com','blogspot.com','google.co.in','taobao.com','sina.com.cn','yahoo.co.jp','msn.com','google.com.hk','wordpress.com','google.de','google.co.jp','google.co.uk','ebay.com','yandex.ru','163.com','google.fr','weibo.com','googleusercontent.com','bing.com','microsoft.com','google.com','babylon.com','soso.com','apple.com','mail.ru','t.co','tumblr.com','vk.com','google.ru','sohu.com','google.es','pinterest.com','google.it','craigslist.org','bbc.co.uk','livejasmin.com','tudou.com','paypal.com','blogger.com','xhamster.com','ask.com','youku.com','fc2.com','google.com.mx','xvideos.com','google.ca','imdb.com','flickr.com','go.com','tmall.com','avg.com','ifeng.com','hao123.com','zedo.com','conduit.com','google.co.id','pornhub.com','adobe.com','blogspot.in','odnoklassniki.ru','google.com.tr','cnn.com','aol.com','360buy.com','google.com.au','rakuten.co.jp','about.com','mediafire.com','alibaba.com','ebay.de','espn.go.com','wordpress.org','chinaz.com','google.pl','stackoverflow.com','netflix.com','ebay.co.uk','uol.com.br','amazon.de','ameblo.jp','adf.ly','godaddy.com','huffingtonpost.com','amazon.co.jp','cnet.com','globo.com','youporn.com','4shared.com','thepiratebay.se','renren.com']
gp = GPing
for domain in top_100_domains:
gp.send(domain,test_callback)
gp.join()
ERROR:
gp.send(Domain,test_callback) Typeerror: Unbound method send() must be called with Gping instance as first argument (got str instance Instead)
Are you using Python 3 or Python 2? Try using it like this
gp = GPing()
– Guilherme Nascimento
I’m using the 2, I put the parentheses and presents another error, previously I was with and I took to try to solve.
– Yúlia
And what would this other mistake be?
– Guilherme Nascimento
raise socket.error(msg) socket.error: Operation not permitted - Note that ICMP messages can only be sent from processes running as root.
– Yúlia
Yulia try to run as root, if it’s Debian or Ubuntu try
sudo
– Guilherme Nascimento
I’ll try to!!!!!
– Yúlia