Skip to content

Instantly share code, notes, and snippets.

View WINOFFRG's full-sized avatar

Rohan Gupta WINOFFRG

View GitHub Profile
@dzeitman
dzeitman / client.js
Created August 30, 2021 01:24
Dolby.io Getting Started with Electron
const avengersNames = ['Thor', 'Cap', 'Tony Stark', 'Black Panther', 'Black Widow', 'Hulk', 'Spider-Man'];
let randomName = avengersNames[Math.floor(Math.random() * avengersNames.length)]
var config = function (){
return JSON.parse(decodeURIComponent(document.location.search.split('=')[1]))
}()
@pich4ya
pich4ya / root_bypass.js
Created August 5, 2019 20:14
Bypass Android Root Detection / Bypass RootBeer - August 2019
// $ frida -l antiroot.js -U -f com.example.app --no-pause
// CHANGELOG by Pichaya Morimoto (p.morimoto@sth.sh):
// - I added extra whitelisted items to deal with the latest versions
// of RootBeer/Cordova iRoot as of August 6, 2019
// - The original one just fucked up (kill itself) if Magisk is installed lol
// Credit & Originally written by: https://codeshare.frida.re/@dzonerzy/fridantiroot/
// If this isn't working in the future, check console logs, rootbeer src, or libtool-checker.so
Java.perform(function() {
var RootPackages = ["com.noshufou.android.su", "com.noshufou.android.su.elite", "eu.chainfire.supersu",
@yjlcoder
yjlcoder / start-live-stream-ffmpeg.sh
Created April 11, 2019 21:33
FFmpeg DASH live video streaming (MPD file + M4S files)
# Change <INPUT FILE> to the input video file
# 3 video qualities: <1> 1920x1080, 4800kbps. <2> 1280x720, 2400kbps. <3> 640x360, 800kbps.
# 2 audio qualities: <1> origin audio. <2> audio sample rate: 22050 [low quality]
ffmpeg -re -stream_loop 1 -i <INPUT FILE> -map 0 -map 0 -map 0:v -acodec libfdk_aac -vcodec libx264 -preset veryfast \
-b:v:0 4800k -s:v:0 1920x1080 -profile:v:0 high \
-b:v:1 2400k -s:v:1 1280x720 -profile:v:1 main \
-b:v:2 800k -s:v:2 640x360 -profile:v:2 baseline \
-bf 1 -keyint_min 120 -g 60 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 \
-use_timeline 1 -use_template 1 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \
@daniellimws
daniellimws / frida-tips.md
Last active April 5, 2024 21:56
Frida tips

Frida Tips

The documentation is so limited. A compilation of things I found on StackOverflow and don't want to have to search it up again.

Bypass root check

setTimeout(function() { // avoid java.lang.ClassNotFoundException

  Java.perform(function() {

    // Root detection bypass example
@askilondz
askilondz / gistlog.yml
Last active April 2, 2024 10:44
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

These are notes while researching a way to convert a browser/website to a stream. This could be used for Facebook Live or for webrecording. TL'DR:

  • I started with Phantomjs - but that didn't support the html5 video tag
  • SlimerJS supports it, but there is no way to record audio directly (though this might come from desktop audio)
  • So I moved to research ffmpeg/X11/XVFB to record it with linux which works
  • But ffmpeg has no easy way to mix streams/overlays to I moved on to OBS with overlay browser support
  • I started researching options OBS in docker and it needed best a GPU , so I move to nvidia-docker
  • And so came across building game servers on EC2/AWS using GPUs and managed to run OBS inside of GPU g2x.large machine
  • I tried streaming to twich , which works great and managed to restream 4K 60FPS youtube on an AWS instance
  • Remote control works through OBS-Remote but OBS has kinda limit in types of features