Assignment | |
---|---|
Assign value to variable if variable is not already set, value is returned.Combine with a : no-op to discard/ignore return value . |
${variable="value"} : ${variable="value"} |
### Full command line options | |
``` | |
ffmpeg -f gif -i FOO.gif -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' BAR.mp4 | |
``` | |
### Notie | |
* output mp4 is encoded with h264, support Firefox/Chrome/Safari in Windows, Mac OSX, Android, and iOS. |
#### | |
#### pyenv-virtualenv bash prompt customization | |
#### | |
# pyenv | |
eval "$(pyenv init -)" | |
# pyenv-virtualenv: |
#!/usr/bin/env python2.7 | |
""" | |
PyPacketMail for x/84, http://github.com/jquast/x84 | |
(c) 2015 Michael Griffin <mrmisticismo@hotmail.com> | |
http://github.com/m-griffin/PyMailPacket | |
This is a FidoNet Echomail Scanner / Tosser for x84 bbs. | |
This will mimic the basic functionality of Crashmail for | |
Reading and Writing mail packets. |
import httplib, urllib | |
# Config | |
# You will need to sign up for a pushover.net account - and download | |
# their paid ios or android apps or their various 3rd party plugins. | |
# https://pushover.net/apps | |
appToken = "APPTOKEN HERE" | |
userKey = "USERKEY HERE" |
import asyncio | |
import pexpect | |
from pexpect.async import expect_async | |
p = pexpect.spawn('python') | |
p.setecho(False) | |
p.waitnoecho() | |
b = pexpect.spawn('bash') | |
b.setecho(False) |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Let's say somebody temporarily got root access to your system, whether because you "temporarily" gave them sudo rights, they guessed your password, or any other way. Even if you can disable their original method of accessing root, there's an infinite number of dirty tricks they can use to easily get it back in the future.
While the obvious tricks are easy to spot, like adding an entry to /root/.ssh/authorized_keys, or creating a new user, potentially via running malware, or via a cron job. I recently came across a rather subtle one that doesn't require changing any code, but instead exploits a standard feature of Linux user permissions system called setuid to subtly allow them to execute a root shell from any user account from the system (including www-data
, which you might not even know if compromised).
If the "setuid bit" (or flag, or permission mode) is set for executable, the operating system will run not as the cur
import requests | |
class HoverException(Exception): | |
pass | |
class HoverAPI(object): | |
def __init__(self, username, password): | |
params = {"username": username, "password": password} | |
r = requests.post("https://www.hover.com/api/login", params=params) |