sudo rm /var/lib/dpkg/info/<package name>.*
比如 sudo rm /var/lib/dpkg/info/vsftpd.*
,再进行操作就OK了。
sudo rm /var/lib/dpkg/info/<package name>.*
比如 sudo rm /var/lib/dpkg/info/vsftpd.*
,再进行操作就OK了。
在windows上压缩的文件,是以系统默认编码中文来压缩文件。由于zip文件中没有声明其编码,所以linux上的unzip一般以默认编码解压,中文文件名会出现乱码。
虽然2005年就有人把这报告为bug,但是info-zip的官方网站没有把自动识别编码列入计划,可能他们不认为这是个问题。Sun对java中存在N年的zip编码问题,采用了同样的处理方式。
有2种方式解决问题:
1、 通过unzip行命令解压,指定字符集
unzip -O CP936 xxx.zip //用GBK, GB18030也可以
有趣的是unzip的manual中并无这个选项的说明, unzip –help对这个参数有一行简单的说明。
2、 在环境变量中,指定unzip参数,总是以指定的字符集显示和解压文件/etc/environment
中加入2行
UNZIP="-O CP936"
ZIPINFO="-O CP936"
或者使用 unar
,例如:
unar xxx.zip
sqlmap -u "注入地址" -v 1 -dbs // 列举数据库
sqlmap -u "注入地址" -v 1 -current-db // 当前数据库
sqlmap -u "注入地址" -v 1 -users // 列数据库用户
sqlmap -u "注入地址" -v 1 -current-user // 当前用户
sqlmap -u "注入地址" -v 1 -tables -D "数据库" // 列举数据库的表名
sqlmap -u "注入地址" -v 1 -columns -T "表名" -D "数据库" // 获取表的列名
sqlmap -u "注入地址" -v 1 -dump -C "字段,字段" -T "表名" -D "数据库" // 获取表中的数据,包含列
已经开始拖库了,SQLMAP是非常人性化的,它会将获取的数据存储 sqlmap/output/
中。
继续阅读
<?php
/*
Plugin Name: Uploaded Filename Sanitizer
Plugin URI: http://jerry.red/143.html
Description: 将所有上传的文件使用“日期_时间_三位随机数”方式重命名
Version: 1.0
Author: jerry
Author URI: http://jerry.red/
*/
function custom_upload_filter($name)
{
$time = date('Ymd_His');
$rand = sprintf('%03d', mt_rand(0, 999));
$ext = pathinfo($name, PATHINFO_EXTENSION);
return "{$time}_{$rand}.{$ext}";
}
add_filter('sanitize_file_name', 'custom_upload_filter');
把这段代码另存为 uploaded-filename-sanitizer.php
,上传到 wp-content/plugins
目录下,然后在后台启用这个插件即可。
如果不想以插件的形式使用,可以把这段代码粘贴到当前 WordPress 主题的 functions.php
中。请去掉本代码第一行的 <?php
和注释。
将下面的代码添加到当前主题的 functions.php
中:
add_filter( 'auto_core_update_send_email', 'wpb_stop_auto_update_emails', 10, 4 );
function wpb_stop_update_emails( $send, $type, $core_update, $result ) {
if ( ! emptyempty( $type ) && $type == 'success' ) {
return false;
}
return true;
}
以上代码通过添加一个过滤器禁用自动更新邮件通知功能。
这是一种不使用 mono-runtime 的特殊方法,ubuntu 控制台程序测试通过,理论上 linux 控制台程序都可以运行,但 GUI 未测试。
1、下载 anyexec(不支持32位)anyexec-1.2-linux_x64.tar
2、解压得到一个目录,改成自己想要的名字,例如叫:myanyexec
3、运行 myanyexec/any
,如果看到如下信息,说明 anyexec 能正常工作:
4、将编译好的 .net 程序整体移动到 myanyexec/app/
目录下
5、将 myanyexec/any
改名为 .net 主程序名,注意不要含 .exe
后缀
6、运行改名后的最终程序,测试是否可以运行
7、压缩,交付!
function enqueue_scripts()
{
// 反注册
wp_deregister_style('font-awesome');
wp_deregister_script('jquery');
// 注册
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/bootstrap/css/bootstrap.min.css');
wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery.min.js');
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/bootstrap/js/bootstrap.min.js', ['jquery']);
wp_enqueue_script('main', get_template_directory_uri() . '/js/main.js', false, false, true);
}
add_action('wp_enqueue_scripts', 'enqueue_scripts');
The package repository hosts the packages you need, add it with the following commands.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update
function clean_head()
{
// remove the links to the extra feeds such as category feeds
remove_action('wp_head', 'feed_links_extra', 3);
// remove REST API link tag
remove_action('wp_head', 'rest_output_link_wp_head');
// remove the link to the Really Simple Discovery service endpoint
remove_action('wp_head', 'rsd_link');
// remove the link to the Windows Live Writer manifest file
remove_action('wp_head', 'wlwmanifest_link');
// remove rel=canonical for singular queries
remove_action('wp_head', 'rel_canonical');
// remove relational links for the posts adjacent to the current post for single post pages
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10);
// remove shortlink
remove_action('wp_head', 'wp_shortlink_wp_head');
// remove oEmbed
remove_action('wp_head', 'wp_oembed_add_discovery_links');
remove_action('wp_head', 'wp_oembed_add_host_js');
// 移除 wordpress 信息,防止被恶意扫描
remove_action('wp_head', 'wp_generator');
// 移除cdn预读
remove_action('wp_head', 'wp_resource_hints', 2);
// 移除emoji
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
}
add_action('after_setup_theme', 'clean_head');
docker pull sath89/oracle-xe-11g
docker run -d --restart always -p 8080:8080 -p 1521:1521 -v /etc/localtime:/etc/localtime:ro -v /my/oracle/data:/u01/app/oracle sath89/oracle-xe-11g
<!–more–>
时间同步的参数详见: <http://jerry.red/453/docker-容器与宿主机时间不同步的解决办法>
Connect database with following setting:
hostname: localhost
port: 1521
sid: xe
username: system
password: oracle
Password for SYS & SYSTEM:
oracle
Connect to Oracle Application Express web management console with following settings:
http://localhost:8080/apex
workspace: INTERNAL
user: ADMIN
password: oracle
镜像详情:<https://hub.docker.com/r/sath89/oracle-xe-11g/>,利用 daocloud.io 可加速拉取镜像。
Convert these .rpm files into .deb packages and install using "alien" ("sudo apt-get install alien" if you don’t have it).
For example, for version 12.1.0.2.0-1 for Linux x86_64 (64-bit):
alien -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
alien -i oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm
alien -i oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
sqlplus system/oracle@//localhost:1521/xe
If you execute sqlplus and get "sqlplus: command not found", see the section below about adding the ORACLE_HOME variable.
If sqlplus complains of a missing libsqlplus.so file, follow the steps in the section "Integrate Oracle Libraries" below.
If sqlplus complains of a missing libaio.so.1 file, run
sudo apt-get install libaio1
or, if you’re installing the 32 bit instant client on 64 bit,
sudo apt-get install libaio1:i386
If oracle applications, such as sqlplus, are complaining about missing libraries, you can add it to the system library list create a new file as follows:
sudo vi /etc/ld.so.conf.d/oracle.conf && sudo chmod o+r /etc/ld.so.conf.d/oracle.conf
and add the oracle library path as the first line. For example,
/usr/lib/oracle/12.1/client64/lib/
Then run ldconfig:
sudo ldconfig
Many Oracle database applications look for Oracle software in the location specified in the environment variable ‘ORACLE_HOME’.
Typical workstations will only have one Oracle install, and will want to define this variable in a system-wide location.
sudo vi /etc/profile.d/oracle.sh && sudo chmod o+r /etc/profile.d/oracle.sh
Add the following:
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
Alternatively, each user can define this in their ~/.bash_profile
Note: From Ubuntu 11.04 (confirmed in 11.04 and 14.04) sqlplus was not recognized as a command unless the following line was also included in the oracle.sh file:
export PATH=$PATH:$ORACLE_HOME/bin
更多详情:<https://help.ubuntu.com/community/Oracle%20Instant%20Client>