当前位置:网站首页>第二十五周记录
第二十五周记录
2022-06-25 03:59:00 【3ackr0d】
1、通过一次htb渗透学习linux命令
1.1 ssh命令
ssh 连接有两种方式,一是口令密码,二是公钥登录
ssh [email protected] [-p] # ssh默认端口是22,如果有更改,用 -p参数 指定
公钥登录流程
- ssh-keygen 创建公私钥
-t指定加密类型-f指定生成的文件名 - ssh-copy-id 将公钥上传到服务器中 /.ssh/authorized_keys
-i指定公钥文件 - ssh -i 私钥文件 [email protected]
ssh-keygen -t rsa -f 3ackr0d
ssh-copy-id -i 3ackr0d [email protected]
ssh -i 3ackr0d [email protected]
注意:要想修改成只能公钥登录,可以更改配置文件
#/etc/ssh/sshd_confing
PasswordAuthentication 改为 no
1.2 ln命令
全称:make links between files, ln取的是link的两个字母
利用方法:
ln 链接上 下载的文件(公钥)和 /root/.ssh/authorized_keys,然后就可以用ssh以root身份登录
ln
-s 建立软链接,注意源文件名必须是绝对路径
-f 如果目标文件存在,那么-f参数会覆盖掉目标文件
1.3 echo命令
输出内容
-n 去掉echo后面的换行符-e 反斜杠转义生效
单引号、双引号、不加引号的区别
- 单引号里面的内容原封不动的输出
- 双引号里面
$\`(反引号)会起作用 - 不加引号会把所有的内容解释
1.4 base64
对内容进行base64编码和解码
echo -n hello | base64
echo -n hello | base64 -d #-d参数是解码
2 python写程序调试
执行程序的时候 用 python -i target.py 进入交互界面
dir() #查看内置方法
边栏推荐
- Basic use of OBS browser+ browser
- 1.初识半音阶口琴
- NFT insider 63: the sandbox reached a cooperation with Time magazine, and YGG established Spain's subdao
- Openmmlab environment configuration
- 什么是数据持久化?
- Numpy NP tips: squeeze and other processing of numpy arrays
- 5 key indicators of SEO: ranking + traffic + session + length of stay + bounce rate
- Acmstreamopen return value problem
- Anaconda安装+TensorFlow安装+Keras安装+numpy安装(包含镜像和版本信息兼容问题)
- Text keyword extraction: ansj
猜你喜欢

Lecture record: new application of inertial navigation - inertial measurement

讲座记录《捷联惯导解算的历史及发展》

Cesium 拖拽3D模型

Text keyword extraction: ansj

How much do you know about the use value of WMS warehouse management system

Hello CTP (II) -- Introduction to CTP

2. play the chromatic harmonica

Basic use of OBS browser+ browser

WMS仓储管理系统的使用价值,你知道多少

微信小程序父子组件之间传值
随机推荐
DAP data scheduling function improvement description
numpy np tips:使用opencv对数组插值放缩到固定形状 cv2.resize(res, dsize=(64, 64), interpolation=cv2.INTER_CUBIC)
Doubts about judging the tinyint field type of MySQL
Lecture record: data processing methods and applications of various spatial geodetic techniques
地方/園區產業規劃之 “ 如何進行產業定比特 ”
Openmmlab environment configuration
Laravel document sorting 2. Route related
How to draw an industry investment map
Development of trading system (x) -- fix agreement
升级cmake
Is opencv open source?
Laravel document sorting 8. Middleware
Flutter FittedBox组件
Laravel document sorting 4. Controller
Laravel document sorting 7. View
sql_ mode=only_ full_ group_ By's pit
【LeetCode】143. Rearrange linked list
单元测试覆盖率
Development of trading system (IX) -- dark pool technology
Although the Internet in the traditional sense has long ceased to exist, this does not mean that the Internet has long disappeared