Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
@eyecatchup
eyecatchup / find-phpshells.sh
Created July 16, 2015 09:55
To use this shell script just paste this into a file called checker.sh in the directory before your public_html folder, then run it with the following command: sh checker.sh
#!/bin/env bash
cd public_html/
find . -type f \( -iname "1.*" -o -iname "sh.php" \) -print0 >> ../php_backdoors
find . -type f \( -iname "*.php" -o -iname "*.inc" \) -print0 | xargs -0 -r grep -REn \
'(c99|r57|exif_read_data|extract|passthru|shell_exec|base64_decode|fopen|fclose|eval|Refresh|refresh|justrulz)' >> ../php_backdoors
@eyecatchup
eyecatchup / udphosts.log
Last active August 29, 2015 14:24
UDP requests on port 123 (NTP) captured on my stock Nexus 5..
Date IP:Port URL Location ASN
07-09 06:49 109.239.48.152:123 freiwuppertal.de Germany AS34011 domainfactory GmbH
07-09 06:46 176.9.92.196:123 log1.nierle.com Germany AS24940 Hetzner Online AG
07-09 06:45 78.47.93.200:123 maggo.info Germany AS24940 Hetzner Online AG
07-09 06:44 85.25.105.105:123 static-ip-85-25-105-105.inaddr.ip-pool.com Germany AS8972 intergenia AG
07-09 06:09 5.83.190.253:123 arcticfox.doridian.net Germany AS31400 Accelerated IT Services GmbH
07-09 01:11 146.76.14.132:123 static.132.14.76.144.clients.your-server.de Germany AS24940 Hetzner Online AG
07-09 00:12 78.46.53.8:123 gromit.nocabal.de Germany AS24940 Hetzner Online AG
07-08 22:58 178.63.14.131:123 frankfurt1.firstlinkn
@eyecatchup
eyecatchup / spabs.md
Last active August 29, 2015 14:24 — forked from eevee/spabs.md

Death to tabs, long live spaces

Do this

  1. Fix any inconsistent indentation in your existing files, or Python code will break, since it considers a tab to be 8 and we're about to make it 4.

  2. Populate .gitattributes in your repository, as below.

     *.py filter=spabs
    
@eyecatchup
eyecatchup / hammerhead-from-LMY47D-or-LMY47I-to-LMY48B.md
Created June 29, 2015 07:10
A step-by-step guide how to manually flash the Android 5.1.1 (LMY48B) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..
  UPDATE `NEXUS 5` 
     SET `VERSION`='5.1.1', `BUILD`='LMY48B', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.1.0' && `BUILD` IN ('LMY47D', 'LMY47I') && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;

A manual OTA for rooted hammerheads, quasi.

@eyecatchup
eyecatchup / progress.sh
Created June 10, 2015 20:26
Bash-style progress bar (/w elapsed time) to show while long-running sub-processes being called.
#!/bin/bash
# Bash-style progress bar (/w elapsed time) to show while long-running sub-processes being called.
# Copyright: 2015, Stephan Schmitz <eyecatchup@gmail.com>
# License: MIT
# 1. Paste the `progress` function in your bash script.
function progress () {
s=0.5;
f=0.25;
echo -ne "\r\n";
(function($Object, $Function, privates, cls, superclass) {'use strict';
function Event() {
var privateObj = $Object.create(cls.prototype);
$Function.apply(cls, privateObj, arguments);
privateObj.wrapper = this;
privates(this).impl = privateObj;
};
if (superclass) {
Event.prototype = Object.create(superclass.prototype);
}
@eyecatchup
eyecatchup / Protils.html
Last active August 29, 2015 14:21
test
<!doctype html>
<html i18n-values="dir:textdirection">
<head>
<meta charset="utf-8">
<title i18n-content="page-title"></title>
</head>
<body>
<input type="hidden" name="test" id="test" value="12345"/>
<script type="text/javascript">
// ----------------------------------------------------------------------------
@eyecatchup
eyecatchup / pdf2docx.py
Last active May 14, 2021 20:39
Convert PDF files to Microsoft Office Word compatible doc/docx files, using LibreOffice's command line interface.
#!C:/Python27/python.exe
#
# Convert PDF files to Microsoft Office Word compatible doc/docx files,
# using LibreOffice's command line interface.
#
# http://stackoverflow.com/questions/26358281/convert-pdf-to-doc-python-bash
# http://ask.libreoffice.org/en/question/20111/converting-files-using-soffice-convert-to-with-embedded-images-html-to-doc/
# http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/config/fragments/filters
#
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active March 26, 2022 10:03
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@eyecatchup
eyecatchup / 0.txt
Last active November 16, 2015 19:47 — forked from girliemac/0.txt
This is a gist for my blog/tutorial, "Creating a Chat App with Material Design using Polymer"