反编译Python打包生成的exe文件
1.解压 exe 文件 1.1 下载 pyinstxtractor https://github.com/extremecoders-re/pyinstxtractor 1.2 执行解压操作 python pyinstxtractor.py <filename> 执行成功会出现一个 filename_extracted 目录,目录里面有相对应的 pyc 文件 2.反编译 pyc 文件 2.1 安装 uncompyle6 pip install uncompyle6 2.1 反编译 pyc 文件 uncompyle6 xx.pyc 执行成功即可看到可运行的 python 源码
Ubuntu安装nginx
1.命令行安装 直接在终端运行命令进行安装 sudo apt install nginx 如果需要自定义安装,可以参考官方文档 http://nginx.org/en/linux_packages.html#Ubuntu 在浏览器输入服务器地址,出现 nginx 默认页面表示安装成功 2.查看默认配置 cat /etc/nginx/nginx.conf user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } #mail { # # See sample authentication script at: # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript # # # auth_http localhost/auth.php; # # pop3_capabilities "TOP" "USER"; # # imap_capabilities "IMAP4rev1" "UIDPLUS"; # # server { # listen localhost:110; # protocol pop3; # proxy on; # } # # server { # listen localhost:143; # protocol imap; # proxy on; # } #} 默认页面的服务器对应这一行配置 ...
Android反编译odex
0.下载 baksmali.jar 、smali.jar 下载地址 https://bitbucket.org/JesusFreke/smali/downloads/ Github 地址 https://github.com/JesusFreke/smali 1. odex -> smali files 把手机系统 /system/framework 下的内容拷贝到工作目录,和需要转换的 .odex、.vdex 文件也拷贝至目录,目录结构如下 -system -a.odex -a.vdex -baksmali-2.5.2.jar -smali-2.5.2.jar 然后执行以下命令 java -jar baksmali-2.5.2.jar deodex a.odex -b ./system/framework/arm64/boot.oat -o out -deodex : 指定 odex 文件 -b : 指定 bootclasspath 文件 -o : 指定 smali 输出目录 2. smali files -> dex java -jar smali-2.5.2.jar assemble out -o a.dex -assemble : 指定 smali files 文件夹 -o : 指定输出文件名 3. 更多 https://www.cnblogs.com/ysk-china/p/7162203.html?utm_source=itdadao&utm_medium=referral ...
Python文件打包
0.省流助手 pyinstaller -F myfile.py 1.安装 Pyinstaller 1.1 先安装 pywin32 pip install pywin32 1.2 再安装 Pyinstaller pip install PyInstaller 2.使用 Pyinstaller pyinstaller -F myfile.py 2.1 输入参数含义 -F, --onefile 生成单个可执行文件 如果一切正常,会在 .py 文件同目录下的 dist 目录生成 .exe 文件 查看更多参数 pyinstaller -h
几个ip信息获取接口
http://ipinfo.io/json { "ip": "59.42.111.132", "hostname": "132.111.42.59.broad.gz.gd.dynamic.163data.com.cn", "city": "Lianjiang", "region": "Guangdong", "country": "CN", "loc": "21.6467,110.2817", "org": "AS4134 CHINANET-BACKBONE", "timezone": "Asia/Urumqi", "readme": "https://ipinfo.io/missingauth" } http://whois.pconline.com.cn/ip.jsp 广东省广州市天河区 电信ADSL http://pv.sohu.com/cityjson?ie=utf-8 var returnCitySN = {"cip": "59.42.111.132", "cid": "440106", "cname": "广东省广州市天河区"};
Android 8.0 以上开启全局可调式
Android 8.0 以上开启全局可调式 1.安装好 Magisk 2.终端执行 adb shell su magisk resetprop ro.debuggable 1 3.重启 system server stop;start 4.重启手机会失效
使用MagiskHidePropsConf开启全局可调试
1.安装好 Magisk 此处略过 2.安装 MagiskHidePropsConf 下载地址 https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/releases 安装完成后重启 3.按流程操作 重启进入终端 按流程一步一步操作就行了 adb shell props MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== Select an option below. ===================================== 1 - Edit device fingerprint 2 - Force BASIC key attestation 3 - Device simulation (disabled) 4 - Edit MagiskHide props (active) 5 - Add/edit custom props 6 - Delete prop values 7 - Script settings 8 - Collect logs u - Perform module update check r - Reset all options/settings b - Reboot device e - Exit See the module readme or the support thread @ XDA for details. Enter your desired option: 5 MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== Custom props Select an option below: ===================================== Set or edit custom prop values for your device. Currently no custom props set. Please add one by selecting "New custom prop" below. n - New custom prop b - Go back to main menu e - Exit See the module readme or the support thread @ XDA for details. Enter your desired option: n MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== New custom prop ===================================== Enter the prop to set. Example: ro.sf.lcd_density b - Go back e - Exit Enter your desired option: ro.debuggable MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== ro.debuggable ===================================== ro.debuggable is one of the sensitive props that can be set by the MagiskHide props option. Are you sure you want to proceed? y - Yes n - No e - Exit Enter your desired option: y MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== ro.debuggable ===================================== Enter the value you want to set ro.debuggable to, or select from the options below. The currently set value is: 0 Please enter the new value. b - Go back e - Exit Enter your desired option: 1 MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== ro.debuggable ===================================== This will set ro.debuggable to: 1 Pick an option below to change what boot stage the prop will be set in, or set/reset a delay: 1 - Default (current) 2 - post-fs-data 3 - late_start service 4 - Both boot stages d - Delay Do you want to continue? Enter y(es), n(o), e(xit) or an option from above: y Working. Please wait... Working. Please wait... Working. Please wait... Working. Please wait... Working. Please wait... MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers ===================================== Reboot - ro.debuggable ===================================== Reboot for changes to take effect. Do you want to reboot now (y/n)? Enter y(es), n(o) or e(xit): y Rebooting...
sqlite常用操作
sql sqlite 时间戳转日期 select datetime(1613714753, 'unixepoch', 'localtime'); 输出 2021-02-19 14:05:53 当前时间戳 select strftime('%s','now'); 输出 1613714753 查询所有表 SELECT * FROM sqlite_master
adb常用命令
1.查看最上层 Activity 名字 Linux adb shell dumpsys activity | grep "mResumedActivity" Windows adb shell dumpsys activity activities | findstr mResumedActivity 2.启动组件 启动 Activity adb shell am start -n com.google.android.network2/com.my.MainActivity 启动 Service adb shell am startservice -n com.google.android.network2/com.my.MainActivity 发送 Broadcast adb shell am broadcast -a android.intent.action.BOOT_COMPLETED 3.重启设备 重启到 Recovery 界面 adb reboot recovery 重启到 bootloader 界面 adb reboot bootloader 4.其他 强制结束应用 adb shell am force-stop <PACKAGE> 5.以调试模式启动应用 adb shell am set-debug-app -w {package_name} 清除调试模式 ...
mysql 相关
开启 mysql 远程访问 确认端口是否对外开放,默认是不开放的 netstat -an | grep 3306 输出如下 tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 修改配置文件(不同版本可能位置不同) /etc/mysql/mysql.conf.d/mysqld.cnf 注释掉 # bind-address = 127.0.0.1 为新增主键赋值 SET @mycnt = 0; UPDATE xxxxx SET RowNum=(@mycnt := @mycnt + 1) 使用 native_password 连接 ALTER USER 'user'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; flush privileges; 修改用户密码 ALTER USER 'username'@'localhost' IDENTIFIED BY 'new_password'; 使用默认密码修改数据库密码 查看默认用户密码 cd /etc/mysql sudo cat debian.cnf # Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = G0Gis29yv0dtUhng socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = localhost user = debian-sys-maint password = G0Gis29yv0dtUhng socket = /var/run/mysqld/mysqld.sock 使用默认用户登录 ...