nginx反代cloudflare https站点

自己域名反代自己在 cloudflare 的域名进行加速 #PROXY-START/ location  ~* .(php|jsp|cgi|asp|aspx)$ { proxy_pass https://你的域名; proxy_set_header Host 你的域名; #向后端传递访客 ip proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; #向后端传递访客 ip proxy_ssl_name 你的域名; proxy_ssl_server_name on; } location / { proxy_pass https://你的域名; proxy_set_header Host 你的域名; #向后端传递访客 ip proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; #向后端传递访客 ip (反代CF增加规则) proxy_ssl_name 你的域名; … Read more

在Ubuntu22.0.4上安装jadx

在Ubuntu22.0.4上安装jadx 获取jadx版本号 curl -s "https://api.github.com/repos/skylot/jadx/releases/latest" | grep -Po '"tag_name": "vK[0-9.]+' 输出: lili@adam:~/development/reverse/tools$ curl -s "https://api.github.com/repos/skylot/jadx/releases/latest" | grep -Po '"tag_name": "vK[0-9.]+' 1.4.6 得到当前最新jadx版本号是1.4.6。2.下载jadx curl -Lo jadx.zip "https://github.com/skylot/jadx/releases/latest/download/jadx-${JADX_VERSION}.zip" lili@adam:~/development/reverse/tools$ curl -Lo jadx.zip "https://github.com/skylot/jadx/releases/latest/download/jadx-1.4.6.zip"   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed   0     0    0     0    0     0      0      0 –:–:–  0:00:01 –:–:–     0 100     9  100     9    0     0      3      0  0:00:03  0:00:02  0:00:01     3 lili@adam:~/development/reverse/tools$ ls jadx.zip 解压压缩包 lili@adam:~/development/reverse/tools$ unzip jadx.zip -d jadx-temp 添加jadx到环境变量vim打开~/.profile文件,添加最下面添加下面的代码 # add jadx   if [ -d "$HOME/development/reverse/tools/jadx-temp/bin" ] ; then     PATH="$HOME/development/reverse/tools/jadx-temp/bin:$PATH" fi 然后 source ~/.profile 检查jadx是否安装成功 lili@adam:~$ jadx –version 1.4.6 测试jadx lili@adam:~/development/reverse/apks$ jadx-gui tiktok.apk Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2633) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1837) at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445) at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501) at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2651) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830) at java.base/java.lang.System.loadLibrary(System.java:1873) at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399) at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396) at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429) at java.desktop/java.awt.Component.<clinit>(Component.java:621) at jadx.gui.settings.JadxSettings.<clinit>(JadxSettings.java:51) at jadx.gui.settings.JadxSettingsAdapter.load(JadxSettingsAdapter.java:64) at jadx.gui.JadxGUI.main(JadxGUI.java:24) 我执行jadx-gui报错了,因为jdk不完整。运行下面命令 sudo apt install openjdk-11-jdk –fix-missing 再次尝试打开jadx-gui jadx-gui tiktok.apk

Android上使用termux开启ssh,并在pc端连接

Android上使用termux开启ssh,并在pc端连接 需求背景 看同事在公司的android设备上装termux想搞远程adb,周末自己在家也想着玩玩。首先在手机上安装了termux,接下来需要在手机上敲一堆命令有点麻烦,所以想着在手机上开启ssh,就可以通过局域网内的pc连接手机的ssh在电脑上敲命令了。 termux可以在https://f-droid.org/zh_Hans/packages/com.termux/或https://github.com/termux/termux-app/releases下载安装。 手机端操作步骤 termux内安装openssh pkg update  pkg install openssh 设置ssh密码 passwd 输入两遍密码就设置完成了 开启ssh服务 sshd 如果提示:sshd: no hostkeys available — exiting. 就输入下面命令 ssh-keygen -A 查看用户 whoami 查看手机ip ifconfig PC端操作步骤 以上在手机上通过termux安装了openssh,开启了ssh服务,拿到了用户名和手机ip,接下来在就能在pc端连接手机ssh了。Windows上可以用putty、xshell、securecrt、termius等工具连接ssh,我pc装的是ubuntu,可以直接通过命令连接。 ssh -p 8022 u0_a182@192.168.31.29 8022是openssh的默认端口,u0_a182是手机上通过whoami得到的用户名,192.168.31.29是我手机的局域网ip。

install selenium,chrome,ChromeDriver on Aliyun CentOS ECS

install selenium  yum install selenium 2. install chrome   yum install epel-release yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm 3.install ChromeDriver    3.1 check chrome version   google-chrome-stable –version Google Chrome 102.0.5005.115   3.2 download the ChromeDriver match the chrome and install it     go to the taobao mirror page https://npm.taobao.org/mirrors/chromedriver/ wget  unzip chromedirver_linux64.zip   mv chromedriver /usr/bin/ chmod 777 /usr/bin/chromedriver 3.3 check ChromeDriver  Version chromedriver -v

UML class diagram-UML类图

    The UML diagram is a graphical notation used to construct and visualize object oriented systems. A class diagram in the Unified Modeling Language is a type of static structure diagram that describes the structure of a system by showing the system's :       UML类图是一种构造和可视化面向对象系统的图形符号。一个统一模型语言(UML)中的类图是一直静态结构化图形,它通过展示以下内容描述了系统的结构: classes 类 their attributes 属性  operations(or methods) 操作(方法) and the relationships … Read more

SOLID principles of Object-Oriented Design-面向对象设计的SOLID五大准则

面向对象设计的五大准则(SOLID) ## 单一职责原则 Single Responsibility Principle A class should have one,and only one,reason to change.   一个类应该有一个,且只有一个理由改变。   It is one of the basic principles most developers apply to build robust and maintainable software.You can not only apply it to classes,buit also to software compoments and microservices.   单一职责原色是大部分开发者应用构建健壮和可维护软件的基本准则之一。我们不仅可以把单一职责原则应用于类,并且可以应用到软件组件和微服务中。   – Benefits of the Single … Read more

Quicksort Algorithm Using Lomuto partition Scheme-Lomuo分割方案的快速排序算法

 QuickSort is another algorithm form Divide and Conquer category.It operates by breaking down large problems into smaller,more easily solvable problems. 快速排序是分治算法分类中的另一种算法,它通过把大问题拆分成更小,更容易解决的问题操作。 The idea of QuickSort is the following: a pivot element is picked.The versions of QuickSort differ in the way of pivot picking.First,last,median,or a randomly selected element is a candidate to be picked, as the … Read more

Merge Sort Algorithm-归并排序

Merge Sort belongs to the category of Divide and Conquer algorithms. These algorithms operate by breaking down large problems into smaller, more easily solvable problems.   归并排序属于分治算法分类,这些算法通过把大的问题拆分成更小的,更容易解决的问题操作。   The idea of the merge sort algorithm is to divide the array in half over and over again util each piece is only one item long.Then those … Read more

Insertion Sort Algorithm-插入排序算法

Insertion Sort is a simple sorting algorithm that works the way we sort playing cards in our hands.We sort the first two cards and then place the third card in the appropriate position within the first two, and then the fourth is positioned within the first three,and so until the whole hand is sorted. 插入排序也是一种简单的排序算法,它的原理跟我们玩扑克牌排序一样。首先排序前两张牌,然后在他们中合适的未知插入第三张牌,然后在前三张合适的位置插入第四张,直到手里的牌全部有序。 … Read more

Selection Sort Algorithm-选择排序算法

     Selection Sort is a simple sorting algorithm that find the smallest element in the array and swaps it with the element in the first position, then find the second smallest element in and swaps it with the element in the second position,and continues in this way until the entire array is sorted.   选择排序是一种简单的排序算法,首先查找数组中最小的元素,跟数组元素第一位交换,然后查找第二小的元素,跟数组第二位元素交换,依此类推,直到整个数组元素有序。 … Read more