load without any analysis (file header at offset 0x0): r2 -n /path/to/file
- analyze all:
aa
- show sections:
iS
- list functions:
afl
- list imports:
ii
- list entrypoints:
ie
- seek to function:
s sym.main
{ | |
"annotations": { | |
"list": [ | |
{ | |
"$$hashKey": "object:690", | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", |
// Add to Cargo.toml | |
// [dependencies] | |
// winapi = "*" | |
// user32-sys = "*" | |
extern crate winapi; | |
extern crate user32; | |
fn from_wide_ptr(ptr: *const u16) -> String { | |
use std::ffi::OsString; | |
use std::os::windows::ffi::OsStringExt; |
package main | |
import ( | |
"compress/gzip" | |
"io" | |
"net/http" | |
"strings" | |
) | |
// Gzip Compression |
# Ubuntu upstart file at /etc/init/ejabberd.conf | |
respawn | |
respawn limit 20 5 | |
start on runlevel [2345] | |
stop on runlevel [06] | |
script | |
exec start-stop-daemon --start --name ejabberd --user ejabberd --chuid ejabberd --exec /usr/local/sbin/ejabberdctl -- start |
var MyApp = angular.module('MyApp'); | |
MyApp.factory('msgBus', ['$rootScope', function($rootScope) { | |
var msgBus = {}; | |
msgBus.emitMsg = function(msg, data) { | |
data = data || {}; | |
$rootScope.$emit(msg, data); | |
}; | |
msgBus.onMsg = function(msg, func, scope) { | |
var unbind = $rootScope.$on(msg, func); | |
if (scope) { |
ldap_server auth1 { | |
url "ldap://vmcentos64:389/ou=Users,ou=Accounts,dc=acme,dc=com?cn?sub?(objectClass=*)"; | |
binddn "cn=manager,dc=acme,dc=com"; | |
binddn_passwd password; | |
group_attribute cn; | |
group_attribute_is_dn on; | |
require valid_user; | |
} | |
# |
-- a quick LUA access script for nginx to check IP addresses against an | |
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403. | |
-- | |
-- allows for a common blacklist to be shared between a bunch of nginx | |
-- web servers using a remote redis instance. lookups are cached for a | |
-- configurable period of time. | |
-- | |
-- block an ip: | |
-- redis-cli SADD ip_blacklist 10.1.1.1 | |
-- remove an ip: |