通过icon hash查IP地址

一、说明

  网络空间测绘搜索引擎FOFA物联网暗黑搜索引擎Shodan可以通过网站的icon计算出一个用来搜索目标的hash值:iconhash,信息收集过程中我们也可以通过iconhash去反差使用此icon的所有站点。

二、通过站点拿到iconhash

这里使用csdn的icon来举例

》》查看csdn官网,右键查看源代码,拿到icon的地址
在这里插入图片描述
》》访问此地址,将icon另存为本地(下载下来)
在这里插入图片描述
》》访问fofa将图片上传,即可查到此icon对应的iconhash
在这里插入图片描述
》》icon_hash如下:
在这里插入图片描述

三、通过iconhash反查站点

拿到了iconhash就可以通过fofa语法或者shodan查看此icon使用的所有国内外站点(网络空间全网资产测绘):
在这里插入图片描述

要动态修改 SVG 文件中的 path 值,需要使用 webpack 和 svg-sprite-loader 插件。以下是完整的配置: 1. 安装 svg-sprite-loader 插件 ```bash npm install svg-sprite-loader --save-dev ``` 2. 在 vue.config.js 中添加配置 ```javascript const path = require('path') function resolve(dir) { return path.join(__dirname, '.', dir) } module.exports = { chainWebpack: config => { const svgRule = config.module.rule('svg') svgRule.uses.clear() svgRule .use('svg-sprite-loader') .loader('svg-sprite-loader') .options({ symbolId: 'icon-[name]', extract: true, spriteFilename: 'img/icons.svg', runtimeCompat: true, publicPath: process.env.NODE_ENV === 'production' ? '/your/public/path/' : '/', symbolDest: 'img/icons/[name].svg', pluginHooks: { // 用于动态修改 path 值 beforeSanitizeElements: [function (sprite) { sprite.querySelectorAll('path').forEach((path) => { path.setAttribute('d', 'M0 0H10V10H0z') }) }] } }) const fileRule = config.module.rule('file') fileRule.uses.clear() fileRule .use('file-loader') .loader('file-loader') .options({ name: 'img/[name].[hash:8].[ext]' }) }, configureWebpack: { resolve: { alias: { '@': resolve('src') } } } } ``` 这里解释一下每个配置项的含义: - `symbolId`:设置 SVG sprite 的 symbol id 的名字,这里使用 `icon-[name]` 的方式命名 - `extract`:是否将构建后的 sprite 文件提取出来,默认为 true - `spriteFilename`:提取出来的 sprite 文件名称,默认为 `img/icons.svg` - `runtimeCompat`:兼容各种运行时,可以让你在 Vue 中使用 SVG sprite,如果使用了 Vue CLI 4.x,建议开启 - `publicPath`:构建后的 publicPath,建议使用绝对路径 - `symbolDest`:构建后的 sprite 文件存储路径,这里设置为 `img/icons/[name].svg` - `pluginHooks.beforeSanitizeElements`:使用插件钩子,在 sanitizeElements 之前修改 path 值 3. 在组件中使用 SVG sprite ```vue <template> <div> <svg aria-hidden="true" class="icon"> <use xlink:href="#icon-xxx"></use> </svg> </div> </template> <script> export default { name: 'ComponentName' } </script> <style scoped> .icon { width: 20px; height: 20px; fill: currentColor; } </style> ``` 其中,`xlink:href` 中的 `#icon-xxx` 对应到 SVG sprite 中的 symbol id,`fill: currentColor` 可以自动填充颜色。 注意:如果要修改 SVG sprite 中的 path 值,需要在插件钩子中进行修改,具体的修改方式可以根据实际情况进行调整。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

風月长情

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值