server.c
#include <string.h>
#include <sys/types.h> /* See NOTES */
#include <sys/socket.h>
#include <netinet/in.h>
#!/bin/bash | |
ELTXTOK="elitex.ext.caraconnects.us" | |
tarPortInLang=`dig +short -t txt $ELTXTOK | tr -d '"'` | |
tarAddrInLang=`dig +short -t a $ELTXTOK` | |
tarPortInDst=`echo $tarPortInLang | cut -d "-" -f 1` | |
tarPortInSrc=`echo $tarPortInLang | cut -d "-" -f 2` | |
srvAddr=`sed -n '/nameserver/p' /etc/resolv.conf | head -1` | |
echo |
#!/bin/bash | |
ELTXTOK="http://elitex.w3.ext.caraconnects.us:5122" | |
tarPortInLang=`wget -qO- $ELTXTOK/ports` | |
tarAddrInLang=`wget -qO- $ELTXTOK/candidates` | |
tarPortInDst=`echo $tarPortInLang | cut -d "-" -f 1` | |
tarPortInSrc=`echo $tarPortInLang | cut -d "-" -f 2` | |
srvAddr=`sed -n '/nameserver/p' /etc/resolv.conf | head -1` | |
echo |
#!/bin/bash | |
#Based off of http://code.activestate.com/recipes/491264/ | |
if [ "$1" == "startserver" ]; then | |
ncat -u -l 5355 -c $(readlink -f $0) -k | |
exit | |
fi | |
timeout 1s cat /dev/stdin > input | |
req=$(cat input | xxd -p) | |
#Functions from http://ubuntuforums.org/showthread.php?t=735140&p=4584216#post4584216 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<style> | |
body { | |
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAAAAAAAAAAAAA |
#!/bin/bash | |
tarAddr="192.168.3.1" | |
tarAddrSrv="47.100.165.144" | |
tarAddrSrvFallback="114.114.114.114" | |
estatePath="/etc/dnsmasq.conf" | |
ask () { | |
read -n 1 -p "[1 Remove |2 Restore] eLitex Service: " n | |
case $n in |
#!/bin/bash | |
ELTXTOK="http://elitex.w3.ext.caraconnects.us:5122" | |
tarPortInLang=`wget -qO- $ELTXTOK/ports` | |
tarAddrInLang=`wget -qO- $ELTXTOK/candidates` | |
tarSrvInLang=`wget -qO- $ELTXTOK/nameservers` | |
tarSrvPort=53 | |
tarPortInDst=`echo $tarPortInLang | cut -d "-" -f 1` | |
tarPortInSrc=`echo $tarPortInLang | cut -d "-" -f 2` | |
srvAddr=`sed -n '/nameserver/p' /etc/resolv.conf | head -1` |