openbuckets / sdk-php
OpenBuckets 基于网络的工具是一个强大的实用程序,它允许用户通过简单的查询快速定位云存储系统中的开放存储桶。此外,它还提供了一个方便的方式来搜索这些开放存储桶中的各种文件类型,成为安全专业人士的必备工具。
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
The OpenBuckets web-based tool is a powerful utility that allows users to quickly locate open buckets in cloud storage systems through a simple query. In addition, it provides a convenient way to search for various file types across these open buckets, making it an essential tool for security professionals, researchers, and anyone interested in discovering exposed data. This Postman collection aims to showcase the capabilities of OpenBuckets by providing a set of API requests that demonstrate how to leverage its features. By following this collection, you'll learn how to utilize OpenBuckets to identify open buckets and search for specific file types within them.
安装与使用
要求
PHP 7.4 及更高版本。也应适用于 PHP 8.0。
Composer
要使用 Composer 安装绑定,请将以下内容添加到 composer.json
composer require openbuckets/sdk-php
然后运行 composer install
手动安装
下载文件并包含 autoload.php
<?php require_once('/path/to/openbuckets/vendor/autoload.php');
入门
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure Bearer authorization: bearerAuth $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\Client\Api\BucketsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $keywords = abg; // string | the search keywords to filter bucket names (e.g., \"abg\") $type = aws; // string | the type of bucket to filter (e.g., aws,dos,azure,gcp) $exact = 0; // string | whether to perform an exact match for the keywords (0 for false, 1 for true) $start = 0; // string | starting index for pagination $limit = 1000; // string | number of search results to return per page $order = fileCount; // string | the sorting field for the search results (e.g., \"fileCount\" for sorting by file count) $direction = asc; // string | the sorting direction for the search results (e.g., \"asc\" for ascending) try { $result = $apiInstance->searchBuckets($keywords, $type, $exact, $start, $limit, $order, $direction); print_r($result); } catch (Exception $e) { echo 'Exception when calling BucketsApi->searchBuckets: ', $e->getMessage(), PHP_EOL; }
API 端点
所有 URI 都是相对于 https://api.openbuckets.io
模型
授权
为 API 定义的认证方案
bearerAuth
- 类型: Bearer 认证
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
OpenBuckets