CSRF (XSRF): Cross-Site Request Forgery, 跨站请求伪造

典型案例:Gmail CSRF 漏洞设置邮件转发,Weibo CSRF 漏洞自动关注账号。

CSRF 漏洞挖掘

Burp Suite
CSRF Tester
github.com/s0md3v/Bolt

防御思路

区分请求来自自己的前端页面还是第三方网站
或让自己的前端页面的请求与伪造请求不一样

HTTP Request Header: Referer: 引用页,来源页面,用于跟踪来源,如访问统计和广告效果

阅读全文 »

客户端的 Cookie: 记录登录状态,跟踪用户行为

服务端的 Session

获取和设置:

document.cookie;
document.cookie=‘name=abc’;

无法删除,只能通过更改过期时间删除。

脚本注入网页:XSS (Cross Site Script)

<script>alert(1)</script>
阅读全文 »

第一章

MySQL 语法

union 查询需要前后语句查询字段数量相同

order by 字段名/数字

MySQL 系统库

information_schema 库:信息数据库,保存关于 MySQL 服务器维护的所有其他水库的信息

  • SCHEMATA 表:提供当前 MySQL 实例中所有数据库信息
  • TABLES 表:提供关于数据中表的信息,table_name
  • COLOMNS 表:提供表的列信息,column_name

performance_schema 库:数据库服务器性能参数

mysql 库:核心数据库,存储数据库的用户(账户)信息

sys 库:系统数据库,结合了 information_schema 和 performance_schema 库的内容

阅读全文 »

域名信息收集

whois

  • whois 查询
  • whois 反查
  • kali 中的 whois 命令
  • 隐私保护
  • icp 备案查询

子域名

  • 字典猜解
  • 枚举

子域名挖掘:

  • layer
  • subDomainsBurute
阅读全文 »

选取模型为SenseVoiceSmall.

开始运行前首先需要将模型转换为 OpenVINO IR 格式. 原模型为 PyTorch 框架, 可以利用以下代码保存为 ONNX 格式.

onnx_model = onnx.load(model_path)
onnx.save_model(onnx_model,
'saved_model.onnx',
save_as_external_data=True,
all_tensors_to_one_file=True,
location='data/weights_data',
size_threshold=1024,
convert_attribute=False)

也可以直接下载 FunASR 官方提供的SenseVoiceSmall-onnx模型. 准备好 ONNX 格式模型后, 可以利用 OpenVINO 提供的moovc工具将其转换为 OpenVINO IR 格式. 在最新的 OpenVINO 版本中, mo工具已经被更简化的OpenVINO Model Converterovc工具所替代.

mo --input_model <INPUT_MODEL>.onnx

此命令会将模型优化并导出为 OpenVINO IR 格式模型. 注意, --compress_to_fp16默认处于开启状态, 会将模型压缩至 fp16 精度, 正常情况下不会导致明显的精度损失.

可以通过如下代码加载并编译 OpenVINO IR 模型.

阅读全文 »

img

让我们从阳台上看看星星吧,

或者一起读一读奥威尔.

-- Японское порно

参考: jacket | JLT4n

矩阵乘法

配置 Python 环境, 安装 git (用于从 huggingface 下载模型) 后, 运行项目提供的矩阵乘法示例代码:

from intel_npu_acceleration_library.backend import MatMul
import numpy as np

inC, outC, batch = 512, 256, 32

# Create both inputs
X1 = np.random.uniform(-1, 1, (batch, inC)).astype(np.float16)
X2 = np.random.uniform(-1, 1, (outC, inC)).astype(np.float16)

mm = MatMul(inC, outC, batch, profile=False)

result = mm.run(X1, X2)

注意到运行程序时有如下提示:

UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import parse_version

查阅资料知是由于新版setuptools弃用旧版语法导致, 卸载并重新安装 67.6.1 版本解决.

该程序计算了一个32×512矩阵和一个512×256矩阵相乘, 输出result.shape结果为

(32, 256)

知输出结果正确, 代码可正常运行.

阅读全文 »

作者: TinyLlama/TinyLlama-1.1B-Chat-v1.0

转载请不要注明出处

Ask something: fuck you
Run inference
fuck you you and me.
You can’t go against my opinion and I am just waiting for the next round.
Fast paced rhyming poem for your students to learn and practice how to create a rhyming pattern.
To be perfect and fit.
In your heart and your eyes.
We are not afraid we are not afraid.
Is like a handshake. A hug.
For this is our fight the fight.
So when your head’s just about to burst.
You need this right now and you need this just.
This one for you right now and this one for you right.
No this one for me and this one for you.
Your life is not in danger you can’t feel.
You have a life but that is not all the.
You need to feel. That’s right you feel.
You need to hear. That’s right you hear.
You need to feel. You hear.
You need to feel. You have a life.

阅读全文 »

不知道为什么, 其实很多事情, 比如实习, 考驾照, 进实验室, 本身可能都没什么难度, 或者至少没什么明显的阻碍, 但一想到这些事情我就会莫名其妙地非常焦虑且烦躁, 然后就硬拖着不做. 很奇怪.

然后反正折腾了一段时间, 现在在深圳的某公司实习, 入职培训一上午说了一堆废话, 然后现在在干坐着等布置任务. 主要是不太方便光明正大打游戏, 不然我已经环世界启动了.

上周日去带了个家教, 在一个从来没听过的小区, 到地方发现条件实在不怎么好, 住宿条件跟老家差不多, 恍惚间还能闻到鸡史味, 导致我实在不好意思多收钱, 底价 430 我只好意思收了 300. 有没有人能给我介绍几个特别讨人厌的有钱人, 让我心安理得地狠狠宰一笔.

0%