Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # Written by Brendan O'Connor, [email protected], www.anyall.org | |
| # * Originally written Aug. 2005 | |
| # * Posted to gist.github.com/16173 on Oct. 2008 | |
| # Copyright (c) 2003-2006 Open Source Applications Foundation | |
| # | |
| # 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 | |
| # |
| import string | |
| import random | |
| from z3 import * | |
| import socket | |
| def netcat(hostname, port, content): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect((hostname, port)) | |
| s.sendall(content) | |
| s.shutdown(socket.SHUT_WR) |
| 1. Execute make first. This will result in a netlinkKernel.ko output among many others. | |
| 2. Execute $ gcc netlinkUser.c -o netlinkUser | |
| 3. Insert kernel module by :$ sudo insmod netlinkKernel.ko | |
| 4. Run ./netlinkUser to see message and run dmesg to see debug messages | |
| 5. Remove module by : $ sudo rmmod netlinkKernel | |
| 6. Finally make clean to remove output files. |
| obj-m += tcp_svr_sample.o | |
| all: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
| clean: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea |
| #!/bin/bash -x | |
| #Yep that's lazy | |
| echo scp file `whoami`@`ip route get 8.8.8.8 | awk 'NR==1 {print $NF}'`:`pwd` |
| #define _GNU_SOURCE | |
| #include <link.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| static int | |
| callback(struct dl_phdr_info *info, size_t size, void *data) | |
| { | |
| int j; |
| #!/bin/bash | |
| #Redhat and friends: Test for /etc/redhat-release, check contents | |
| #Debian: Test for /etc/debian_version, check contents | |
| #Mandriva and friends: Test for /etc/version, check contents | |
| #Slackware: Test for /etc/slackware-version, check contents | |
| #https://serverfault.com/questions/3331/how-do-i-find-out-what-version-of-linux-is-running | |
| get_distribution_type() | |
| { | |
| local dtype |
| #!/usr/bin/env python | |
| #Taken from http://uaf.io/exploitation/misc/2016/04/02/Finding-Functions.html | |
| from pwn import * | |
| import sys, os | |
| wordSz = 4 | |
| hwordSz = 2 | |
| bits = 32 | |
| PIE = 0 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000