搜索網站icon的hash值


一、安裝python相關庫

https://www.shodan.io/     國外平台需要登錄才能使用

    比  https://www.zoomeye.org/ 鍾馗之眼 最早的     https://fofa.so/ 白客打造       還早

可以搜索icon圖標
語法:http.favicon.hash:-1507567067  (shodan網站語法)
問題:如何計算icon的 hash值
atp-get install python-dev
pip install mmh3
pip install requests
二、編寫python腳本
vim icon_hash.py


#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: superbean
# @Date: 2021-01-06 16:25:38
# @Last Modified by: subin
# @Last Modified time: 2021-01-06 16:30:08

import mmh3
import requests

response = requests.get('https://目標網址/favicon.ico')
favicon = response.content.encode('base64')
hash = mmh3.hash(favicon)
print hash

用於計算icon的hash值

踩坑日記:在之前安裝memcached時python未進行指定版本執行pip的安裝腳本,導致pip綁定python3.
python2.7 get-pip.py
實驗日志1:kali上無法安裝mmh3庫,真是操了
實驗日志2:已解決無法安裝mmh3庫的原因---->升級tools
      升級setuptools, 再安裝即可。
      error: invalid command 'egg_info' 解決辦法
      pip install --upgrade setuptools.
      運行執行腳本執行正常

 

-------------------------------------轉載文章--error: invalid command 'egg_info' 解決辦法--------------------------------------------

【已解決】安裝pyleus遇到的'bdist_wheel'錯誤

墨羯 2015-09-22 14:21:53 26870 收藏
文章標簽: python 安裝
版權
今天用pip命令安裝pyleus時遇到以下錯誤
Failed building wheel for PyYAML
Running setup.py bdist_wheel for msgpack-python
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-685OEx/msgpack-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpUJDHTSpip-wheel-:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: invalid command 'bdist_wheel'

查了下bdist_wheel,發現似乎是pip的一個子命令,wheel本質上是一種zip包,用於py模塊的安裝,它的出現是為了替代Eggs。

嘗試運行pip wheel,果然有告錯

ERROR: 'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptools

於是根據它的建議,升級pip的安裝工具setuptools ,命令是
sudo pip install --upgrade setuptools
再試,出現如下信息
[linyc@localhost etc]$ pip wheel
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You must give at least one requirement to wheel (see "pip help wheel")


我不確定pip本身升級是不是必要,讀者可以試一試不升級而直接安裝pyleus

升級pip完畢,嘗試pip安裝pyleus,啊,提示已存在。那么先uninstall,再安裝
一陣等待……后,ok搞定
————————————————
版權聲明:本文為CSDN博主「墨羯」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/jishan7/article/details/48653659

----------------------------------------------------------------------------------------------------------------------------------------------------------------


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM