# HG changeset patch # User Pascal Bellard # Date 1418914757 -3600 # Node ID c9ac918ca7067a4c8697a425c560900d4144e033 # Parent 7cb58ceb1fb089f615cfe76b281252dd3d48247f Add icmpshell diff -r 7cb58ceb1fb0 -r c9ac918ca706 icmpshell/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icmpshell/receipt Thu Dec 18 15:59:17 2014 +0100 @@ -0,0 +1,27 @@ +# SliTaz package receipt. + +PACKAGE="icmpshell" +SOURCE="ish" +VERSION="0.2" +CATEGORY="network" +SHORT_DESC="A telnet-like protocol over icmp." +MAINTAINER="pascal.bellard@slitaz.org" +LICENSE="GPL2" +TARBALL="$SOURCE-v$VERSION.tar.gz" +WEB_SITE="http://icmpshell.sourceforge.net/" +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" + +# Rules to configure and make the package. +compile_rules() +{ + patch -p0 < $stuff/ishd.u + make -j 1 linux +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/sbin + cp $src/ish $fs/usr/sbin + cp $src/ishd $fs/usr/sbin +} diff -r 7cb58ceb1fb0 -r c9ac918ca706 icmpshell/stuff/ishd.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icmpshell/stuff/ishd.u Thu Dec 18 15:59:17 2014 +0100 @@ -0,0 +1,48 @@ +--- ishell.h ++++ ishell.h +@@ -39,6 +39,7 @@ + uint8_t type; /* icmp type to send packet as */ + uint16_t packetsize; /* packetsize of data */ + uint32_t seq; /* sequence number tracking */ ++ char *shell; + }; + + +--- ishd.c ++++ ishd.c +@@ -28,6 +28,7 @@ + " -i Set session id; range: 0-65535 (default: 1515)\n" + " -t Set ICMP type (default: 0)\n" + " -p Set packet size (default: 512)\n" ++ " -s Set shell (default: /bin/sh)\n" + "\nexample:\n" + "%s -i 65535 -t 0 -p 1024\n" + "\n", VERSION, program, program); +@@ -74,7 +75,7 @@ + int n, fd, maxfd; + char send_buf[ish_info.packetsize], recv_buf[ish_info.packetsize]; + +- fd = popen2("/bin/sh"); ++ fd = popen2(ish_info.shell); + sendhdr.cntrl = 0; + + while(1) { +@@ -122,7 +123,8 @@ + int opt, sockfd; + struct sockaddr_in sin; + +- while((opt = getopt(argc, argv, "hdi:t:p:")) != -1) { ++ ish_info.shell = "/bin/sh"; ++ while((opt = getopt(argc, argv, "hdi:t:p:s:")) != -1) { + switch(opt) { + case 'h': + usage(argv[0]); +@@ -138,6 +140,8 @@ + break; + case 'p': + ish_info.packetsize = atoi(optarg); ++ case 's': ++ ish_info.shell = optarg; + break; + } + }