Download all debug symbols for Win10

Download app symbols,

1
2
3
4
set SYMURL=SRV*C:\MySymbols\*http://msdl.microsoft.com/download/symbols
#symchk /om c:\MySymbols\app_manifest.txt /ie explorer.exe
#symchk /im c:\MySymbols\app_manifest.txt /s %SYMURL%
symchk /r /ie explorer.exe /s %SYMURL%

Download kernel symbols,

1
symchk /r c:\windows\system32\ntoskrnl.exe /s %SYMURL%

Setup symbols path for WinDbg and IDA in console with Administrator privilege,

1
2
setx /m _NT_SYMBOL_PATH SRV*c:\\MySymbols*http://msdl.microsoft.com/download/symbols/
#.

ps. SymChk is in WinDbg tools.

refer to:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/using-a-manifest-file-with-symchk
https://blog.csdn.net/ziwei960319/article/details/122212998
https://www.cnblogs.com/antigao/p/4584034.html

Re-compress all Mame zip roms to 7z format

In advance,

trans_to_7z.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
 
PARENTDIR=$1
TMPDIR=`pwd`/tmp
 
PATH="/d/cext/Program Files/7-Zip:$PATH"
 
ISERR="no"
 
if [ "x$1" = x ] ; then
	echo "Please input dir to transform."
	exit
fi
 
if [ -e "$TMPDIR" ] ; then
	echo "Please rmdir [$TMPDIR] first."
	exit
fi
 
get_win_path()
{
	local win_path="$1"
	win_path="${win_path#/}"
	win_path="${win_path//\//\\}"
	win_path="${win_path/\\/\:\\}"
	echo $win_path
}
 
format_transform()
{
	local file_7z=$1
	local file_zip=$2
	local tmp_dir=$TMPDIR
	mkdir "$tmp_dir"
 
	7z x ${file_7z} -o"`get_win_path \"$tmp_dir\"`"
	(
		cd "$tmp_dir"
		ls
 
		7z a -mx9 "`get_win_path \"${file_zip}\"`" || ( echo "Creating 7z file failed." && ISERR="yes" )
	)
 
	rm -Rf "$tmp_dir"
}
 
cd "$PARENTDIR"
 
for fn in `ls *.zip`; do
 
	echo "$fn"
 
	format_transform $fn "`pwd`/${fn%.zip}.7z"
 
	if [ $ISERR = "yes" ]; then
		exit
	fi
done
 
echo "Transforming done."

How to use?

Copy trans_to_7z.sh to Mame root folder which contains roms sub-directory, right click at blank place of this Mame root window in Explorer, select "Git Bash Here" which prompts bash console, input below and return,

1
./trans_to_7z.sh roms

refer to:
https://www.cnblogs.com/wq242424/p/15564203.html

Install bare metal Linux dual booting with Windows

Installing Fedora is very straight forward, but

  • When clicking some avi suffix video file, I was prompted a GStreamer page, but no link to install missing plugins.

However I learnt

  • One disk must have its own EFI partition. For nowaday notebook usually has an SSD and an HDD, while SSD already has an EFI partition, when we have to install the second OS in HDD, the HDD must allocate an EFI partition too.
  • When we burn OS iso image into U-disk using UltraIso tool, we must select "RAW" mode, not others like "HDD+" mode.

'vboxdrv': Key was rejected by service

sudo dnf update
sudo dnf install mokutil

mkdir /root/signed-modules
cd /root/signed-modules
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"
chmod 600 MOK.priv

mokutil --import MOK.der

#After rebooting system

for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do
  echo "Signing $modfile"
  /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \
                                /root/signed-modules/MOK.priv \
                                /root/signed-modules/MOK.der "$modfile"
done

To play avi, rmvb files and so on,

dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
dnf install vlc

Not set default editor to nano in cscope,

cd /etc/profile.d
mv nano-default-editor.sh nano-default-editor.sh0

No sound?

vi /etc/pulse/default.pa
	load-module module-alsa-sink device=dmix
	load-module module-alsa-source device=dsnoop
reboot

This method doesn't go very well, but I know the reason, I had replaced pipewire with pulseaudio while pipewire is the next generation.

Update grub,

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

refer to:
https://www.tecmint.com/install-vmware-workstation-in-linux/
https://stackoverflow.com/questions/61248315/sign-virtual-box-modules-vboxdrv-vboxnetflt-vboxnetadp-vboxpci-centos-8
https://www.videolan.org/vlc/download-fedora.html
https://blog.csdn.net/weixin_41446370/article/details/116711350
http://blog.sina.com.cn/s/blog_628ba3e00102xvnk.html
https://blog.csdn.net/wujuncheng1996/article/details/83546929
https://mirror.tuna.tsinghua.edu.cn/help/rpmfusion/

send packet through nmap nping

nping in nmap suite can simulate sending packet on Windows platform.

this is an example of sending s7comm "Write Var" packet:

nping --dest-mac 00:50:56:32:5f:82 --source-mac 00:0c:29:29:15:30 --tcp -p 102 --dest-ip 10.2.0.10 -c 1 --data-length 37 --data 0300002502f080320100009378000e00060501120a1001000100018400001a000300010100

ps. on win7 platform, we should select "Install older Npcap 1.31 driver", maybe npcap 1.50 doesn't work in acquiring net card interface thereby.

refer to:
https://nmap.org/download.html