PHP 支付宝支付、订阅支付(周期扣款)整理汇总
最近项目中需要使用支付宝的周期扣款,整理一下各种封装方法
APP支付(服务端)
/******************************************************* 调用方法******************************************************/function test_pay(){$isSubscribe = 1;$price = 0.01;$detail = $body = "会员充值";$orderSn = date("mdHis") . mt_rand(2000, 8000);$hostApi = config('host_api');if (!$isSubscribe) { // 一次性支付$bizSontent = ["timeout_express" => "30m","product_code" => "QUICK_MSECURITY_PAY","total_amount" => $price,"subject" => $detail,"body" => $body,"out_trade_no" => $orderSn,];} else { // 订阅// 参见下文sign_scene参数说明 https://opendocs.alipay.com/open/08bg92?pathHash=b655de17$bizSontent = ["out_trade_no" => $orderSn,"total_amount" => $price, //订单总金额,首次支付的金额,不算在周期扣总金额里。"subject" => $detail,"body" => $body,"product_code" => "CYCLE_PAY_AUTH", // CYCLE_PAY_AUTH"timeout_express" => "90m",//商家扣款协议信息"agreement_sign_params" => ["product_code" => "GENERAL_WITHHOLDING",//收单产品码固定为GENERAL_WITHHOLDING"personal_product_code" => "CYCLE_PAY_AUTH_P", //个人签约产品码固定为CYCLE_PAY_AUTH_P"sign_scene" => "INDUSTRY|DEFAULT_SCENE",//协议签约场景,参见下文sign_scene参数说明 数字传媒行业"external_agreement_no" => $orderSn,//商户签约号,代扣协议中用户的唯一签约号
// "sign_notify_url" => $hostApi . "/v1/notify/alipay_sub",//签约成功异步通知地址"access_params" => [ //签约接入的方式"channel" => "ALIPAYAPP"],// 签约规则"period_rule_params" => ["period_type" => "DAY",//周期类型枚举值为 DAY 和 MONTH"period" => 9999,//周期数,与 period_type 组合使用确定扣款周期 // 扣款周期类型period_type参数为DAY时,扣款周期period参数不得小于7。"execute_time" => date('Y-m-d'),//用户签约后,下一次使用代扣支付扣款的时间"single_amount" => $price,//单次扣款最大金额
// "total_amount" => "0.02",//周期内扣允许扣款的总金额,单位为元
// "total_payments" => "2"//总扣款次数。]],];}$notiyUrl = $hostApi . '/notify/alipay';list($result, $responseNode) = PayUtil::pay($bizSontent, $notiyUrl);dump($result);}
异步回调
// 支付宝异步通知function alipay(){$verify = PayUtil::notifyVerify($_POST);$orderSn = addslashes($_POST['out_trade_no'] ?? ''); //商户订单号$trade_no = addslashes($_POST['trade_no'] ?? ''); //支付宝交易号$trade_status = trim(addslashes($_POST['trade_status'] ?? ''));if (!empty($trade_status)) { // 支付回调LogHelperUtil::outLog('alipay_notify_' . $trade_status, json_encode(['post' => $_POST, 'verify' => $verify]), 'alipay_notify');if (empty($orderSn)) {return "fail";}Db::name('order_log_alipay')->insert(['order_sn' => $orderSn, 'trans_id' => $trade_no, 'create_time' => date('Y-m-d H:i:s'),'content' => json_encode($_POST)]);$orderInfo = OrderModel::get_info(['order_sn' => $orderSn, 'status' => 0, 'pay_type' => 1]);if (!empty($orderInfo) && $trade_status == 'TRADE_SUCCESS') {$this->paySuccess($orderInfo, $trade_no);return "success";}if ($trade_status == 'TRADE_CLOSED') { // 退款return "success";}return "fail";}/**************************************************************** 订阅回调* 重要参数说明* status:协议状态,枚举支持。 NORMAL:正常 UNSIGN:解约。* external_agreement_no:标示用户的唯一签约协议号,商家自定义。仅签约接口传入时返回* agreement_no:支付宝系统中用以唯一标识用户签约记录的编号。* notify_type:异步通知类型,枚举支持。 dut_user_sign:当 status = NORMAL 表示签约成功。 dut_user_unsign:当 status = UNSIGN 表示解约成功。* sign_scene:签约协议场景。* personal_product_code:协议产品码。* alipay_user_id:用户的支付宝账号对应的支付宝唯一用户号。**********************************************************************/$status = $_POST['status'] ?? ''; // 协议状态,枚举支持。 NORMAL:正常 UNSIGN:解约。$notifyType = $_POST['notify_type'] ?? ''; // 异步通知类型,枚举支持。 dut_user_sign:当 status = NORMAL 表示签约成功。 dut_user_unsign:当 status = UNSIGN 表示解约成功。$orderSn = $_POST['external_agreement_no'] ?? ''; // 自定义$agreementNo = $_POST['agreement_no'] ?? '';Db::name('order_log_alipay_sub')->insert(['order_sn' => $orderSn, 'trans_id' => $agreementNo, 'create_time' => date('Y-m-d H:i:s'),'content' => json_encode($_POST)]);LogHelperUtil::outLog('alipay_notify_sub_' . $status, json_encode(['post' => $_POST, 'verify' => $verify]), 'alipay_notify_sub');if (empty($agreementNo)) {return "fail";}$orderInfo = OrderSubscribeModel::get_info(['order_sn' => $orderSn, 'pay_type' => 1]);$oid = intval($orderInfo['id'] ?? 0); // 订单IDif ($status == 'UNSIGN' && $notifyType == 'dut_user_unsign') { // 解约$response = OrderSubscribeModel::update_data(['id' => $oid], ['status' => 2, // 0-签约中 1-已订阅 2-已退订'contract_del_date' => date('Y-m-d H:i:s'), // 解约时间]);return "success";}// 0-签约中 1-已订阅 2-已退订if (!empty($orderInfo) && $status == 'NORMAL' && $notifyType == 'dut_user_sign') { // 签约成功// 记录签约成功的订单$response = OrderSubscribeModel::update_data(['id' => $oid], ['status' => 1, // 0-签约中 1-已订阅 2-已退订'agreement_no' => $agreementNo, // 签约号'contract_date' => date('Y-m-d H:i:s'), // 签约时间]);if ($response) {$toDay = date('Y-m-d');$kontDay = date('Y-m-d', strtotime("+1 day"));$nextPay = $orderInfo['next_pay'] ?? '';if ($nextPay == $kontDay || $toDay == $nextPay) {$notiyUrl = config('host_api') . '/notify/alipay_sub_knot?order_sn=' . $orderSn;send_socket_time_task($notiyUrl, 300);LogHelperUtil::outLog('alipay_notify_sub_' . $status, "已加入队列" . $notiyUrl, 'alipay_notify_sub');}}return "success";}return "fail";}
周期扣款操作(定时任务)
// 支付宝订阅自动扣款function alipay_sub_knot(){$orderSnSub = trim(addslashes($_GET['order_sn'] ?? ''));if (empty($orderSnSub)) {return 'fail-sn';}// 0-签约中 1-已订阅 2-已退订$orderInfo = OrderSubscribeModel::get_info(['order_sn' => $orderSnSub, 'status' => 1]);if (empty($orderInfo)) {return 'fail-order';}$type = $orderInfo['type'] ?? 0; $uid = $orderInfo['uid'] ?? 0;$priceRenew = $orderInfo['price_renew'] ?? 0; // 续订价格$agreementNo = $orderInfo['agreement_no'] ?? ''; // 签约号if (empty($agreementNo)) {return 'fail-order';}LogHelperUtil::outLog('alipay_sub_knot', json_encode(['orderSnSub' => $orderSnSub, 'order' => $orderInfo]), 'alipay_sub_knot');$detail = '周期扣款';$orderSn = "DYK{$type}U" . $uid . date("mdHis") . mt_rand(2000, 8000);list($result) = PayUtil::pay_sub_knot($orderSn, $detail, $priceRenew, $agreementNo);$resultCode = $result['code'] ?? 0;if ($resultCode != 10000) {LogHelperUtil::outLog('alipay_sub_knot_fail', json_encode(['orderSnSub' => $orderSnSub, 'order' => $orderInfo, 'result' => $result]), 'alipay_sub_knot');return "fail-result";}// 扣款成功,写入订单逻辑return "success";}
其他一下方法
function alipay_test(){$agreementNo = '20235529965404462663';list($res,$code) = PayUtil::agreementQuery($agreementNo); // 签约查询dump($res);// 周期性扣款协议执行计划修改list($res,$code) = PayUtil::agreementModify($agreementNo,'2023-11-01','购买了半年包月');dump($res);// 解约list($res,$code) = PayUtil::agreementUnsign($agreementNo);dump($res);return '';}
PayUtil 封装方法文件
<?phpnamespace pay\alipay;class PayUtil
{/*** 发起支付* 支付后签约场景:https://opendocs.alipay.com/pre-open/08bpuc?pathHash=a572b7a7* @param $bizSontent* @param $notiyUrl* @return array|string[]* @author wzb* @date 2023/7/22 9:50*/static function pay($bizSontent = [], $notiyUrl = ''){$alipayConfig = config('alipay_config'); // 配置if (empty($bizSontent) || empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayTradeAppPayRequest();$request->setNotifyUrl($notiyUrl);$request->setBizContent(json_encode($bizSontent));$result = $aop->sdkExecute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";return [$result, $responseNode];}/*** 查询交易信息** @param $outTradeNo* @return string[]|void* @author wzb* @date 2023/7/22 10:03*/static function queryOrder($outTradeNo = ''){$bizSontent = ["out_trade_no" => $outTradeNo,
// "trade_no"=>"DJ4U2407211930124801",
// "query_options"=>[
// "trade_settle_info", // 交易结算信息
// ]];$alipayConfig = config('alipay_config'); // 配置if (empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayTradeQueryRequest();$request->setBizContent(json_encode($bizSontent));$result = $aop->execute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";$response = $result->$responseNode;$response = json_decode(json_encode($response), true);return [$response, $responseNode];}/*** @param string $orderSn 订单号* @param string $detail 说明* @param int $totalAmount 扣款金额* @param string $agreement_no 签约号* @return array|string[]* @author wzb* @date 2023/7/29 10:50*/static function pay_sub_knot($orderSn, $detail, $totalAmount, $agreement_no){$bizSontent = ["out_trade_no" => $orderSn, //订单号"total_amount" => $totalAmount,"subject" => $detail,"product_code" => "GENERAL_WITHHOLDING",// 代扣信息。'agreement_params' => ["agreement_no" => $agreement_no,],];$alipayConfig = config('alipay_config'); // 配置if (empty($bizSontent) || empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayTradePayRequest();$request->setBizContent(json_encode($bizSontent));$result = $aop->execute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";$response = $result->$responseNode;$response = json_decode(json_encode($response), true);return [$response, $responseNode];}/*** 退款* @param $outTradeNo* @param $tradeNo* @param $refundAmount* @return array* @author wzb* @date 2023/7/25 17:14*/static function refundOrder($outTradeNo = '', $tradeNo = '', $refundAmount = 0){$bizSontent = ["out_trade_no" => $outTradeNo,"trade_no" => $tradeNo,"refund_amount" => $refundAmount,];$alipayConfig = config('alipay_config'); // 配置if (empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayTradeRefundRequest();$request->setBizContent(json_encode($bizSontent));$result = $aop->execute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";$response = $result->$responseNode;$response = json_decode(json_encode($response), true);return [$response, $responseNode];}/*** 查询签约接口* https://opendocs.alipay.com/open/3dab71bc_alipay.user.agreement.query?scene=8837b4183390497f84bb53783b488ecc&pathHash=9a0c5949* @return array|string[]* @author wzb* @date 2023/7/29 13:35*/static function agreementQuery($agreementNo){$bizSontent = ["agreement_no" => $agreementNo,];$alipayConfig = config('alipay_config'); // 配置if (empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayUserAgreementQueryRequest();$request->setBizContent(json_encode($bizSontent));$result = $aop->execute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";$response = $result->$responseNode;$response = json_decode(json_encode($response), true);return [$response, $responseNode];}/*** 解约* https://opendocs.alipay.com/open/b841da1f_alipay.user.agreement.unsign?scene=90766afb41f74df6ae1676e89625ebac&pathHash=a3599432* @param string $agreementNo 签约号(协议号)* @param string $orderSn 订单号 代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)。* @return array|string[]* @author wzb* @date 2023/7/29 13:49*/static function agreementUnsign($agreementNo, $orderSn){$bizSontent = ["agreement_no" => $agreementNo,"external_agreement_no" => $orderSn,];$alipayConfig = config('alipay_config'); // 配置if (empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayUserAgreementUnsignRequest();$request->setBizContent(json_encode($bizSontent));$result = $aop->execute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";$response = $result->$responseNode;$response = json_decode(json_encode($response), true);return [$response, $responseNode];}/*** 周期性扣款协议执行计划修改* https://opendocs.alipay.com/open/ed428330_alipay.user.agreement.executionplan.modify?pathHash=e019f106* @param string $agreementNo 签约号(协议号)* @param string $nextPay 商户下一次扣款时间 2023-01-01* @param string $memo 具体修改原因 64个字符* @return array|string[]* @author wzb* @date 2023/7/29 13:45*/static function agreementModify($agreementNo, $nextPay, $memo){$bizSontent = ["agreement_no" => $agreementNo,"deduct_time" => $nextPay,"memo" => $memo,];$alipayConfig = config('alipay_config'); // 配置if (empty($alipayConfig)) {return ['', ''];}$aop = new AopClient();$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';$aop->appId = $alipayConfig['appid'] ?? '';$aop->rsaPrivateKey = $alipayConfig['rsaPrivateKey'] ?? '';$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$aop->apiVersion = '1.0';$aop->signType = 'RSA2';$aop->postCharset = 'utf-8';$aop->format = 'json';$request = new \AlipayUserAgreementExecutionplanModifyRequest();$request->setBizContent(json_encode($bizSontent));$result = $aop->execute($request);$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";$response = $result->$responseNode;$response = json_decode(json_encode($response), true);return [$response, $responseNode];}/*** 验证* @param $arr* @return bool|string[]|null* @author wzb* @date 2023/7/22 10:33*/static function notifyVerify($arr){$alipayConfig = config('alipay_config'); // 配置if (empty($alipayConfig)) {return false;}$aop = new AopClient();$aop->alipayrsaPublicKey = $alipayConfig['alipayrsaPublicKey'] ?? '';$urlString = urldecode(http_build_query($arr));$data = explode('&', $urlString);$params = [];foreach ($data as $param) {$item = explode('=', $param, "2");$params[$item[0]] = $item[1];}$result = $aop->rsaCheckV1($params, null, 'RSA2');return $result;}
}
PHP服务端SDK
相关文章:
![](https://www.ngui.cc/images/no-images.jpg)
PHP 支付宝支付、订阅支付(周期扣款)整理汇总
最近项目中需要使用支付宝的周期扣款,整理一下各种封装方法 APP支付(服务端) /******************************************************* 调用方法******************************************************/function test_pay(){$isSubscri…...
![](https://www.ngui.cc/images/no-images.jpg)
python-pytorch基础之神经网络回归
这里写目录标题 定义数据集定义函数生成数据集 使用Dataloader加载dataset定义神经网络定义实例化查看是否是输出的一个 训练编写trian方法训练并保存模型 测试模型结果构造数据测试结论 定义数据集 import torch import random定义函数 # 生成数据 def get_rancledata():wid…...
![](https://www.ngui.cc/images/no-images.jpg)
linux中通过.desktop文件执行bash命令打开chrome浏览器并传参
.desktop 文件介绍 Ecex 参数介绍 Code 描述 %f %f指向临时文件。用于不了解URL语法的程序。 %F 文件列表。用于可以一次打开多个本地文件的应用程序。每个文件作为单独的参数传递给可执行程序。 %u 单一的URL或者本地文件 %U %u的复数 %i 如果Icon 为空,不应该填写此参数。…...
![](https://img-blog.csdnimg.cn/56fe69830b264b3d8e617d222c7e0605.jpeg)
ChatGPT的应用与发展趋势:解析人工智能的新风口
目录 优势 应用领域 发展趋势 总结 在人工智能技术迅猛发展的时代,自然语言处理系统的提升一直是研究者们追求的目标。作为人工智能领域的重要突破之一,ChatGPT以其出色的语言模型和交互能力,在智能对话领域取得了重要的进展。 ChatGPT是…...
![](https://www.ngui.cc/images/no-images.jpg)
使用maven打jar包时,如何只把依赖的其它jar中的类打进jar包,没有依赖的其它jar包的类文件不打进来?
简介 使用Maven打包时,默认情况下,所有依赖的jar包都会被打包到生成的jar文件中。 如果只想将依赖的其他jar中的类文件打进来,而不包含其它jar包,可以使用Maven的 maven-shade-plugin插件进行配置。 步骤 以下是一个示例配置&…...
![](https://img-blog.csdnimg.cn/31c5909968a140d09a930982d08ae6f1.png)
arm neon/fpu/mfloat
neon官网介绍: Arm Neon technology is an advanced Single Instruction Multiple Data (SIMD) architecture extension for the A-profile and R-profile processors. Neon technology is a packed SIMD architecture. Neon registers are considered as vectors of elements …...
![](https://img-blog.csdnimg.cn/bf6cc9a90fe249a5b5bcd6a2367acf8d.png#pic_center)
Maven基础之项目创建、packaging
文章目录 创建 maven 项目流程骨架是浮云,packaging 是关键 创建 maven 项目流程 通过骨架(archetype)创建 maven 工程 第一步:选择 new → maven → Maven Project 第二步:New Maven Project 窗口不作任何设置&…...
![](https://www.ngui.cc/images/no-images.jpg)
c++ std::map 使用注意事项
1. std::map 如果在添加元素前,直接去取 key-value,会怎样 ? 先说答案,map 在添加元素前,直接使用会给 key 添加默认的 value! 2. 问题背景 某项目代码报出个严重的bug,具体现象是某个 map…...
![](https://www.ngui.cc/images/no-images.jpg)
Camera HAL/ISP 专业术语大全
不断更新,建议收藏,快速检索 SOC,System On Chip,片上系统 HAL,Hardware Abstraction Layer,硬件抽象层 ISP,Image Signal Processor,图像信号处理器 KMD,Kernel Mod…...
![](https://www.ngui.cc/images/no-images.jpg)
POI的简单入门
POI的简单入门 导入jar包将数据写入Excel文件读取Excel文件中的数据 导入jar包 Apache POI的maven坐标 <dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>3.17</version> </dependency>…...
![](https://s2.loli.net/2023/02/11/bNjf3qaFmCPTZpl.png)
如何将笔记本作为另一台电脑的副屏显示
背景说明 台式电脑一个显示器不够我使用,而手头又没有多的显示器。我的笔记本有屏幕,但是不能直接连HDMI线给台式拓展屏幕。研究一段时间后发现,利用spacedesk软件可以基本完美解决这个问题。 效果演示 软件下载与安装 官网下载最新版(需要…...
![](https://www.ngui.cc/images/no-images.jpg)
深入理解正则表达式:为什么它在Java中如此重要?
文章目录 一、正则表达式1.1 为什么引入正则表达式1.2 什么是正则表达式 二、正则表达式规则2.1 正则表达式的基本语法规则2.2 非贪婪匹配 三、正则表达式在java中的应用3.1 String3.2 java.util.regex 参考资料 一、正则表达式 1.1 为什么引入正则表达式 在实际编写程序的过…...
![](https://img-blog.csdnimg.cn/834fc3d411d84297af0b362558c8092d.png)
jmeter实现webservice接口测试
其实可以用jmeter两种sampler进行webservice的测试: 1、SOAP/XML-RPC Request(但是在jmeter3.2以后版本中已经取消了这个取样器) 2、HTTP请求 下面分别介绍两种方式 一、首先需要使用soupUI工具抓取webservice接口的部分需要的信息。 1、新建项目 2、新建成功的…...
![](https://www.ngui.cc/images/no-images.jpg)
js 四舍五入保留一位小数 求百分比
概览:一个数据占一组数据的比率,并且四舍五入保留一位小数。通过Math.round()四舍五入。 参考链接: mdn中文文档Math.round() 实现思路: Math.round(x) 函数返回一个数字四舍五入后最接近的整数。参数x是一个数值 实现代码&a…...
![](https://img-blog.csdnimg.cn/85f7cdd43cc2412282f194d1a4124fb9.png)
文件上传漏洞总结2
文件上传的大体都已经学习过了 这个假期在给他强化一下 什么是webshell webshell是web入侵的脚本攻击工具。webshell就是一个asp或php木马后门,黑客在入侵了一个网站后,常常在将这些asp或php木马后门文件放置在网站服务器的web目录中,与正常…...
![](https://img-blog.csdnimg.cn/0c97fccfecd044e48edf6e97d226046a.png)
【组内工作】木马回联
文章目录 C2服务器安装和运行方法CrossC2运行方法sliver运行方法empire安装方法DeimosC2安装教程TrevorC2安装教程: C2服务器的流量特征CrossC21. 心跳包2. 命令3. ja3/ja3s Sliver1. http2. https empirehttphttps DeimosC2https TrevorC2 C2服务器安装和运行方法 …...
![](https://img-blog.csdnimg.cn/img_convert/05306c16b00d49ea8cda8930650882cb.jpeg)
未来将会有更多基于 Cortana 的设备
在前些日子的 Build 大会首日 Keynote 中,微软正式确认 HP 跟 Intel 也正在开发基于 Cortana 平台的联网家居产品,这是继推出 Invoke 喇叭的 Harman Kardon 后,又有知名大牌加入到 Cortana 的阵营当中,有这样的品牌资源背景&#…...
![](https://img-blog.csdnimg.cn/65752ddd1e844cd5af400d7f416f3e34.png)
嵌入式硬件系统的基本组成
嵌入式硬件系统的基本组成 嵌入式系统的硬件是以包含嵌入式微处理器的SOC为核心,主要由SOC、总线、存储器、输入/输出接口和设备组成。 嵌入式微处理器 每个嵌入式系统至少包含一个嵌入式微处理器 嵌入式微处理器体系结构可采用冯.诺依曼(Von Neumann&…...
![](https://www.ngui.cc/images/no-images.jpg)
def __init__(self, **kwargs):中的**kwargs是什么意思
**kwargs是什么意思 在Python中,**kwargs是一种特殊的参数形式,用于接收可变数量的关键字参数(Keyword Arguments)。kwargs是一个字典(dictionary),其中关键字是参数名,对应的值是传…...
![](https://www.ngui.cc/images/no-images.jpg)
web攻击面试|网络渗透面试(三)
Web攻击大纲 常见Web攻击类型: SQL注入攻击:介绍SQL注入攻击的概念、原理和常见的攻击方式,如基于错误消息的注入、基于布尔盲注的注入等。解释攻击者如何利用SQL注入漏洞获取敏感信息或者对数据库进行恶意操作,并提供防御措施&a…...
![](https://www.ngui.cc/images/no-images.jpg)
数据分析方法
常用的数据分析方法有:1、对比分析法;2、分组分析法;3、结构分析法;4、留存分析法;5、交叉分析法;6、漏斗分析法;7、矩阵分析法;8、象限分析法;9、趋势分析法;…...
![](https://www.ngui.cc/images/no-images.jpg)
Spring全家桶---白虎篇
其中包括:Spring、Spring6、Spring Data、Spring Cloud Alibaba、Spring Cloud、Spring Boot、Spring Security、SpringMVC。 👏作者简介:大家好,我是小童,Java开发工程师,CSDN博客博主,Java领域…...
![](https://www.ngui.cc/images/no-images.jpg)
深度优先搜索|79, 695,212
深度优先搜索|79. 单词搜索, 695. 岛屿的最大面积, 212. 单词搜索 II 单词搜索岛屿的最大面积单词搜索II 单词搜索 用的是深度优先搜索,这种判断类型的回溯我就一直不知道要怎么回退,然后勉强写了一个。 这里还有一个注意事项就是,走到最后一…...
![](https://www.ngui.cc/images/no-images.jpg)
论文阅读与管理方法论
文章目录 为什么读论文论文类型综述论文专题论文 论文质量角度关于如何找论文的小Tips如何整理论文读论文的困境如何读论文不同人群阅读差异读论文三部曲:泛读、精读、总结泛读:快速浏览,把握概要。泛读目标及效果自测 精读:选出精…...
![](https://www.ngui.cc/images/no-images.jpg)
基于OAI与Ueransim的5G网络切片平台构成简述
自定义多切片核心网构建 为了实现在同一台机器上同时对每一个切片启动一套单独的核心网,并且可以同时启动多套核心网,我们在官方提供的核心网模板的基础上进行适当的修改,扩展出其他可以正常运行的核心网,由此我们可以实现在同一…...
![](https://img-blog.csdnimg.cn/9ed0ce8e62fd467ea38b8ba44f04ab02.png)
论文笔记:Adjusting for Autocorrelated Errors in Neural Networks for Time Series
2021 NIPS 原来的时间序列预测任务是根据预测论文提出用一阶自回归误差预测 一阶差分,类似于ResNet的残差思路?记为pred,最终的预测结果...
![](https://img-blog.csdnimg.cn/eb0afdfc96304548ae0ff5957a023148.png)
DataEase开源BI工具安装_数据全量_增量同步_大屏拖拽自动生成_多数据源支持_数据血缘分析---大数据工作笔记0183
我这里用的是Centos7.9安装的 可以通过uname -p来查看一下我们的电脑架构,可以看到是x86_64架构的 我们下第一个,这个是x86架构的,第二个arm架构的 然后解压到/opt/module中 然后再去重命名一下文件夹. 推荐200G 本地模式的功能比较多 推荐100G...
![](https://www.ngui.cc/images/no-images.jpg)
如何提升程序员的软素质
目录 软素质包含哪些方面怎么做总结 软素质包含哪些方面 在项目研发迭代的过程中,确保一次上线顺利不难,难得是每次上线都顺利。对一个人或团队,只要有一次上线有问题,那在领导看来,你这个人或团队的工作是不靠谱的。…...
![](https://img-blog.csdnimg.cn/img_convert/6d7e10ddb411aa33c100d9589132cd83.png)
msvcp100.dll丢失怎么修复,这三个常用的修复方法可以解决
msvcp100.dll是一个动态链接库文件,它是Microsoft Visual C Redistributable软件包的一部分。这个文件的作用是提供在运行C程序时所需的函数和功能。msvcp100.dll是一个非常重要的文件,它为我们提供了许多关键的函数和类,使得我们能够更高效地…...
![](https://img-blog.csdnimg.cn/feb48fa22c324b928995f6d8a2103d18.png)
python实现递推算法解决分鱼问题
一、问题描述 A、B、C、D、E5个人合伙夜间捕鱼,凌晨时都已经疲惫不堪,于是各自在河边的树丛中找地方睡着了。第二天日上三竿时,A第一个醒来,他将鱼平分为5份,把多余的一条扔回河中,然后拿着自己的一份回家…...
![](/images/no-images.jpg)
wordpress基本教程/微商软文范例大全100
Java Number内置数据类型:byte int long short double 等int i 10;float i 10.5f;实际开发中,经常遇到使用对象,而不是内置数据类型,包装类(Integer Long Double Float Short)都是抽象类 Number的子类内置数据类型被当作对象使用…...
![](https://img-blog.csdnimg.cn/img_convert/e0ed1ebb179bddf47b26d9099dbfca53.png)
自己怎么建h5商城网站/网站按天扣费优化推广
训练大纲(第121天)大家如果想快速有效的学习,思想核心是“以建立知识体系为核心”,具体方法是“守破离”。确保老师课堂上做的操作,反复练习直到熟练。第241次(httpPool&Hystrix)学习主题:httpPool&Hystrix学习目标&#…...
![](https://img-blog.csdnimg.cn/img_convert/49a07c73b54cd865d67aa4b22d507353.png)
个人空间备案网站名称/网站增加外链的方法有哪些
关注公众号【秋叶 Excel】回复关键词【工具】获取 Excel 高效小工具合集,让你效率开挂!本文作者:竺兰本文来源:秋叶Excel(ID:Excel100)本文编辑:思雨、竺兰距离下班还有俩小时,我伸了伸懒腰,想着…...
![](/images/no-images.jpg)
wordpress媒体库空白/网络推广大概需要多少钱
Linuxqq安装及其所引发的问题{权限位是 777 (必须 >0755 且 <0755)},linuxqq777oghostloghost-virtual-machine:~$ ~/home/loghost/qq$ sudo dpkg -i linuxqq_v1.0.2_beta1_i386.debbash: /home/loghost/home/loghost/qq$:没有那个文件或目录//问题1出现rootl…...
![](https://img2018.cnblogs.com/blog/1467309/201812/1467309-20181203193453037-41934405.png)
政府网站站群建设方案/搜索引擎技巧
Spring-Boot-2.0.0-M1版本将默认的数据库连接池从tomcat jdbc pool改为了hikari,这里主要研究下hikari的默认配置 0. 创建Spring Boot项目,选中 Web、MySQL、JDBC 依赖 1. 启动类默认加载了DataSourceAutoConfiguration,默认数据源是HikariD…...
怎么在网站上做签到/郑州seo多少钱
电脑一直都很擅长视觉识别。有时它们识别一系列图像中某个个体的能力能够与人类相媲美。但相似的结果是否说明了电脑能够模拟人类的视觉系统呢?回答这个问题或许可能会发现电脑系统比不上人类的地方。 《美国科学院院刊》发表了一篇论文提到了电脑和人类视觉系统的不…...