AWD比赛中的一些防护思路技巧
## 思路1:
1、改服务器密码
(1)linux:passwd
(2)如果是root删除可登录用户:cat /etc/passwd | grep bash userdel -r 用户名
(3)mysql:update mysql.user set password=md5(‘密码’) where user=‘root’;
进入mysql:5.7之后的版本
update user set authentication_string=password(“您要修改的密码”) where user=“root”;
(4)mysql删除匿名空用户:delete from mysql.user where user=’ ';
(5)数据库刷新:flush privileges;
(6)修改网站后台密码:页面,源码,御剑扫描,尝试弱口令进去改管理密码
2、web防护
(1)打包网站目录/var/www/html :tar -cvf xxx.tar 打包对象/*
(2)ssh ftp 将文件拉到本地
①ssh :scp root@192.168.16.8:/root/flag.txt /root/
②ftp:#ftp [IP地址] #get [文件名] 或者用ftp登入软件下载
(3)d盾查杀木马文件,删除文件
①:rm -rf 文件
②:echo其为空:html目录下:echo > xx.php 两个空格
3、站点实时守护
(1)查看进程 关闭现有连接的IP
①:who获取pts,pkill -kill -t pts/进程号
(2)http下新增文件 删除:find ./ -cmin -30 rm -rf 或制空 echo
(3)不死马抗衡删除
创建文件:vim killshell.sh
#!/bin/bash
while true
do
rm -rf xxx.php
done
赋予权限 运行:chmod 777 killshell.sh nohup ./killshell.sh &
进程查看:ps -aux | grep killshell.sh
(4)发现存在漏洞页面,考虑制空
echo > xxx.php
ps:
平台可能root密码为toor 或者内核溢出提权4.4.0-31-generic Ubuntu 内核。
chmod 777 payload (可能需要编译)
./payload
root后删除curl ,防止读取文件 rm -rf /bin/curl
攻击思路:
(1)22端口的弱口令攻击
(2)通过已知的木马,编写读取脚本
(3)不死马种植
思路2:
文件备份与监控
部署监控脚本:无python环境使用jiank_kpy2_z
上传文件后:chmod +x jiank_kpy_z
./执行,选择监控位置:/www/wwwroot/xxx
自动备份文件:www/wwwroot
有python环境:python3 py3监控.py
waf脚本:linux
找到网站子目录上传waf 找到index.php文件包含 waf文件
在第二行包含 include ‘waf3_ruoji_1.php’;保存
会在tmp/1log生成日志文件
当攻击者访问带有flag语句 则会执行假的flag输出
ip封禁
当监控到访问数据包
ip_heimd上传到子目录下
并且包含在waf前面
include ‘ip_heimd.php’;
include ‘waf3_ruoji_1.php’;
考虑封多个IP?
python3搅屎:将对方url输入 持续发送垃圾数据包
ip资产收集 py脚本 循环url
指纹识别 离线 目录扫描 御剑 d盾 w13scan
waf监控脚本
实时监测本地文件的缺失增加
# -*- coding: utf-8 -*-
import os
import re
import hashlib
import shutil
import ntpath
import time
import sys# 设置系统字符集,防止写入log时出现错误
reload(sys)
sys.setdefaultencoding('utf-8')CWD = raw_input('脚本监控位置:') # 脚本监控位置CWD_path =raw_input('备份文件位置位置:')# 备份文件路径
FILE_MD5_DICT = {} # 文件MD5字典
ORIGIN_FILE_LIST = []# 特殊文件路径字符串
Special_path_str = 'drops_B0503373BDA6E3C5CD4E5118C02ED13A' #drops_md5(icecoke1024)
bakstring = 'back_CA7CB46E9223293531C04586F3448350' #bak_md5(icecoke1)
logstring = 'log_8998F445923C88FF441813F0F320962C' #log_md5(icecoke2)
webshellstring = 'webshell_988A15AB87447653EFB4329A90FF45C5'#webshell_md5(icecoke3)
difffile = 'difference_3C95FA5FB01141398896EDAA8D667802' #diff_md5(icecoke4)Special_string = 'drops_log' # 免死金牌
UNICODE_ENCODING = "utf-8"
INVALID_UNICODE_CHAR_FORMAT = r"\?%02x"# 文件路径字典
spec_base_path = os.path.realpath(os.path.join(CWD_path, Special_path_str))
Special_path = {'bak' : os.path.realpath(os.path.join(spec_base_path, bakstring)),'log' : os.path.realpath(os.path.join(spec_base_path, logstring)),'webshell' : os.path.realpath(os.path.join(spec_base_path, webshellstring)),'difffile' : os.path.realpath(os.path.join(spec_base_path, difffile)),
}def isListLike(value):return isinstance(value, (list, tuple, set))# 获取Unicode编码
def getUnicode(value, encoding=None, noneToNull=False):if noneToNull and value is None:return NULLif isListLike(value):value = list(getUnicode(_, encoding, noneToNull) for _ in value)return valueif isinstance(value, unicode):return valueelif isinstance(value, basestring):while True:try:return unicode(value, encoding or UNICODE_ENCODING)except UnicodeDecodeError, ex:try:return unicode(value, UNICODE_ENCODING)except:value = value[:ex.start] + "".join(INVALID_UNICODE_CHAR_FORMAT % ord(_) for _ in value[ex.start:ex.end]) + value[ex.end:]else:try:return unicode(value)except UnicodeDecodeError:return unicode(str(value), errors="ignore")# 目录创建
def mkdir_p(path):import errnotry:os.makedirs(path)except OSError as exc:if exc.errno == errno.EEXIST and os.path.isdir(path):passelse: raise# 获取当前所有文件路径
def getfilelist(cwd):filelist = []for root,subdirs, files in os.walk(cwd):for filepath in files:originalfile = os.path.join(root, filepath)if Special_path_str not in originalfile:filelist.append(originalfile)return filelist# 计算机文件MD5值
def calcMD5(filepath):try:with open(filepath,'rb') as f:md5obj = hashlib.md5()md5obj.update(f.read())hash = md5obj.hexdigest()return hash
# 文件MD5消失即为文件被删除,恢复文件except Exception, e:print u'[*] 文件被删除 : ' + getUnicode(filepath)shutil.copyfile(os.path.join(Special_path['bak'], ntpath.basename(filepath)), filepath)for value in Special_path:mkdir_p(Special_path[value])ORIGIN_FILE_LIST = getfilelist(CWD)FILE_MD5_DICT = getfilemd5dict(ORIGIN_FILE_LIST)print u'[+] 被删除文件已恢复!'try:f = open(os.path.join(Special_path['log'], 'log.txt'), 'a')f.write('deleted_file: ' + getUnicode(filepath) + ' 时间: ' + getUnicode(time.ctime()) + '\n')f.close()except Exception as e:print u'[-] 记录失败 : 被删除文件: ' + getUnicode(filepath)pass# 获取所有文件MD5
def getfilemd5dict(filelist = []):filemd5dict = {}for ori_file in filelist:if Special_path_str not in ori_file:md5 = calcMD5(os.path.realpath(ori_file))if md5:filemd5dict[ori_file] = md5return filemd5dict# 备份所有文件
def backup_file(filelist=[]):for filepath in filelist:if Special_path_str not in filepath:shutil.copy2(filepath, Special_path['bak'])if __name__ == '__main__':print u'---------持续监测文件中------------'for value in Special_path:mkdir_p(Special_path[value])# 获取所有文件路径,并获取所有文件的MD5,同时备份所有文件ORIGIN_FILE_LIST = getfilelist(CWD)FILE_MD5_DICT = getfilemd5dict(ORIGIN_FILE_LIST)backup_file(ORIGIN_FILE_LIST) print u'[*] 所有文件已备份完毕!'while True:file_list = getfilelist(CWD)# 移除新上传文件diff_file_list = list(set(file_list) ^ set(ORIGIN_FILE_LIST))if len(diff_file_list) != 0:for filepath in diff_file_list:try:f = open(filepath, 'r').read()except Exception, e:breakif Special_string not in f:try:print u'[*] 查杀疑似WebShell上传文件: ' + getUnicode(filepath)shutil.move(filepath, os.path.join(Special_path['webshell'], ntpath.basename(filepath) + '.txt'))print u'[+] 新上传文件已删除!'except Exception as e:print u'[!] 移动文件失败, "%s" 疑似WebShell,请及时处理.'%getUnicode(filepath)try:f = open(os.path.join(Special_path['log'], 'log.txt'), 'a')f.write('new_file: ' + getUnicode(filepath) + ' 时间: ' + str(time.ctime()) + '\n')f.close()except Exception as e:print u'[-] 记录失败 : 上传文件: ' + getUnicode(e)# 防止任意文件被修改,还原被修改文件md5_dict = getfilemd5dict(ORIGIN_FILE_LIST)for filekey in md5_dict:if md5_dict[filekey] != FILE_MD5_DICT[filekey]:try:f = open(filekey, 'r').read()except Exception, e:breakif Special_string not in f:try:print u'[*] 该文件被修改 : ' + getUnicode(filekey)shutil.move(filekey, os.path.join(Special_path['difffile'], ntpath.basename(filekey) + '.txt'))shutil.copyfile(os.path.join(Special_path['bak'], ntpath.basename(filekey)), filekey)print u'[+] 文件已复原!'except Exception as e:print u'[!] 移动文件失败, "%s" 疑似WebShell,请及时处理.'%getUnicode(filekey)try:f = open(os.path.join(Special_path['log'], 'log.txt'), 'a')f.write('difference_file: ' + getUnicode(filekey) + ' 时间: ' + getUnicode(time.ctime()) + '\n')f.close()except Exception as e:print u'[-] 记录失败 : 被修改文件: ' + getUnicode(filekey)passtime.sleep(2)
waf黑名单策略(慎用)
<?php
$log_file_path = './log.txt';
$blackIp = ['127.0.0.1'];
/*** [access 日志记录模块]* @return [type] [description]*/
function access(){global $log_file_path;if($_FILES!=[]){$tmp = [];foreach ($_FILES as $key => $value) {array_push($tmp,["filename"=>$_FILES[$key]["name"],"contents"=>base64_encode(file_get_contents($_FILES[$key]["tmp_name"]))]);}$flow = array('Userip'=>$_SERVER['REMOTE_ADDR'],'Path' =>'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"],'Post'=>$_POST,"File"=>$tmp,'Cookie'=>$_COOKIE,'Time'=> date('Y-m-s h:i:s',time()));}else{$flow = array('Userip'=>$_SERVER['REMOTE_ADDR'],'Path' =>'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"],'Post'=>$_POST,'Cookie'=>$_COOKIE,'Time'=> date('Y-m-s h:i:s',time()));}$log_path = $log_file_path;$f = fopen($log_path,'a');fwrite($f,"\n".json_encode($flow,true));fclose($f);
}
/*** [banIP IP封禁模块]* @return [type] [description]*/
function banIP(){global $blackIp;if(is_file('black.txt')){$blackIp = array_filter(explode("\n",file_get_contents('black.txt')));}$userIP = $_SERVER['REMOTE_ADDR'];$_not_found = <<<END
<!DOCTYPE html PUBLIC '-//IETF//DTD HTML 2.0//EN'>
<html><head>
<meta http-equiv='content-type' content='text/html; charset=windows-1252'>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL / was not found on this server.</p>
</body>
</html>
END;if(in_array($userIP,$blackIp)){$staus_code = "HTTP/1.1 404 Not Found";header($staus_code);die($_not_found);}
}
access();
banIP();?>
日志审计系统
<?php
session_start();
header("Content-Type:text/html;charset=utf-8");
ini_set('date.timezone','Asia/Shanghai');
$passwd="aaa";//修改密码
$logfilename = "/var/www/html/log.txt";
if(@$_SESSION['user']!=1){login();if(isset($_POST['pass'])){$pass=$_POST['pass'];login_check($pass);}die();
}/**主功能部分**/$ip = [];
$maxnum=10;//每页最大数量
$page=intval(@$_GET['p']);
empty($page)?$page=1:$page=intval(@$_GET['p']);
$file = fopen($logfilename, "r") or exit("Unable to open file!");
$filter = "\\<.+javascript:window\\[.{1}\\\\x|<.*=(&#\\d+?;?)+?>|<.*(data|src)=data:text\\/html.*>|\\b(alert\\(|confirm\\(|expression\\(|prompt\\(|benchmark\s*?\(.*\)|sleep\s*?\(.*\)|\\b(group_)?concat[\\s\\/\\*]*?\\([^\\)]+?\\)|\bcase[\s\/\*]*?when[\s\/\*]*?\([^\)]+?\)|load_file\s*?\\()|<[a-z]+?\\b[^>]*?\\bon([a-z]{4,})\s*?=|^\\+\\/v(8|9)|\\b(and|or)\\b\\s*?([\\(\\)'\"\\d]+?=[\\(\\)'\"\\d]+?|[\\(\\)'\"a-zA-Z]+?=[\\(\\)'\"a-zA-Z]+?|>|<|\s+?[\\w]+?\\s+?\\bin\\b\\s*?\(|\\blike\\b\\s+?[\"'])|\\/\\*.*\\*\\/|<\\s*script\\b|\\bEXEC\\b|UNION.+?SELECT\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|\").*?(`|'|\")\s*)|UPDATE\s*(\(.+\)\s*|@{1,2}.+?\s*|\s+?.+?|(`|'|\").*?(`|'|\")\s*)SET|INSERT\\s+INTO.+?VALUES|(SELECT|DELETE)@{0,2}(\\(.+\\)|\\s+?.+?\\s+?|(`|'|\").*?(`|'|\"))FROM(\\(.+\\)|\\s+?.+?|(`|'|\").*?(`|'|\"))|(CREATE|ALTER|DROP|TRUNCATE)\\s+(TABLE|DATABASE)|<.*(iframe|frame|style|embed|object|frameset|meta|xml|a|img)|hacker|eval\(.*\)|phpinfo\(\)|assert\(.*\)|\`|\~|\^|<\?php|[oc]:\d+:|pcntl_alarm|pcntl_fork|pcntl_waitpid|pcntl_wait|pcntl_wifexited|pcntl_wifstopped|pcntl_wifsignaled|pcntl_wifcontinued|pcntl_wexitstatus|pcntl_wtermsig|pcntl_wstopsig|pcntl_signal|pcntl_signal_get_handler|pcntl_signal_dispatch|pcntl_get_last_error|pcntl_strerror|pcntl_sigprocmask|pcntl_sigwaitinfo|pcntl_sigtimedwait|pcntl_exec|pcntl_getpriority|pcntl_setpriority|pcntl_async_signals|system\(.*\)|exec\(.*\)|shell_exec\(.*\)|popen\(.*\)|proc_open\(.*\)|passthru\(.*\)|symlink\(.*\)|link\(.*\)|syslog\(.*\)|imap_open\(.*\)|flag|cat\s|etc\spasswd|IFS|display_errors|catch|ini_set|set_time_limit(0)";function Check_Flux($Value,$ArrFiltReq){foreach ($Value as $key => $value) {if(!is_array($value)){if (preg_match("/".$ArrFiltReq."/is",$value,$m)==1){return 1;}}else{if (preg_match("/".$ArrFiltReq."/is",implode($value))==1){return 1;}}}return 0;}
function login(){echo "<center><h3>日志审计系统登陆</h3></center>";echo "<center><form action=\"\" method=\"POST\"><input type=\"password\" name=\"pass\"><input type=\"submit\" name=\"submit\" value=\"Go\"></form></center>";
}
function jsonIndentFormat($jsonStr){$result = '';$indentCount = 0;$strLen = strlen($jsonStr);$indentStr = ' ';$newLine = "\r\n";$isInQuotes = false;$prevChar = '';for($i = 0; $i <= $strLen; $i++) {$char = substr($jsonStr, $i, 1);if($isInQuotes){$result .= $char;if(($char=='"' && $prevChar!='\\')){$isInQuotes = false;}}else{if(($char=='"' && $prevChar!='\\')){$isInQuotes = true;if ($prevChar != ':'){$result .= $newLine;for($j = 0; $j < $indentCount; $j++) {$result .= $indentStr;}}$result .= $char;}elseif(($char=='{' || $char=='[')){if ($prevChar != ':'){$result .= $newLine;for($j = 0; $j < $indentCount; $j++) {$result .= $indentStr;}}$result .= $char;$indentCount = $indentCount + 1;}elseif(($char=='}' || $char==']')){$indentCount = $indentCount - 1;$result .= $newLine;for($j = 0; $j < $indentCount; $j++) {$result .= $indentStr;}$result .= $char;}else{$result .= $char;}}$prevChar = $char;}return $result;}
function login_check($pass){$passwd=$GLOBALS['passwd'];if($pass!=$passwd){//此处修改密码die("Password error!");}else{$_SESSION['user']=1;}
}?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<style type="text/css">a{text-decoration:none}
ul.pagination {display: inline-block;padding: 0;margin: 0;
}ul.pagination li {display: inline;}ul.pagination li a {color: black;float: left;padding: 8px 16px;text-decoration: none;
}ul.pagination li a.active {background-color: #4CAF50;color: white;
}ul.pagination li a:hover:not(.active) {background-color: #ddd;}</style>
<title>日志</title>
<body ><center><h2>日志审计系统</h2></center><table class="table table-border table-bordered table-bg" style="margin-top: 10px"><thead><tr class="text-c"><th width="40">ID</th><th >访问IP</th><th width="150">数据</th><th width="150">时间</th><th width="130">类型判断</th></tr></thead><tbody>
<?php$i=0;while(!feof($file)){$information = fgets($file);if(empty($information)||$page*$maxnum==$i){break;}elseif(empty(json_decode($information,true)['Path'])){continue;}elseif($i<($page-1)*$maxnum&&$page!=1){$i++;continue;}else{$i++;}if(Check_Flux(json_decode($information,true),$filter)){$style="danger";}elseif(isset(json_decode($information,true)['File'])){$style="upload";}else{$style="active";}$information = json_decode($information,true);?><tr class="text-c <?php if($style=="active"&&$i%2==0){echo "success";}elseif($style=="active"&&$i%2!=0){echo "active";}else{echo 'danger';};?>"><td><?php echo $i;?></td><td><?php echo $information['Userip'];?></td><td ><pre id="json" style="width: 500px;height: 200px;font-size: 10px"><?php echo jsonIndentFormat(json_encode($information));?></pre></td><td><?php echo $information['Time'];?></td><td><?phpif($style=="danger")echo"疑似攻击";elseif($style=="upload")echo "文件上传";elseecho "正常";?></td></tr><?php
}fclose($file); ?></tbody></table><div style="margin-top: 10px" class="text-c "><ul class="pagination"><li><a href="?p=<?php if($page>1)echo $page-1;?>">上一页</a></li> 、<li><a href="?p=<?php echo $page+1;?>">下一页</a></li> </ul></div><div class="text-c "><!--<p target="_blank">共页<br>共1条数据</p>-->
</div><style type="text/css">/*默认table*/table{width:100%;empty-cells:show;background-color:transparent;border-collapse:collapse;border-spacing:0}table th{text-align:left; font-weight:400}/*带水平线*/.table th{font-weight:bold}.table th,.table td{padding:8px;line-height:20px}.table td{text-align:left}.table tbody tr.success > td{background-color:#dff0d8}.table tbody tr.error > td{background-color:#f2dede}.table tbody tr.warning > td{background-color:#fcf8e3}.table tbody tr.info > td{background-color:#d9edf7}.table tbody + tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}/*带横向分割线*/.table-border{border-top:1px solid #ddd}.table-border th,.table-border td{border-bottom:1px solid #ddd}/*th带背景*/.table-bg thead th{background-color:#F5FAFE}/*带外边框*/.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-border.table-bordered{border-bottom:0}/*奇数行背景设为浅灰色*/.table-striped tbody > tr:nth-child(odd) > td,.table-striped tbody > tr:nth-child(odd) > th{background-color:#f9f9f9}/*竖直方向padding缩减一半*/.table-condensed th,.table-condensed td{padding:4px 5px}/*鼠标悬停样式*/.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color: #f5f5f5}/*定义颜色*//*悬停在行*/.table tbody tr.active,.table tbody tr.active>td,.table tbody tr.active>th,.table tbody tr .active{background-color:#F5F5F5!important}/*成功或积极*/.table tbody tr.success,.table tbody tr.success>td,.table tbody tr.success>th,.table tbody tr .success{background-color:#DFF0D8!important}/*警告或出错*/.table tbody tr.warning,.table tbody tr.warning>td,.table tbody tr.warning>th,.table tbody tr .warning{background-color:#FCF8E3!important}/*危险*/.table tbody tr.danger,.table tbody tr.danger>td,.table tbody tr.danger>th,.table tbody tr .danger{background-color:#F2DEDE!important}/*表格文字对齐方式,默认是居左对齐*/.table .text-c th,.table .text-c td{text-align:center}/*整行居中*/.table .text-r th,.table .text-r td{text-align:right}/*整行居右*/.table th.text-l,.table td.text-l{text-align:left!important}/*单独列居左*/.table th.text-c,.table td.text-c{text-align:center!important}/*单独列居中*/.table th.text-r,.table td.text-r{text-align:right!important}/*单独列居右*/.text-l{text-align:left}/*水平居左*/.text-r{text-align:right}/*水平居中*/.text-c{text-align:center}/*水平居右*/.va *{vertical-align:sub!important;*vertical-align:middle!important;_vertical-align:middle!important}.va-t{ vertical-align:top!important}/*上下居顶*/.va-m{ vertical-align:middle!important}/*上下居中*/.va-b{ vertical-align:bottom!important}/*上下居底*/pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; text-align: left;white-space:pre-wrap;word-wrap:break-word;overflow-y:hidden;overflow-y:scroll;}.string { color: green; }.number { color: darkorange; }.boolean { color: blue; }.null { color: magenta; }.key { color: red; }
</style>
<script type="text/javascript">
// 方法实现
function syntaxHighlight(json) {if (typeof json != 'string') {json = JSON.stringify(json, undefined, 2);}json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function(match) {var cls = 'number';if (/^"/.test(match)) {if (/:$/.test(match)) {cls = 'key';} else {cls = 'string';}} else if (/true|false/.test(match)) {cls = 'boolean';} else if (/null/.test(match)) {cls = 'null';}return '<span class="' + cls + '">' + match + '</span>';});
}
var preobject = document.getElementsByTagName("pre") ;
for(i=0;i<preobject.length;i++){preobject[i].innerHTML = (syntaxHighlight(preobject[i].innerText));
}
</script>
</body></html>
做一个简单的记录,最近刚比赛完
相关文章:

AWD比赛中的一些防护思路技巧
## 思路1: 1、改服务器密码 (1)linux:passwd (2)如果是root删除可登录用户:cat /etc/passwd | grep bash userdel -r 用户名 (3)mysql:update mysql.user set…...

【C++面向对象】14. 命名空间
文章目录 【 1. 命名空间的定义 】【 2. using 指令 】2.1 using 指定命名空间的全部2.2 using 指定命名空间的部分 【 3. 不连续的命名空间 】【 4. 嵌套的命名空间 】 问题的背景:假设这样一种情况,当一个班上有两个名叫 Zara 的学生时,为了…...

asp.net实验管理系统VS开发sqlserver数据库web结构c#编程web网页设计
一、源码特点 asp.net 实验管理系统 是一套完善的web设计管理系统,系统具有完整的源代码和数据库,系统主要采用B/S模式开发。开发环境为vs2010,数据库为sqlserver2008,使用c#语言开发。 asp.net实验管理系统1 应用技术&am…...

基于SSM+Vue的健身房管理系统
基于SSMVue的健身房管理系统的设计与实现~ 开发语言:Java数据库:MySQL技术:SpringMyBatisSpringMVC工具:IDEA/Ecilpse、Navicat、Maven 系统展示 主页 课程信息 健身器材 管理员界面 用户界面 摘要 健身房管理系统是一种利用现…...

《C++避坑神器·二十三》C++异常处理exception
有些时候无法设置弹出提示信息或者发送提示信息,时候可以抛出异常来提示各种情况 定义自己的异常 GetPostion()函数内部抛出了异常,所以在捕获异常的时候try要把这个函数包住, Catch()里面写throw后面的类,然后catch内部通过调…...

安卓播放解码后的byte字节视频
参考文章:安卓播放解码后的byte字节视频 - 简书 wlmedia播放器集成(4)— 实现视频播放 一个很棒的库, github地址:https://github.com/wanliyang1990/wlmedia About Android 音视频播放SDK,几句代码即可实…...

ceph 14.2.10 aarch64 非集群内 客户端 挂载块设备
集群上的机器测试 706 ceph pool create block-pool 64 64 707 ceph osd pool create block-pool 64 64 708 ceph osd pool application enable block-pool rbd 709 rbd create vdisk1 --size 4G --pool block-pool --image-format 2 --image-feature layering 7…...

21、Flink 的table API与DataStream API 集成(2)- 批处理模式和inser-only流处理
Flink 系列文章 1、Flink 部署、概念介绍、source、transformation、sink使用示例、四大基石介绍和示例等系列综合文章链接 13、Flink 的table api与sql的基本概念、通用api介绍及入门示例 14、Flink 的table api与sql之数据类型: 内置数据类型以及它们的属性 15、Flink 的ta…...

051-第三代软件开发-日志容量时间限制
第三代软件开发-日志容量时间限制 文章目录 第三代软件开发-日志容量时间限制项目介绍日志容量时间限制 关键字: Qt、 Qml、 Time、 容量、 大小 项目介绍 欢迎来到我们的 QML & C 项目!这个项目结合了 QML(Qt Meta-Object Language…...

9步打造个人ip
什么是个人IP? 就是一个人创造出来的属于自己的有个性有价值的,能让他人记住你,信任你,认可你的东西。 如何强化个人IP呢? 需要一些必要的条件如专业性、耐心、勤奋等等要知道,打造IP是一个见效慢的过程&am…...

【深度学习】吴恩达课程笔记(四)——优化算法
笔记为自我总结整理的学习笔记,若有错误欢迎指出哟~ 【吴恩达课程笔记专栏】 【深度学习】吴恩达课程笔记(一)——深度学习概论、神经网络基础 【深度学习】吴恩达课程笔记(二)——浅层神经网络、深层神经网络 【深度学习】吴恩达课程笔记(三)——参数VS超参数、深度…...

MyBatis-plus 代码生成器配置
数据库配置(DataSourceConfig) 基础配置 属性说明示例urljdbc 路径jdbc:mysql://127.0.0.1:3306/mybatis-plususername数据库账号rootpassword数据库密码123456 new DataSourceConfig.Builder("jdbc:mysql://127.0.0.1:3306/mybatis-plus","root","…...

框架设计的核心要素
我们的框架应该给用户提供哪些构建产物?产物的模块格式如何?当用户没有以预期的方式使用框架时,是否应该打印合适的警告信息从而提供更好的开发体验,让用户快速定位问题?开发版本的构建和生产版本的构建有何区别&#…...

LeetCode - 26. 删除有序数组中的重复项 (C语言,快慢指针,配图)
力扣(LeetCode)官网 - 全球极客挚爱的技术成长平台 思路一:快慢指针 在数组中,快慢指针就是两个整数下标,定义 fast 和 slow 这里我们从下标1开始(下标0的数据就1个,没有重复项)&…...

C#不安全代码
在C#中,“不安全代码”(unsafe code)通常指的是那些直接操作内存地址的代码。它允许开发者使用指针等低级别的数据结构,这些在通常的安全代码(safe code)中是不允许的。C# 的不安全代码提供了一种方式&…...

《C++避坑神器·二十二》VS能正常运行程序,但运行exe程序无响应解决办法
原因是某个文件只是放在了项目路径下,没有放在exe路径下,比如Json文件原来只放在了mlx项目下,导致VS可以运行,但运行exe无响应或报错如下: 两种方式修改: 1、把Json文件拷贝一份放到exe路径下 2、利用生成…...

lua调用C/C++的函数,十分钟快速掌握
系列文章目录 lua调用C\C动态库函数 系列文章目录摘要环境使用步骤你需要有个lua环境引入库码代码lua代码 摘要 在现代软件开发中,Lua作为一种轻量级脚本语言,在游戏开发、嵌入式系统等领域广泛应用。Lua与C/C的高度集成使得开发者能够借助其灵活性和高…...

自定义GPT已经出现,并将影响人工智能的一切,做好被挑战的准备了吗?
原创 | 文 BFT机器人 OpenAI凭借最新突破:定制GPT站在创新的最前沿。预示着个性化数字协助的新时代到来,ChatGPT以前所未有的精度来满足个人需求和专业需求。 从本质上讲,自定义GPT是之前的ChatGPT的高度专业化版本或代理,但自定…...

vue中一个页面引入多个相同组件重复请求的问题?
⚠️!!!此内容需要了解一下内容!!! 1、会使用promise??? 2、 promise跟 async 的区别??? async 会终止后面的执行,后续…...

Uniapp连接iBeacon设备——实现无线定位与互动体验(实现篇)
export default { data() { return { iBeaconDevices: [], // 存储搜索到的iBeacon设备 deviceId: [], data: [], url: getApp().globalData.url, innerAudioContext: n…...

【ceph】ceph集群删除pool报错: “EPERM: pool deletion is disabled“
本站以分享各种运维经验和运维所需要的技能为主 《python零基础入门》:python零基础入门学习 《python运维脚本》: python运维脚本实践 《shell》:shell学习 《terraform》持续更新中:terraform_Aws学习零基础入门到最佳实战 《k8…...

【微信小程序】使用npm包
1、小程序对npm的支持与限制2、Vant Weapp通过 npm 安装修改 app.json修改 project.config.json构建 npm 包 3、使用4、定制全局主题样式5、API Promise化 1、小程序对npm的支持与限制 目前,小程序中已经支持使用npm安装第三方包, 从而来提高小程序的开发…...

【开发记录篇】第二篇:SQL创建分区表
实现分区表注意事项 分区字段必须在主键中存在 使用时间分区时,字段类型不支持 timestamp,需改为 datetime 年分区示例 下表中使用 insert_time 时间进行分区 CREATE TABLE t_log (id bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 日志ID,inse…...

vue 使用 this.$router.push 传参数,接参数的 query或params 两种方法示例
背景:vue项目 使用this.$router.push进行路由跳转时,可以通过query或params参数传递和接收参数。 通过query参数传递参数: // 传递参数 this.$router.push({path: /target,query: {id: 1,name: John} }); // 接收参数 this.$route.query.id …...

rk3588 usb网络共享连接
出门在外总会遇到傻 X 地方 没有能连接公网的 网口给香橙派连网 而我的香橙派5plus 没有wifi模块。。。话不多说 在手机上看一眼手机的mac地址, 在rk3588 上执行以下命令: sudo ifconfig usb0 down sudo ifconfig usb0 hw ether 58:F2:FC:5D:D4:7A //该m…...

shell 拒绝恶意连接脚本 centos7.x拒绝恶意连接脚本
1. crontab -l 脚本频率: */2 * * * * /bin/bash /home/shell/deny.sh 2. 脚本: rm -rf /home/shell/ip_list cat /var/log/secure | grep "Failed password for" | awk {print$(NF-3)} | sort | uniq -c > /home/shell/ip_list #cat /va…...

【系统架构设计】计算机公共基础知识: 2 计算机系统基础知识
目录 一 计算机系统组成 二 操作系统 三 文件系统 四 系统性能 一 计算机系统组成...

什么是代理模式,用 Python 如何实现 Proxy(代理 或 Surrogate)对象结构型模式?
什么是代理模式? 代理(Proxy)是一种结构型设计模式,其目的是通过引入一个代理对象来控制对另一个对象的访问。代理对象充当目标对象的接口,这样客户端就可以通过代理对象间接地访问目标对象,从而在访问过程…...

国内领先的五大API接口供应商
API(Application Programming Interface)接口,现在很多应用系统中常用的开放接口,对接相应的系统、软件功能,简化专业化的程序开发。作者用过的国内比较稳定的API接口供应商有如下几家,大家可以参考选择&am…...

第十九章 Java绘图
一,Java绘图类 19.1.1Graphics类 Graphics类是所有图形上下文的抽象基类,它允许应用程序在组件以及闭屏图像上进行绘制。 可实现直线,矩形,多边形,椭圆,圆弧等形状和文本,图片的绘制制作。 …...