"C:\Program Files\Google\Chrome\Application\chrome.exe" --ssl-key-log-file=%USERPROFILE%\Desktop\keylog.txt
Thursday, August 22, 2024
Dump ssl keys with chrome for usage with Wireshark
Monday, August 29, 2022
Chrome ERR_CERT_INVALID
I never knew….
If you cannot continue in Chrome because of an ERR_CERT_INVALID error, even after pressing Advanced: there’s a secret passphrase built into the error page. Just make sure the page is selected (click anywhere on the background), and type `thisisunsafe`
Sunday, July 24, 2022
ffmpeg reminder
Personal reminder:
Download latest: https://ffmpeg.org/download.html
Run ffmpeg -i MyMovie.mkv and look for stream info, e.g.:
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 1920x800, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Stream #0:1(dut): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s title : Dutch Stream #0:2(dut): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s title : Flemish Stream #0:3(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s title : English Stream #0:4(dut): Subtitle: subrip (default) (forced) Stream #0:5(dut): Subtitle: subrip Stream #0:6(eng): Subtitle: subrip
Say, I would like to have the video with the Flemish audio and all the subtitles (since they don’t take that much space)
ffmpeg -i MyMovie_2160p.mkv -vf scale=640:-2 -ac 2 -af "pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR" -map 0:v:0 -map 0:a:1 -map 0:s MyMovie_640p_2ch.mkv
-vf scale=640:-2 = video filter: 640p, -2 means keep aspect ratio for vertical pixels -ac 2 = (convert to) 2 audio channels -af "pan=...... = audio filter: copy multichannel audio without losing center channel (dialogs) -map 0:v:0 = copy first (0) video stream -map 0:a:1 = copy second (1) audio stream (Start from 0. So 0 would be Dutch, 1 Flemish, 2 English) -map 0:s = copy all subtitles but if you have non-convertible subtitles (bitmapped), then first map the desired sub and copy, e.g.: -map 0:s:3 -c:s copy
Monday, July 11, 2022
ser2net p1 adapter yaml config
Because i didn’t make a backup. For next time’s reference:
connection: &p1usb accepter: tcp,10001 enable: on connector: serialdev,/dev/ttyUSB0,local,115200n81
Older ser2net, shipped with debian buster with ‘just’ a .conf file is easy:
10001:telnet:600:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner
Thursday, July 7, 2022
pfSense Multi VLAN DNS (host) overrides
pfSense’s DNS resolver has the ability to do host overrides from the gui, but these are global overrides.
Unbound (the underlaying DNS resolver) has the ability to create DNS views to do different things based on source addresses.
It is located under Services - DNS Resolver - General - Custom options. It is a free format field.
Example:
server: access-control-view: 10.123.12.0/24 vlan15activedirectory access-control-view: 10.158.1.0/24 vlan16guest view: name: "vlan15activedirectory" local-zone: "vpn.client.net" static # adding the host as a zone results in NXDomain lookup view: name: "vlan16guest" local-data: "vpn.client.net. 90 IN A 11.12.13.10" # adding a specific host and map it to a specific ip
More info: https://unbound.docs … ring/tags-views.html
Tuesday, November 2, 2010
Log all output to a file (dos, bash)
I’m always googling for this. What was that thing again that logs all output to a file?
2>&1
Bash example:
root@ubuntu:/mnt/sda6# rsync -av * /mnt/backup/sda6/ >/mnt/backup/readrrors.txt 2>&1
Dos example:
copy backup.log \\nas\share\weeklog.txt >output.txt 2>&1
Thursday, October 14, 2010
Forcing a refresh of Network Printer Settings from Print Server
If you have a printserver in your network and you want to change certain properties, e.g. print black/white instead of color, normally what you do is change the settings on the Advanced Tab - Default Settings Button. These are the settings a user inherits when first connecting to the shared printer.
But what if you want to revert these settings. You’d have to remove the printer from the userprofile and make sure the printer’s readded, in order to inherit the new default settings.
This is exactly what the following script does.
It also cleans removed/unshared printers, as it can only re-add printers that still exist.
on error resume next Set WshNetwork = WScript.CreateObject("WScript.Network") '## Enumerate all the current printers in the profile Set oPrinters = WshNetwork.EnumPrinterConnections For i = 0 to oPrinters.Count - 1 Step 2 '## Disconnect the printer WshNetwork.RemovePrinterConnection ""& oPrinters.Item(i+1) &"", true, true '## Readd the same printer (if still exists) WshNetwork.AddWindowsPrinterConnection ""& oPrinters.Item(i+1) &"", true, true Next msgbox "Done"
You might want to comment the last line to make the script run totally silent.
Monday, May 17, 2010
Nokia OVI sync error “80043c94”
Maybe it’ll be fixed in newer versions but todays latest version of Nokia OVI Suite is 2.1.1.1 and the latest firmware for my nokia E71 is 410.21.010.
So now everything’s up to date, still can’t sync contacts, agenda, etc with the OVI Suite. All i get is error “80043c94”.
Searched all over the net, but no solution. AARGH
Reason: You cannot have your application data (%appdata%) redirected. Revert to default settings (as part of your user profile, whichs makes your userprofile bigger/slower when logging in/out) and sync works again.
Tuesday, March 16, 2010
Register a serie of .dll files
Run from prompt:
for /f "tokens=*" %a in ('dir /b *.dll') do regsvr32 /s %a
Remember: when running from a batchfile %a becomes %%a
Sunday, July 26, 2009
simple html redirect
So simple, yet so much used..
<meta HTTP-EQUIV="REFRESH" content="3; url=https://webmail.customer.com/exchange/"> <HTML> <br> <br> <br> <t>You will be redirected in 3 seconds ...</t> <br> </HTML>
Sunday, June 7, 2009
areca master password
It’s actually a pretty big security issue, but i’m glad it exists :)
Can’t access your raid configuration anymore? Forgot your password?
areca master password: MNO974315743924 (works on 1160, 1210 (McBIOS), …)
And just a reminder:
areca default archttp32 user/pass: admin/0000
rebuild 3ware array
Just a reminder for myself on how to rebuild degraded 3ware arrays on some of my linux machines with the cli tool.
Scenario:
The degraded drive is connected to port 2.
The drive is connected to controller 0.
Port 0 is member of unit 0.
- Remove the drive
tw_cli maint remove c0 p2
- Now replace the drive
- Enable the new drive
tw_cli maint rescan c0
- Assign the drive to a temporary unit
tw_cli maint createunit c0 rspare p2
- rebuild the array
tw_cli maint rebuild c0 u0 p2
Saturday, June 6, 2009
bootable sticks
In our line of work a bootable stick is nothing less but essential! CD’s can be used (in fact, sometimes you have no other option as the computer won’t boot from USB) but they are slow, easily scratched, have no option to add files (unless you’re going to burn a new cd), limited in size, etc.
Bootable sticks can be used for a lot of things, e.g.
- create backups
- recover non-bootable systems
- partitioning related stuff (mbr, set active, create, remove, resize)
- offline defragmentation
- offline editting of registry
- …
But first, let’s see how to create the sticks.
MSDOS
Download this utility (originally) from HP: hp_format_usb_sp27213.exe
You’ll also need these files msdos_files_for_bootable_usb.zip
- Extract the msdos files.
- Run the utility.
- Select the device (stick).
- “Create a DOS startup disk” “using DOS system files located at:” and select the location of the msdos files.
- Start
Now just add extra files, utilities, modified config.sys or autoexec.bat and you’re off to go!
XP
I presume everybody’s familiar with WinPE/BartPE cd’s. These can be booted from usb. Refer to this site for a how-to:
http://www.911cd.net … .php?showtopic=10806
There are some disadvantages when using XP-based bootable media:
- Limited hardware support (e.g. no AHCI/sata or other harddisk controllers)
- (usb) drives connected AFTER booting won’t be recognized. They must be connected when booting, not afterwards
I recommend using Vista based media.
Vista
Bootable media based on the Vista kernel have big advantages:
- Better/more hardware support
- (usb) drives connecter AFTER booting WILL be recognized
- (best of all) Vista supports user-mode driver loading.
Example: one of my customers uses an iscsi SAN. Servers are equiped with iscsi hba’s. In case of trouble, i can boot from usb, then load the driver and all of a sudden all drives on the SAN are visible. No reboot requred. No floppy + F6 etc.
I recommend the Active Boot Disk. They come pre-loaded with utilities for checking drives, changing passwords etc too!