2020年6月8日星期一

brut.common.BrutException when using apktool build apk

 When rebuild an APK using apktool, I run into this problem:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):

Try this:

apktool b --use-aapt2 -o unsigned_apk.apk .\app-debug\

It works for me this time,
but this may not working for any APK for all the time.

2020年5月3日星期日

Windows GNU Radio “Failed to open HackRF device” when using osmocom sink with Hackrf One

Got my new Hackrf One today. It works fine in GNU Radio as an osmocom source. But when I tried to use it with as an osmocom sink , I got a problem.

First the grc graph:
 
For making GNU Radio to connect Hackrf One, I set the "Device Arguments" to "hackrf=0" same as in osmocom source block which works fine. And I found this argument in the documentation of the block.
 

Then I execute the flow graph and get the error:


This really confuses me... Same hardware, same driver, same pc...

OK, time to read some codes.
At last, I found this code:
https://git.osmocom.org/gr-osmosdr/tree/lib/hackrf/hackrf_common.cc



It seems when osmocom block is finding a hackrf device with specified serail number given by the block properties window.
Then I tried to remove the "=0" texts from arguments.
Yeah, it worked...

 Just like the osmocom source block.

But the "=0" argment takes no effect on osmocom source block...
Why...
🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔

2020年4月20日星期一

Install Kali tools into chroot

#Install debootstrap

sudo apt-get install debootstrap

#Install Ubuntu 18.04 into chroot

mkdir chroot_root
sudo debootstrap --arch amd64 bionic ./chroot_root/

#If you run into this error:
#/usr/sbin/debootstrap: cannot create /media/XXXXX/chroot_root/test-dev-null: #Permission denied


#Try to remount or your block device without noexec and nodev options.
#For example:
#sudo mount -t ext4 -o remount,rw,relatime,uhelper=udisks2 /dev/sda1 /media/MOUNT_POINT
#Or adjust your mount options in "disks" 

#Bind nodes:
sudo mount --bind /proc ./chroot_root/proc
sudo mount --bind /dev ./chroot_root/dev
sudo mount --bind /sys ./chroot_root/sys
#ATTENTION: Only run these commands when the dirs are empty.

#Run chroot

sudo chroot ./chroot_root

#Install katoolin

apt update
apt install python git gnupg

git clone https://github.com/LionSec/katoolin.git
cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
katoolin

#Enjoy!


#Backup
sudo tar -czf chroot_root_bak.tar.gz ./chroot_root




2020年4月15日星期三

临时本地解决DNS污染


在本地启动一个DoH的DNS服务器
proxychains sudo cloudflared proxy-dns
nslookup twitter.com 127.0.0.1


如果只是想临时解析一下域名的话,
proxychains dig +tcp @1.1.1.1 twitter.com

2020年2月21日星期五

[Cheat Engine] Communication between LUA and Auto Assemble


autoAssemble([[{$STRICT}
aobscan(test_sym1,01 B7)
registerSymbol(test_sym1)]])

local s = readQword("test_sym1")
print(type(s))

if s == nil then
print("NULL")
else
print(string.format("%X",s))
end

2019年2月17日星期日

Rise to Ruins Trainer

This trainer needs  Cheat Engine (>=6.6) to be installed .

Currently works with Rise to Ruins InDev 32b. This script will refill your influence automatically. 

The process of Rise to Ruins is a javaw executable, be careful of other javaw processes when open process in CE.
update:
  • GUI added.
  • Script saved as .CT file.
  • Super Speed villagers

Download: https://github.com/SimonTheCoder/rise_to_ruins_trainer/releases







Stop java event listener in Cheat Engine Script

function java_StopListeneningForEvents()
  javapipe.lock();
  javapipe.writeByte(JAVACMD_STOPCODECALLBACKS)


  --the javapipe will now be frozen until a javaeventpipe makes an connection
  --createNativeThread(JavaEventListener);

  javapipe.unlock();
end