things
39 subscribers
28 photos
13 videos
10 files
7 links
random 4 u
Download Telegram
๐Ÿ˜ข1
now they know about the Thing
idea for creating a circular buffer for desktop recordings using ffmpeg is feasible! This concept is similar to how DVRs or security cameras with a "looping" or circular buffer function operate.


ffmpeg -f x11grab -r 25 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -c:v hevc_nvenc -qp:v 20 -af hwac3  -b:a 96k -f segment -segment_time 600 -segment_wrap 2  -segment_format_options movflags=+faststart -reset_timestamps 1 /tmp/desktop_recording%03d.mp4

continuously
record the desktop in 2 files:



/tmp/desktop_recording000.mp4 & /tmp/desktop_recording001.mp4



at 600-second intervals, so you can always look at dementia

using nvidia hevc codec


โ€”โ€” upd

with HLS stream even bettter

ffmpeg -f x11grab -r 25 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -c:v hevc_nvenc -qp:v 20 -af hwac3 -b:a 96k -f hls -hls_time 5 -hls_list_size 0 -hls_flags delete_segments -hls_playlist_type event /tmp/output.m3u8

___upd3

gpu-screen-recorder-gtk - doing all this but better
๐Ÿ”ฅ1
static black screen for 10hours and 1 second:



ffmpeg -f lavfi -i color=c=black:s=1920x1080:r=1 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=8000 -t 10:00:01 -c:v libx264 -c:a aac -b:v 1k -b:a 1k -crf 63 -movflags +faststart -pix_fmt yuv420p -y output4.mp4

(around 6mb)
huge hack
Extract an image from a raw disk and transfer it to an erofsimage format

guestfish --ro -i tar-out -a debian-10.img / - | mkfs.erofs --all-root --gzip --tar=- debian2.erofs


(you were unable to find anything similar on the internet)
shitty regexp, get second interface name in your system:
(not well tested)

```
ip -c=never -o link show | grep -oP '(?<=^2:\s)\w+'
```

----
-c=never
is proper arg and should be there
The unproper way to get 10./8 IPs:
printf "%d.%d.%d.%d\n" "$((10 % 255))" "$((RANDOM % 255))" "$((RANDOM % 255))" "$((RANDOM % 255))"
try entering this text into the search bar of any web browser::



data:text/html, <html contenteditable>




y will get editable notepad
Using windows powershell cut first 512 bytes of files in C:\123\123\ folder.

$PATH = "C:\123\123\"
$BYTES_TO_TRIM = 512

$files = dir $PATH | where { !$_.PsIsContainer }

foreach ($file in $files) {
Write-Output "File being truncated: $($file.FullName)"
Write-Output " Original Size: $($file.Length) bytes"
Write-Output " Truncating $BYTES_TO_TRIM bytes..."
$byteEncodedContent = [System.IO.File]::ReadAllBytes($file.FullName)
$truncatedByteEncodedContent = $byteEncodedContent[$BYTES_TO_TRIM..($byteEncodedContent.Length - 1)]
Set-Content -value $truncatedByteEncodedContent -encoding byte -path "$($file.FullName)"

Write-Output " Size after truncation: $((Get-Item $file.FullName).Length) bytes"
Write-Output "Truncation done!`n"
}
๐Ÿ”ฅ1

Acting as a WHIP forwarder
This example requires port 5000 UDP to be open for inbound traffic

$ donut ./donut -whip-uri https://galene.pi.pe/group/whip/ -srt-uri "srt://0.0.0.0:5000?streamid=test" \
-whip-token ${bearertoken}
You can then send multiple SRT streams to be forwarded as WHIP examples: Camera from a mac:

ffmpeg -f avfoundation -framerate 30 -i "0" \
-pix_fmt yuv420p -c:v libx264 -b:v 1000k -g 30 -keyint_min 120 -profile:v baseline \
-preset veryfast -f mpegts "srt://${bridgeIP}:5000?streamid=me"
Or from a raspi

ffmpeg -f video4linux2 -input_format h264 -video_size 1280x720 -framerate 30 \
-i /dev/video0 -vcodec copy -an -f mpegts "srt://${bridgeIP}:5000?streamid=picam"
Idea for dedicated stream/grabber:

https://github.com/giongto35/cloud-morph/wiki/Deep-Dive-Into-Codebase

[program:Xvfb] command=/usr/bin/Xvfb :99: Create Virtual Video Buffer at port :99
[program:pulseaudio] command=pulseaudio: Create Virtual Audio (pulse). Don't need to bind to any port, app still can output audio to it.
[program:syncinput] command=wine syncinput.exe : Script to listen from Web Message to simulate Windows OS Event
[program:wineapp] command=wine %(ENV_appfile)s environment=DISPLAY=:99 : Run Wine app and attach virtual DISPLAY :99 to it
[program:ffmpeg] command=ffmpeg -f x11grab -i :99 -c:v libvpx -f rtp rtp://%(ENV_dockerhost)s:5004 : Video encoding read from Virtual display and export Video RTP stream at port 5004
[program:ffmpegaudio] command=ffmpeg -f pulse -rtp rtp://%(ENV_dockerhost)s:4004 : Audio encoding read from Virtual Audio and export Audio RTP stream at port 4004
>Kindly reconsider your security:

ssh whoami.filippo.io


โ€”โ€”

(ssh anonce your pub-keys to server by default, to work on unsecure envs try ssh with dev null):

ssh whoami.filippo.io -i /dev/null
SANS Digital Forensic Poster.pdf
1.4 MB
Digital forensics poster:
you can freely parse FFox .sqlite bookmarks from linux terminal:

sqlite3 ./173iv6vo.default-release/places.sqlite .dump |grep youtube.com



where
173iv6vo.default-release

your FFox profile on the system

you can use
find . -name *.sqlite
to figureout all FFox sqlites
a very nice way to filter HTML or /and output to console:
links -codepage utf-8 -force-html -width 400 -dump /dev/stdin


or
links -codepage utf-8 -force-html -width 400 -dump /path/to/html/file.html
a fast way to get serial (and others things from udev):

udevadm info --query=all -n /dev/sda
FFmpeg near precision way to cut video (pt1):

ffmpeg -i planes.mkv -ss 00:00:05.000 -t 00:00:05.500 plane0505_recode.mkv


check timing by:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 plane0505_recode.mkv
FFmpeg stress test:
(it will load all cpus)

ffmpeg -y -f rawvideo -video_size 1920x1080 -pixel_format yuv420p -framerate 60 -i /dev/urandom -c:v libx265 -preset placebo -f matroska /dev/null
Random noise from /dev/urandom:

ffmpeg -f rawvideo -pixel_format rgb24 -video_size 1920x1080 -framerate 120 -i /dev/urandom -c:v libx264 -preset ultrafast -pix_fmt yuv420p output.mp4


Keep eye on filesize.
Remnants of a bygone era