当前位置: 首页 > news >正文

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&#xff1a; 1、改服务器密码 &#xff08;1&#xff09;linux&#xff1a;passwd &#xff08;2&#xff09;如果是root删除可登录用户&#xff1a;cat /etc/passwd | grep bash userdel -r 用户名 &#xff08;3&#xff09;mysql&#xff1a;update mysql.user set…...

【C++面向对象】14. 命名空间

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

asp.net实验管理系统VS开发sqlserver数据库web结构c#编程web网页设计

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

基于SSM+Vue的健身房管理系统

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

《C++避坑神器·二十三》C++异常处理exception

有些时候无法设置弹出提示信息或者发送提示信息&#xff0c;时候可以抛出异常来提示各种情况 定义自己的异常 GetPostion()函数内部抛出了异常&#xff0c;所以在捕获异常的时候try要把这个函数包住&#xff0c; Catch()里面写throw后面的类&#xff0c;然后catch内部通过调…...

安卓播放解码后的byte字节视频

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

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-第三代软件开发-日志容量时间限制

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

9步打造个人ip

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

【深度学习】吴恩达课程笔记(四)——优化算法

笔记为自我总结整理的学习笔记&#xff0c;若有错误欢迎指出哟~ 【吴恩达课程笔记专栏】 【深度学习】吴恩达课程笔记(一)——深度学习概论、神经网络基础 【深度学习】吴恩达课程笔记(二)——浅层神经网络、深层神经网络 【深度学习】吴恩达课程笔记(三)——参数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","…...

框架设计的核心要素

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

LeetCode - 26. 删除有序数组中的重复项 (C语言,快慢指针,配图)

力扣&#xff08;LeetCode&#xff09;官网 - 全球极客挚爱的技术成长平台 思路一&#xff1a;快慢指针 在数组中&#xff0c;快慢指针就是两个整数下标&#xff0c;定义 fast 和 slow 这里我们从下标1开始&#xff08;下标0的数据就1个&#xff0c;没有重复项&#xff09;&…...

C#不安全代码

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

《C++避坑神器·二十二》VS能正常运行程序,但运行exe程序无响应解决办法

原因是某个文件只是放在了项目路径下&#xff0c;没有放在exe路径下&#xff0c;比如Json文件原来只放在了mlx项目下&#xff0c;导致VS可以运行&#xff0c;但运行exe无响应或报错如下&#xff1a; 两种方式修改&#xff1a; 1、把Json文件拷贝一份放到exe路径下 2、利用生成…...

lua调用C/C++的函数,十分钟快速掌握

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

自定义GPT已经出现,并将影响人工智能的一切,做好被挑战的准备了吗?

原创 | 文 BFT机器人 OpenAI凭借最新突破&#xff1a;定制GPT站在创新的最前沿。预示着个性化数字协助的新时代到来&#xff0c;ChatGPT以前所未有的精度来满足个人需求和专业需求。 从本质上讲&#xff0c;自定义GPT是之前的ChatGPT的高度专业化版本或代理&#xff0c;但自定…...

vue中一个页面引入多个相同组件重复请求的问题?

⚠️&#xff01;&#xff01;&#xff01;此内容需要了解一下内容&#xff01;&#xff01;&#xff01; 1、会使用promise&#xff1f;&#xff1f;&#xff1f; 2、 promise跟 async 的区别&#xff1f;&#xff1f;&#xff1f; async 会终止后面的执行&#xff0c;后续…...

Uniapp连接iBeacon设备——实现无线定位与互动体验(实现篇)

export default { data() { return { iBeaconDevices: [], // 存储搜索到的iBeacon设备 deviceId: [], data: [], url: getApp().globalData.url, innerAudioContext: n…...

k8s从入门到放弃之Ingress七层负载

k8s从入门到放弃之Ingress七层负载 在Kubernetes&#xff08;简称K8s&#xff09;中&#xff0c;Ingress是一个API对象&#xff0c;它允许你定义如何从集群外部访问集群内部的服务。Ingress可以提供负载均衡、SSL终结和基于名称的虚拟主机等功能。通过Ingress&#xff0c;你可…...

系统设计 --- MongoDB亿级数据查询优化策略

系统设计 --- MongoDB亿级数据查询分表策略 背景Solution --- 分表 背景 使用audit log实现Audi Trail功能 Audit Trail范围: 六个月数据量: 每秒5-7条audi log&#xff0c;共计7千万 – 1亿条数据需要实现全文检索按照时间倒序因为license问题&#xff0c;不能使用ELK只能使用…...

镜像里切换为普通用户

如果你登录远程虚拟机默认就是 root 用户&#xff0c;但你不希望用 root 权限运行 ns-3&#xff08;这是对的&#xff0c;ns3 工具会拒绝 root&#xff09;&#xff0c;你可以按以下方法创建一个 非 root 用户账号 并切换到它运行 ns-3。 一次性解决方案&#xff1a;创建非 roo…...

ardupilot 开发环境eclipse 中import 缺少C++

目录 文章目录 目录摘要1.修复过程摘要 本节主要解决ardupilot 开发环境eclipse 中import 缺少C++,无法导入ardupilot代码,会引起查看不方便的问题。如下图所示 1.修复过程 0.安装ubuntu 软件中自带的eclipse 1.打开eclipse—Help—install new software 2.在 Work with中…...

C# SqlSugar:依赖注入与仓储模式实践

C# SqlSugar&#xff1a;依赖注入与仓储模式实践 在 C# 的应用开发中&#xff0c;数据库操作是必不可少的环节。为了让数据访问层更加简洁、高效且易于维护&#xff0c;许多开发者会选择成熟的 ORM&#xff08;对象关系映射&#xff09;框架&#xff0c;SqlSugar 就是其中备受…...

【python异步多线程】异步多线程爬虫代码示例

claude生成的python多线程、异步代码示例&#xff0c;模拟20个网页的爬取&#xff0c;每个网页假设要0.5-2秒完成。 代码 Python多线程爬虫教程 核心概念 多线程&#xff1a;允许程序同时执行多个任务&#xff0c;提高IO密集型任务&#xff08;如网络请求&#xff09;的效率…...

AGain DB和倍数增益的关系

我在设置一款索尼CMOS芯片时&#xff0c;Again增益0db变化为6DB&#xff0c;画面的变化只有2倍DN的增益&#xff0c;比如10变为20。 这与dB和线性增益的关系以及传感器处理流程有关。以下是具体原因分析&#xff1a; 1. dB与线性增益的换算关系 6dB对应的理论线性增益应为&…...

LINUX 69 FTP 客服管理系统 man 5 /etc/vsftpd/vsftpd.conf

FTP 客服管理系统 实现kefu123登录&#xff0c;不允许匿名访问&#xff0c;kefu只能访问/data/kefu目录&#xff0c;不能查看其他目录 创建账号密码 useradd kefu echo 123|passwd -stdin kefu [rootcode caozx26420]# echo 123|passwd --stdin kefu 更改用户 kefu 的密码…...

面向无人机海岸带生态系统监测的语义分割基准数据集

描述&#xff1a;海岸带生态系统的监测是维护生态平衡和可持续发展的重要任务。语义分割技术在遥感影像中的应用为海岸带生态系统的精准监测提供了有效手段。然而&#xff0c;目前该领域仍面临一个挑战&#xff0c;即缺乏公开的专门面向海岸带生态系统的语义分割基准数据集。受…...

C/C++ 中附加包含目录、附加库目录与附加依赖项详解

在 C/C 编程的编译和链接过程中&#xff0c;附加包含目录、附加库目录和附加依赖项是三个至关重要的设置&#xff0c;它们相互配合&#xff0c;确保程序能够正确引用外部资源并顺利构建。虽然在学习过程中&#xff0c;这些概念容易让人混淆&#xff0c;但深入理解它们的作用和联…...