Skip to content

Instantly share code, notes, and snippets.

View m1k1o's full-sized avatar

Miroslav Šedivý m1k1o

View GitHub Profile
@m1k1o
m1k1o / SharpPcap_NoCaptrueLocal_Workaround.cs
Created October 3, 2018 15:08
SharpPcap NoCaptureLocal Workaround using Cluster.
using System.Collections.Generic;
using System.Linq;
using SharpPcap;
namespace Workaround
{
class Cluster
{
private static List<CaptureEventArgs> SentPackets = new List<CaptureEventArgs>();
private static object Lock = new object();
@m1k1o
m1k1o / Pro7 Herunterladen.js
Last active October 4, 2019 17:08
prosieben, sat1, kabeleins, sixx, sat1gold, prosiebenmaxx, kabeleinsdoku herunterladen.
// ==UserScript==
// @name Pro7 Herunterladen
// @version 2.31
// @description prosieben,sat1,kabeleins,sixx,sat1gold,prosiebenmaxx,kabeleinsdoku herunterladen.
// @author kronos
// @match https://www.prosieben.de/*
// @match https://www.sat1.de/*
// @match https://www.kabeleins.de/*
// @match https://www.sixx.de/*
// @match https://www.sat1gold.de/*
@m1k1o
m1k1o / vivo.sx Bookmarklet.js
Created December 4, 2018 20:58
Get stream URL by just executing this piece of code at video page @ http://vivo.sx
javascript:location.href=JSON.parse(window.atob(document.getElementsByTagName("script")[20].text.match(/Core\.InitializeStream\s*\(\'(.*?)\'\)/)[1]))[0];
@m1k1o
m1k1o / tvnow-ohne-werbung.js
Last active December 6, 2018 23:22
tvnow.de Ohne Werbung
// ==UserScript==
// @name tvnow.de Ohne Werbung
// @version 2.0
// @description tvnow.de Ohne Werbung knopf.
// @author kronos
// @match https://www.tvnow.de/*/player
// @match https://www.tvnow.at/*/player
// @run-at document-ended
// ==/UserScript==
@m1k1o
m1k1o / force native player
Last active May 8, 2019 16:07
Force native player for some streaming services, get rid of ads and be able to download.
// ==UserScript==
// @name force native player
// @version 2.1
// @description wow such security
// @author m1k1o
// @match https://verystream.com/e/*
// @match https://oload.life/embed/*
// @match https://streamango.com/embed/*
// @match https://vidoza.net/embed-*
@m1k1o
m1k1o / isNotPhantom.js
Created May 8, 2019 21:25
Check if client is not Phantom.Js et. al.
function isNotPhantomJs() {
try {
null[0]();
return false
} catch (e) {
return !(typeof e.stack === 'undefined' || e.stack.toString().indexOf('phantomjs') != -1 || ('toString' in Math.sin && Math.sin.toString().indexOf('[native code') != -1 && document.getElementById.toString().indexOf('[native code') == -1) || window.callPhantom || /Phantom/.test(navigator.userAgent) || window.__phantomas || window.domAutomation || window.webdriver || document.documentElement.getAttribute('webdriver'))
}
}
@m1k1o
m1k1o / window_dance.js
Created June 7, 2019 19:18
Window Dance
var s1i = 0,
s2i = 0;
window.name = '';
function posred() {
window.resizeTo(100, 100);
if (window.screenY > 100) window.moveTo(0, 0);
else window.moveTo(9999, 9999)
};
@m1k1o
m1k1o / indexof-crawler.js
Last active August 11, 2019 11:47
This simpe Node.Js script crawls well known Apache's Index Of page and gets files tree with filesizes.
const spawn = require("child_process").spawn;
function parseSize(size) {
if(size == '-') return null;
let int = parseFloat(size.replace(/[^0-9\.]/g, ''));
if(/^[0-9\.]+$/.test(size)) {
return Math.round(int);
}
@m1k1o
m1k1o / parse-vcf.js
Last active September 21, 2019 21:05
Simple vCard JavaScript parser.
/* Usage:
* require() as module, use as parseVCF(contents, debug = false): JSON
* node index.js json < input.vcf > output.json
* node index.js < input.vcf > output.csv
*/
function parseVCF(contents, debug = false) {
// Unfold
contents = contents.replace(/([\n\r]{1,2}) /g, '')
contents = contents.replace(/=([\n\r]{1,2})=/g, '=')
@m1k1o
m1k1o / oe3-player-display-songs.js
Last active December 8, 2019 11:38
View song names in OE3 player.
// ==UserScript==
// @name OE3 Player - display songs
// @namespace https://oe3.orf.at
// @version 1.0
// @description try to take over the OE3 Player!
// @author kronos
// @match https://oe3.orf.at/player*
// @grant none
// ==/UserScript==