- We're debugging a dylib,
libhello.dylib
- The dylib is linked from
hello
- The exported function is
helloworld()
- We do not have source, but have reversed a struct from the library and created a hand-crafted header file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
start=1048576 # decimal offset of data on drive (past MBR, 1MB) | |
end=10485760 # decimal offset of data on drive (well past weird '...U...N.b..' structures, 10MB) | |
image=/mnt/seagate/wd_backup.img | |
mount=/mnt/wd | |
for ((offset=$start; offset<=$end; offset++)); do | |
echo "trying offset: $offset" | |
status="$(mount -o ro,offset=$offset,loop -t ntfs $image $mount >/dev/null 2>&1; echo $?)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/joshenders/52cb78bedaea6787faac | |
# This script uses the BSD variants of commands and is intended to | |
# be run on an unmodified installation of OSX. | |
pmset noidle & | |
now=$(date +%s) | |
duration=$((86400*3)) # 3days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function certchain() { | |
# Usage: certchain | |
# Display PKI chain-of-trust for a given domain | |
# GistID: https://gist.github.com/joshenders/cda916797665de69ebcd | |
if [[ "$#" -ne 1 ]]; then | |
echo "Usage: ${FUNCNAME} <ip|domain[:port]>" | |
return 1 | |
fi | |
local host_port="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is sourced by /etc/init.d/sabnzbdplus | |
# | |
# When SABnzbd+ is started using the init script, the | |
# --daemon option is always used, and the program is | |
# started under the account of $USER, as set below. | |
# | |
# Each setting is marked either "required" or "optional"; | |
# leaving any required setting unconfigured will cause | |
# the service to not start. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow read-only ZoL commands to be called through sudo without a password. | |
# Cmnd alias specification | |
Cmnd_Alias RO_ZFS = \ | |
/sbin/zfs "", /sbin/zfs help *, \ | |
/sbin/zfs get, /sbin/zfs get *, \ | |
/sbin/zfs list, /sbin/zfs list *, \ | |
/sbin/zpool "", /sbin/zpool help *, \ | |
/sbin/zpool iostat, /sbin/zpool iostat *, \ | |
/sbin/zpool list, /sbin/zpool list *, \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- libhttpd.c 2014-12-10 12:53:07.000000000 -0800 | |
+++ libhttpd.c.patched 2015-02-07 22:44:59.183663432 -0800 | |
@@ -2231,6 +2231,12 @@ | |
if ( strcasecmp( cp, "keep-alive" ) == 0 ) | |
hc->keep_alive = 1; | |
} | |
+ else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 ) | |
+ { // Use real IP if available | |
+ cp = &buf[16]; | |
+ cp += strspn( cp, " \t" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- debian/varnish.init 2016-12-13 01:13:34.465123880 +0000 | |
+++ debian/varnish.init.new 2016-12-13 01:18:50.215749771 +0000 | |
@@ -88,8 +88,10 @@ | |
log_daemon_msg "Reloading $DESC" "$NAME" | |
if /usr/share/varnish/reload-vcl -q; then | |
log_end_msg 0 | |
+ return 0 | |
else | |
log_end_msg 1 | |
+ return 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- reload-vcl 2011-10-29 13:24:10.000000000 +0000 | |
+++ /usr/share/varnish/reload-vcl 2016-12-11 09:51:08.696300339 +0000 | |
@@ -1,9 +1,13 @@ | |
#!/bin/sh | |
- | |
+# | |
# reload-varnish: Script to reload varnishd from VCL defined in | |
# /etc/default/varnish. | |
# | |
# Stig Sandbeck Mathisen <ssm@debian.org> |