SCP is deprecated so let's start with SFTP:
C:\Users\snicholas\Downloads>sftp mute@192.168.1.1 mute@192.168.1.1's password:
| #!/usr/bin/env python3 | |
| # Simple script to enter the necessary boot mode in the MT6572-based (etc) phones | |
| # Depends on pyserial, otherwise fully cross-platform | |
| # Usage: python3 mtk-bootseq.py [MODECMD] [port] | |
| # e.g. python3 mtk-bootseq.py FASTBOOT /dev/tty.usbmodem14200 | |
| # and then connect the cable and repeatedly short-press the power on key | |
| # Supported commands depend on the device and its preloader. Here's the list for Sigma S3500 sKai: |
| # Transparent proxying so logs show correct IP and content inspection for when port 443 allows ssh but 22 is blocked :) | |
| # | |
| # https://gist.github.com/mhofman/a01df56480b3791d526b77dbebef43a2#creative-ip-routing-for-transparent-proxying | |
| # | |
| # root@debian:~# cat /etc/network/interfaces.d/lo | |
| # auto lo | |
| # iface lo inet loopback | |
| # post-up ip -4 a a 192.168.255.233/30 dev lo | |
| # post-up ip -6 a a fd00:8::1/64 dev lo | |
| # post-up ip -4 rule add from 192.168.255.232/30 lookup 232 |
| - general: MTK_PLATFORM_CFG | |
| info: | |
| - config_version: V1.1.6 | |
| platform: MT6739 | |
| project: t408dl | |
| storage: EMMC | |
| boot_channel: MSDC_0 | |
| block_size: 0x20000 | |
| check_bootloaders_consistency: true |
| --[[ Psuedo-code given in chapter: | |
| NextPerm(p1, p2, ..., pn) | |
| Let k be the largest index such that P(k) < P(k+1) | |
| If no such k exists then (p1, p2, ..., pn) is the last permutation | |
| Let j be the largest index such that P(j) > P(k) | |
| Swap P(j) and P(k) | |
| Reverse the order of P(k+1), ..., P(n) | |
| --]] |
| ; $ ls -l true /bin/true | |
| ; -rwxr-xr-x 1 root root 35424 Feb 28 2019 /bin/true* | |
| ; -rwxr-xr-x 1 mute mute 149 Feb 22 2015 true* | |
| ; | |
| ; take that GNU! | |
| ; basically https://www.muppetlabs.com/~breadbox/software/tiny/return42.html | |
| ; but someone said 'true' had to support options to really compare to GNU | |
| BITS 32 |
| 1. Create VMDK mimic layout of real HDD. | |
| Slices were readable but raw disk wasn't in macos, so I just wrote down all the "diskutil info disk0s1" | |
| info and converted 4096-byte-sectors to 512 by multiplying by 8. Also I offset disk0s1 by 1 sector. | |
| This allowed me to copy the first sector and manually edit the Bytes/sector, Sector/Cluster, Hidden Sectors, | |
| and Total Sectors in the NTFS BPB. Windows sees it as a RAW partition otherwise, even though Linux has no | |
| problem figuring it out. Finally I recreated the blank space at the end as a writable area since the | |
| alternate GPT is stored there. | |
| # Extent description |
I hereby claim:
To claim this, I am signing this object: