宝塔 Linux 面板 7.4.2 及 Windows 面板 6.8 phpMyAdmin 高危漏洞

近日,宝塔 Linux 面板 7.4.2 以及 Windows 面板 6.8 爆出有 phpMyAdmin 高危漏洞。宝塔官方在发现该漏洞后立即放出了紧急安全更新。Liunx 7.4.2 版本与 Windows 6.8 版本的用户请尽快升级到最新版本,降低损失。
参考:https://www.bt.cn/bbs/thread-54666-1-1.html
漏洞描述
宝塔 Linux 面板 7.4.2 以及 Windows 面板 6.8 通过 http://ip:888/pma 可直接绕过用户校验访问 phpMyAdmin。
下面是吃瓜内容
某人借用此次宝塔高危漏洞入侵了某地方政府 gov 网站的数据库、篡改其首页文件。
更加猎奇的是他们竟然把政府的数据库当做聊天室使用?
笑归笑,但是请注意:网络并非法外之地。这位当事人最后总归是会进橘子滴。

极具性价比的星轮香港BGP①型 VPS 测评

星轮 xlunhost 官方网站:https://www.xlunhost.com/
星轮香港BGP①型 VPS 配置:
- 1核 Intel Xeon E312xx 处理器(1999.999 MHz)
- 512M 内存
- 20G 系统盘 + 20G 数据盘
- 1M BGP带宽

经过我的测试,这个服务器在性能方面中规中矩,在宽带方面比较突出。其每个月 12.9 人民币的价格使得其性价比极高,比较适合做小型个人博客。
Xiuno 付费插件购买分享
BAT 脚本仿蓝屏

@echo off&title Windows Error
echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul&chcp 437>nul&graftabl 936>nul
:a
cls
color 1f
more +8 %0
pause>nul
goto a
A prolem has been detected and windows has been shut down to prevent damgge to y
our computer.
If this is the first time you`ve seen this stop error screen,restart your comput
er.If this screen appears again,follow these steps:
Check to be sure you have adequate disk space.If a driver is identified in the s
top message,disable the driver or check with the manufacturer for driver updates
.Try changing video adapters.
Check with your hardware vendor for any BIOS updates.Disable BIOS memory options
such as caching or shadowing. If you need to use safe mode to remove or disable
components,restart your computer,press F8 to select Advanced Startup Options,an
d then select Safe Mode.
Technical information:
*** STOP:0x0000008E (:0xC0000005, 0xBF070633,0XAD2B7DCO,0x00000000)
*** ati2dvag.dll –Address BF070633 base at BF9E6000,DateStamp 4a4cde36
原文出自于:http://www.bathome.net/redirect.php?tid=12991&goto=lastpost
WordPress教程:查看当天用户注册数量以及用户注册时间排序
效果
教程
将以下代码加入到 functions.php 即可:
//用户注册时间排序
add_filter('manage_users_columns', function($column_headers){
$column_headers['registered'] = '注册时间';
return $column_headers;
});
add_filter('manage_users_custom_column', function($value, $column_name, $user_id){
if($column_name=='registered'){
$user = get_userdata($user_id);
return get_date_from_gmt($user->user_registered);
}else{
return $value;
}
},11,3);
add_filter('manage_users_sortable_columns', function($sortable_columns){
$sortable_columns['reg_time'] = 'reg_time';
return $sortable_columns;
});
add_action('pre_user_query', function($query){
if(!isset($_REQUEST['orderby']) || $_REQUEST['orderby']=='reg_time' ){
if( !in_array($_REQUEST['order'],array('asc','desc')) ){
$_REQUEST['order'] = 'desc';
}
$query->query_orderby = "ORDER BY user_registered ".$_REQUEST['order']."";
}
});
Python游戏编程快速上手 第4版 中文pdf 下载

目录
- 第1章 交互式Shell 1
- 第2章 编写程序 9
- 第3章 “猜数字”游戏 19
- 第4章 一个讲笑话程序 35
- 第5章 Dragon Realm 41
- 第6章 使用调试器 57
- 第7章 用流程图设计Hangman 69
- 第8章 编写Hangman的代码 79
- 第9章 Hangman扩展 101
- 第10章 Tic Tac Toe 111
- 第11章 推理游戏Bagels 137
- 第12章 笛卡尔坐标 151
- 第13章 Sonar Treasure Hunt游戏 159
- 第14章 凯撒密码 183
- 第15章 Reversegam游戏 195
- 第16章 Reversegam AI模拟 223
- 第17章 创建图形 239
- 第18章 动画图形 255
- 第19章 碰撞检测 265
- 第20章 声音和图像 279
- 第21章 带有声音和图像的Dodger 289
去除 WordPress 管理菜单栏 WordPress logo
在你的 WordPress 主题目录下的 functions.php 下添加以下代码即可:
// 去除 WordPress 管理菜单栏 WordPress logo
// https://wrsblog.cn/remove-wp-logo.html
function annointed_admin_bar_remove() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
WordPress 开启面包屑导航
什么是网站面包屑导航?面包屑导航意在告知用户所处的当前网页的位置,方便用户可以通过该导航快速返回上一级网页。
面包屑导航一般都在导航的下面,形式一般为 首页 > 一级目录名称 > 二级目录名称 > 目前位置,尽量要把面包屑导航的层次控制在四层以内,这样也有利与搜索引擎蜘蛛一层层往下爬,到了四层以下就很难爬到了。
面包屑导航的作用
让用户了解目前所处位置,以及当前页面在整个网站中的位置。
便于搜索引擎对于网站的收录,蜘蛛可以沿着面包屑导航爬下去,便于寻找链接,提高蜘蛛的爬行速度和效率;
便于用户了解网站的层次结构,进而浏览网站,提高用户体验;
优化面包屑导航每个层级的名称,尽量使用关键字,可以达到更好SEO优化的效果。
教程
在自定义 functions 文件下添加以下代码:
//面包屑
function cmp_breadcrumbs() {
$delimiter = '<i class="iconfont icon-arrow-right"></i>'; // 分隔符
$before = '<span class="current">'; // 在当前链接前插入
$after = '</span>'; // 在当前链接后插入
if ( !is_home() && !is_front_page() || is_paged() ) {
echo '<div class="crumb uk-overflow-container uk-text-nowrap">'.__( '<i class="iconfont icon-home-fill"></i>' , 'cmp' );
global $post;
$homeLink = home_url();
echo ' <a itemprop="breadcrumb" href="' . $homeLink . '" rel="external nofollow" >' . __( '首页' , 'cmp' ) . '</a> ' . $delimiter . ' ';
if ( is_category() ) { // 分类 存档
global $wp_query;
$cat_obj = $wp_query->get_queried_object();
$thisCat = $cat_obj->term_id;
$thisCat = get_category($thisCat);
$parentCat = get_category($thisCat->parent);
if ($thisCat->parent != 0){
$cat_code = get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' ');
echo $cat_code = str_replace ('<a','<a itemprop="breadcrumb"', $cat_code );
}
echo $before . '' . single_cat_title('', false) . '' . $after;
} elseif ( is_day() ) { // 天 存档
echo '<a itemprop="breadcrumb" href="' . get_year_link(get_the_time('Y')) . '" rel="external nofollow" rel="external nofollow" >' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
echo '<a itemprop="breadcrumb" href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '" rel="external nofollow" >' . get_the_time('F') . '</a> ' . $delimiter . ' ';
echo $before . get_the_time('d') . $after;
} elseif ( is_month() ) { // 月 存档
echo '<a itemprop="breadcrumb" href="' . get_year_link(get_the_time('Y')) . '" rel="external nofollow" rel="external nofollow" >' . get_the_time('Y') . '</a> ' . $delimiter . ' ';
echo $before . get_the_time('F') . $after;
} elseif ( is_year() ) { // 年 存档
echo $before . get_the_time('Y') . $after;
} elseif ( is_single() && !is_attachment() ) { // 文章
if ( get_post_type() != 'post' ) { // 自定义文章类型
$post_type = get_post_type_object(get_post_type());
$slug = $post_type->rewrite;
echo '<a itemprop="breadcrumb" href="' . $homeLink . '/' . $slug['slug'] . '/" rel="external nofollow" >' . $post_type->labels->singular_name . '</a> ' . $delimiter . ' ';
echo $before . get_the_title() . $after;
} else { // 文章 post
$cat = get_the_category(); $cat = $cat[0];
$cat_code = get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
echo $cat_code = str_replace ('<a','<a itemprop="breadcrumb"', $cat_code );
echo $before . get_the_title() . $after;
}
} elseif ( !is_single() && !is_page() && get_post_type() != 'post' ) {
$post_type = get_post_type_object(get_post_type());
echo $before . $post_type->labels->singular_name . $after;
} elseif ( is_attachment() ) { // 附件
$parent = get_post($post->post_parent);
$cat = get_the_category($parent->ID); $cat = $cat[0];
echo '<a itemprop="breadcrumb" href="' . get_permalink($parent) . '" rel="external nofollow" >' . $parent->post_title . '</a> ' . $delimiter . ' ';
echo $before . get_the_title() . $after;
} elseif ( is_page() && !$post->post_parent ) { // 页面
echo $before . get_the_title() . $after;
} elseif ( is_page() && $post->post_parent ) { // 父级页面
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '<a itemprop="breadcrumb" href="' . get_permalink($page->ID) . '" rel="external nofollow" >' . get_the_title($page->ID) . '</a>';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' ';
echo $before . get_the_title() . $after;
} elseif ( is_search() ) { // 搜索结果
echo $before ;
printf( __( '搜索「%s」的结果如下:', 'cmp' ), get_search_query() );
echo $after;
} elseif ( is_tag() ) { //标签 存档
echo $before ;
printf( __( 'Tag Archives: %s', 'cmp' ), single_tag_title( '', false ) );
echo $after;
} elseif ( is_author() ) { // 作者存档
global $author;
$userdata = get_userdata($author);
echo $before ;
printf( __( 'Author Archives: %s', 'cmp' ), $userdata->display_name );
echo $after;
} elseif ( is_404() ) { // 404 页面
echo $before;
_e( '没有找到', 'cmp' );
echo $after;
}
if ( get_query_var('paged') ) { // 分页
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() )
echo sprintf( __( '( Page %s )', 'cmp' ), get_query_var('paged') );
}
echo '</div>';
}
}
在你想要添加面包屑导航的位置添加以下代码:
<?php cmp_breadcrumbs();?>
WordPress 建站教程:获取站点总访问量
首先在你的 WordPress 主题的 functions 自定义脚本下添加以下脚本:
//WordPress获取站点总浏览量
function all_view() /*注意这个函数名,调用的就是用它了*/
{
global $wpdb;
$count=0;
$views= $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE meta_key='views'");
foreach($views as $key=>$value)
{
$meta_value=$value->meta_value;
if($meta_value!=' ')
{
$count+=(int)$meta_value;}
}
return $count;}
接下来你只需要在要显示站点总浏览量的地方添加下面代码即可(如 footer.php):
<?php echo all_view(); ?>
注意
如果你的站点遇到了致命错误请自查 all_view() 这个函数是否被别的代码占用了。如果是的,请将 all_view() 改为其他函数名。