使用 sqlmap 根据变量位置定点注入 restful api

使用 sqlmap 根据变量位置定点注入 restful api sqlmap 是一款强劲自动化的 sql 注入工具, 使用 python 开发, 支持 python 2/3。 RESTful API 规则几乎是当前开发执行的默认规范。 在 restful 接口中, 常常将变量位置放置在 url 中。 例如 http://127.0.0.1:8080/{user}/profile , 其中 {user} 就是变量,根据代码实现方式,可以等价于 http://127.0.0.1:8080/profile?user={user} 。 那么, 在对这类 restful 接口进行 sql 注入的时候,又该注意什么呢? 本文将……

阅读全文

minio 使用 lego 实现 https

minio 使用 lego 实现 https 访问 minio 提供两种 https 访问。 推荐 在启动过程中使用 certs 证书。 此种方法最后只提供 https 访问。 使用 https 代理。 nginx proxy caddy proxy 1 2 3 4 5 6 7 8 9 10 $ tree . -L 3 . ├── certs │ ├── CAs │ ├── private.key │ └── public.crt ├── data ├── entrypoint.sh ├── minio 1 2 3 4 5 6 7 8 9 #!/bin/bash # entrypoint.sh cd $(dirname $0) DIR=$(pwd) export MINIO_ACCESS_KEY=minio export MINIO_SECRET_KEY=miniostorage ./minio --certs-dir ${DIR}/certs server ${DIR}/data troubleshoot the ECDSA curve ‘P-384’ is not supported ERROR Unable to load the……

阅读全文

使用 s3cmd 为 cephfs 设置 policy

使用 s3cmd 为 cephfs rgw 设置 policy cephfs rgw 模式完全兼容 aws 的 s3v4 协议。 因此对 cephfs rgw 的日常管理, 可以使用 s3cmd 命令操作。 策略 配置策略 全局读策略 1 2 3 4 5 6 7 8 9 10 # cat public-read-policy.json { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "*" }] } 设置策略 1 $ s3cmd setpolicy public-read-policy.json s3://example-bucket 查看 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ s3cmd info s3://example-bucket s3://example-bucket/ (bucket): Location: default Payer: BucketOwner Expiration Rule: none policy: { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "*"……

阅读全文

使用 docker buildx 实现多平台编译 - 案例篇

使用 docker buildx 实现多平台编译 - 案例篇 之前的文章中 使用 docker buildx 实现多平台编译 - 环境篇 介绍了如何部署 docker buildx 环境。 笔者本文将要分享自身在使用中的几个比较有意义的案例 0x00 先说结论 docker buildx 本身运行于容器环境, 所以 scheduler 和 builder 本机配置(ex, /etc/hosts, /etc/docker/daemon.json ) 的大部分配置和场景 其实是不可用的。 使用 ssh://user@host 可以方便的执行远程构建, 尤其……

阅读全文

Dockerfile 中 ARG 的使用与其的作用域探究

只有搞懂 Dockerfile 中的 ARG 作用域, 才能算 Build 镜像 CI 刚入门 之前我们讨论了 面试问 Dockerfile 的优化, 千万不要只会说减少层数 , 详细说明 Dockerfile 的优化原理和操作方法, 给大家概括了 简单易记 的口诀。 今天, 我们继续来探讨一下, Dockerfile 中的另外一个利器 – ARG。 如果说掌握 Dockerfile 的优化, 勉强算作读完秘籍的目录。 那只有 熟练 掌握了 ARG 的用法……

阅读全文

tidb 备份恢复与迁移

tidb 备份恢复与迁移 https://pingcap.com/docs-cn/v2.1/reference/tools/download/ 1 wget https://download.pingcap.org/tidb-enterprise-tools-latest-linux-amd64.tar.gz 使用 mydumper 从 mysql/tidb 备份数据 https://pingcap.com/docs-cn/v2.1/how-to/maintain/backup-and-restore/ 使用 mydumper 备份 mydumper: https://github.com/maxbube/mydumper/releases 1 mydumper -h 127.0.0.1 -P 4000 -u root -t 32 -F 64 -B test -T t1,t2 --skip-tz-utc -o ./var/test 我们使用 -B test 表明是对 test 这个 database 操作,然后用 -T t1,t2 表明只导出 t1,t2 两张表。 -t 32 表明使用 32 个线程去导出数据。-F 64 是将实际的 table 切分成多大的 chunk,这里就是 64MB 一个 chunk。 --skip-tz-utc 添加这个参……

阅读全文

使用 cfssl 自签证书

Generate self-signed certificates If you build Container Linux cluster on top of public networks it is recommended to enable encryption for Container Linux services to prevent traffic interception and man-in-the-middle attacks. For these purposes you have to use Certificate Authority (CA), private keys and certificates signed by CA. Let’s use cfssl and walk through the whole process to create all these components. NOTE: We will use basic procedure here. If your configuration requires advanced security options, please refer to official cfssl documentation. Download cfssl CloudFlare’s distributes cfssl source code on github page and binaries on cfssl website . Our documentation assumes that you will run cfssl on your local x86_64 Linux host. 1 2 3 4 5 mkdir ~/bin curl -s -L -o ~/bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 curl -s -L -o ~/bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 chmod +x ~/bin/{cfssl,cfssljson} export PATH=$PATH:~/bin Initialize a certificate authority……

阅读全文

harbor 使用 s3v4 兼容模式对象存储保存数据

harbor使用 s3v4 兼容模式的对象存储数据 harbor v2.0.0 测试通过 qingcloud qingstor 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 # The default data volume data_volume: /data # Harbor Storage settings by default is using /data dir on local filesystem # Uncomment storage_service setting If you want to using external storage # storage_service: # # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore # # of registry's and chart repository's containers. This is usually needed when the user hosts a internal storage with self signed certificate. # ca_bundle: #……

阅读全文

gitlab 使用青云 qingstor 对象存储作为存储

gitlab 使用青云 qingstor 对象存储作为存储 使用 s3 compatible 模式, 腾讯云、阿里云、华为云、青云 都可以实现。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # https://docs.gitlab.com/ce/administration/job_artifacts.html gitlab_rails['artifacts_enabled'] = true gitlab_rails['artifacts_object_store_enabled'] = true gitlab_rails['artifacts_object_store_remote_directory'] = "gitlab-storage-artifacts" gitlab_rails['artifacts_object_store_connection'] = { # s3v4 compatible mode # https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/examples/objectstorage/rails.minio.yaml 'provider' => 'AWS', 'region' => 'us-east-1', 'aws_access_key_id' => 'ACID_XXXXXXXXXXXXXXXXX', 'aws_secret_access_key' => 'ACKEY_YYYYYYYYYYYYYYYY', 'aws_signature_version' => 4, 'host' => 's3.pek3b.qingstor.com', 'endpoint' => "http://s3.pek3b.qingstor.com", 'path_style' => true }……

阅读全文

TiDB 2.1 备份恢复与迁移

TiDB 2.1 备份恢复与迁移 备份 https://pingcap.com/docs-cn/v2.1/how-to/maintain/backup-and-restore/ 使用 mydumper 备份 mydumper: https://github.com/maxbube/mydumper/releases 1 mydumper -h 127.0.0.1 -P 4000 -u root -t 32 -F 64 -B test -T t1,t2 --skip-tz-utc -o ./var/test 我们使用 -B test 表明是对 test 这个 database 操作,然后用 -T t1,t2 表明只导出 t1,t2 两张表。 -t 32 表明使用 32 个线程去导出数据。-F 64 是将实际的 table 切分成多大的 chunk,这里就是 64MB 一个 chunk。 --skip-tz-utc 添加这个参数忽略掉 TiDB 与导数据的……

阅读全文

福利派送

  • (免费星球)「运维成长路线」

  • 又拍云免费 CDN

最近文章

分类

标签

其它