zsh

Echo all aliases in zsh

▼魔方 西西 提交于 2020-06-08 12:38:17
问题 Is it possible to force zsh to echo the actual commands referred to by all aliases when they are used? For example, say that I have the following aliases set: # List direcory contents alias lsa='ls -lah' alias l='ls -la' alias ll='ls -l' When I execute them I would like to see each of them print the actual command that's executed. For example, I would like to see the following: $ ll executing: 'ls -l' total 0 -rw-r--r-- 1 person staff 0 Feb 15 13:46 cool.txt -rw-r--r-- 1 person staff 0 Feb 15

pyenv giving shopt command not found error on macos

匆匆过客 提交于 2020-05-15 05:41:47
问题 I have been using pyenv for managing python versions and virtual environments on my mac for some time now. Recently I reinstalled pyenv and since then on every pyenv command I try to run, I get the following error /usr/local/bin/pyenv:94: command not found: shopt My default shell is the latest MacOS 's default shell i.e. zsh . On searching for the fix, I found out it has something to do with bash interfering with the zsh . My default shell is zsh in settings, the contents of ~/.bash_profile ,

yum更换国内源、用yum下载rpm包和源码包的安装

不羁的心 提交于 2020-05-08 19:49:02
10月10日任务 7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 7.6、更换国内yum源 #首先备份/etc/yum.repos.d/ [root@localhost yum.repos.d]# cp -r /etc/yum.repos.d/ /etc/yum.repos.d.bak [root@localhost yum.repos.d]# ls /etc/yum.repos.d.bak/ CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo [root@localhost ~]# cd /etc/yum.repos.d/ #删除/etc/yum.repos.d/下的源文件CentOS-Base.repo [root@localhost yum.repos.d]# rm -rf CentOS-Base.repo #下载国内163yum源。 [root@localhost yum.repos.d]# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo [root

Mac OS最简方式安装adb

随声附和 提交于 2020-05-06 15:34:56
如果你的Mac还没安装Homebrew, 先安装Homebrew,Homebrew是Mac上非常优秀的软件包管理工具。 拥有安装、卸载、更新、查看、搜索等很多实用的功能。 推荐国内的一键安装脚本,该脚本会自动设置国内源: /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)    然后安装 android-platform-tools: brew cask install android-platform-tools 测试是否正常安装 adb devices    如果需要查看安装的位置 brew cask info android-sdk    来源: oschina 链接: https://my.oschina.net/u/4313784/blog/4268344

CTF-Pwn-[BJDCTF 2nd]one_gadget

♀尐吖头ヾ 提交于 2020-05-06 14:59:00
CTF-Pwn-[BJDCTF 2nd]one_gadget 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!本文仅用于学习与交流,不得用于非法用途! CTP平台 网址 https://buuoj.cn/challenges 题目 Pwn类,[BJDCTF 2nd]one_gadget 下载题目的文件 one_gadget 思路 使用file命令查看,发现是64位的文件,使用ida64位打开,如果是在mac15下打不开在终端输入 sudo xattr -rd com.apple.quarantine /Users/tanglei/Desktop/CTF/IDA\ Pro\ 7.0/ida64.app 后面是ida64.app的位置 使用ida64打开 进入主函数,使用F5反编译后得到伪代码,结果f5按不出来,还是用mac的 int __cdecl main(int argc, const char **argv, const char **envp) { void (*v4)(void); // [rsp+8h] [rbp-18h] void (*v5)(void); // [rsp+10h] [rbp-10h] unsigned __int64 v6; // [rsp+18h] [rbp-8h] v6 = _

Ubuntu「一键」设置全局代理

人走茶凉 提交于 2020-05-05 23:11:01
Ubuntu「一键」设置代理 <span style = 'color:red' >sonictl note: the DNS problem may be still there. Except proxychains . </span> WSL (Windows Subsystem for Linux) or Ubuntu is OK for this tutorial. Other linux can also try this. 1. Windows first Proxifier --> Clash Walls on UWP apps: Use Fiddler WinConfig tool to disable it. WSL: 使用 SSTap 直接接管 Windows 除了 Windows 系统进程以外的网络层,当然也包括 WSL Proxifier 并不能实现对 WSL 启用代理 相对最完美的方法是使用 Proxychains, 但不方便 直接在终端配置 proxy, 如果在WSL上使用的app不多。 2. Linux, WSL: Configure proxy in Terminal two lines of cmds: export ALL_PROXY="socks5://127.0.0.1080" export all_proxy="socks5://127

mac安装pwntools(python3.8)解决多数问题

与世无争的帅哥 提交于 2020-05-05 12:45:30
mac安装pwntools(python3.8)解决多数问题 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢! 安装pwntools 贴一下官方文档地址 http://docs.pwntools.com/en/stable/install/binutils.html#mac-os-x 采用 homebrew 安装 brew install pwntools 一顿等待之后 配置python 进入python目录 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages 创建mypath.pth 把下面的这段话写上去 /usr/local/Cellar/pwntools/4.0.1_1/libexec/lib/python3.8/site-packages 发现有错误,提示我们安装binutils 安装binutils export ARCH='amd64' brew install https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/osx/binutils-$ARCH.rb 还是报错,是因为地址的问题,改动了一下 brew

CTF-Web-[极客大挑战 2019]PHP

回眸只為那壹抹淺笑 提交于 2020-05-03 15:36:09
CTF-Web-[极客大挑战 2019]PHP 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!本文仅用于学习与交流,不得用于非法用途! CTP平台 网址 https://buuoj.cn/challenges 题目 Web类,[极客大挑战 2019]PHP 打开题目的实例 思路 看到这种题目,我爱了 特别是这个动画效果,做安全的前端也这么优秀吗?大佬 不过我发下一个问题,这个动画搞的我打不开源代码了,我去,不过这个题也不需要用到,说到文件备份,首先把网站的目录给爆破出来,使用dirsearch dirsearch 一款基于python3的目录爆破工具 下载地址 https://github.com/maurosoria/dirsearch 使用 -u 指定url -e 指定网站语言 -w 可以加上自己的字典(带上路径) -r 递归跑(查到一个目录后,在目录后在重复跑,很慢,不建议用) 进入dirsearch目录后 执行./dirsearch.py -u 127.0.0.1 -e php类似的目录,这里我们使用 ./dirsearch.py -u http://71f04e34-1537-41f0-8c4f-e3de12f432b9.node3.buuoj.cn -e php 里面文件是真的多

配置使用burpsuite2020.2(渗透测试工具)

人盡茶涼 提交于 2020-05-02 18:06:30
配置使用burpsuite2020.2(渗透测试工具) 查看端口 burpsuit中Proxy模块中的options 配置谷歌浏览器 安装代理插件 https://github.com/FelisCatus/SwitchyOmega/releases 将刚才下载好的crx文件的扩展名改为zip,用解压缩软件解压到目录中zip格式的,然后解压(使用命令解压,不然可能会出现错误) unzip SwitchyOmega_Chromium.zip -d SwitchyOmega_Chromium 进入谷歌浏览器的配置扩展,选择已解压的扩展程序 然后就出现了 配置代理端口和服务器 开启代理 安装HTTPS证书 导出证书 这里要选择一个文件,所以首先创建一个空的crt文件 打开谷歌,找到证书管理 会弹出钥匙串访问,首先把我们把的那个crt证书导入,然后找到那个证书 发现可以使用https了 感谢 万能的网络 以及勤劳的自己 来源: oschina 链接: https://my.oschina.net/u/4137262/blog/4262351

Linux

牧云@^-^@ 提交于 2020-05-01 06:14:03
shell脚本。 壳,充当一个翻译,让计算机能够认识的二进制程序,并将结果翻译给我们。 加在内核上,可以跟内核打交道的壳。 可以通过 /etc/shells 来查看。 [root@local ~]# cat /etc/shells /bin/sh /bin/bash /sbin/nologin /usr/bin/sh /usr/bin/bash /usr/sbin/nologin /bin/tcsh /bin/csh 可以增加shell, yum install zsh [root@local ~]# zsh [root@local]~# cd /etc/sysconfig [root@local]/etc/sysconfig# zsh可以显示绝对路径。 最常用的shell是bash。 编写一个shell脚本。 shell是以.sh结尾的文件。(linux不以后缀名区分文件,为了方便记忆,通常都以.sh结尾) [root@local ~]# vim first.sh #! /bin/bash # This is my first shell-script mkdir /root/shell ifconfig [root@local ~]# chmod +x first.sh 增加可执行的权限。 执行脚本 [root@local ~]# first.sh eno16777736: