Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
| ### 1: Drop invalid packets ### | |
| /sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP | |
| ### 2: Drop TCP packets that are new and are not SYN ### | |
| /sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP | |
| ### 3: Drop SYN packets with suspicious MSS value ### | |
| /sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP | |
| ### 4: Block packets with bogus TCP flags ### |
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:
Access-Control-Allow-Origin| /** | |
| * To get started install | |
| * express bodyparser jsonwebtoken express-jwt | |
| * via npm | |
| * command :- | |
| * npm install express body-parser jsonwebtoken express-jwt --save | |
| */ | |
| // Bringing all the dependencies in | |
| const express = require('express'); |
init.rc changes to run any script Can be used to start any android application, service
on property:dev.bootcomplete=1
exec - system system -- /system/bin/sh <custom script path>
# exec - system system -- /system/bin/sh /data/local/bootscript/testservice.sh
Script can contains applications start, stop commands
| class FullscreenOverlayService extends Service { | |
| private View overlay; | |
| private WindowManager windowManager; | |
| @Nullable | |
| @Override | |
| public IBinder onBind(Intent intent) { | |
| return null; | |
| } |
| const drawille = require('drawille') | |
| const bunny = require('bunny') | |
| const glmatrix = require('gl-matrix') | |
| const width = 200 | |
| const height = 200 | |
| const canvas = new drawille(width, height) | |
| const mat4 = glmatrix.mat4 | |
| const vec3 = glmatrix.vec3 | |
| let points = [] |
| { | |
| "key_events": { | |
| "key_unknown": "adb shell input keyevent 0", | |
| "key_soft_left": "adb shell input keyevent 1", | |
| "key_soft_right": "adb shell input keyevent 2", | |
| "key_home": "adb shell input keyevent 3", | |
| "key_back": "adb shell input keyevent 4", | |
| "key_call": "adb shell input keyevent 5", | |
| "key_endcall": "adb shell input keyevent 6", | |
| "key_0": "adb shell input keyevent 7", |