β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦Programming Techniques-Self-made c language compiled cgi to achieve search C language to achieve self-compiled cgi search
π¦ ππΌππ πππΈβπ :
1) Environmental
/ usr / local / apache / htdocs / ( to be retrieved files Under this directory)
/ usr / local / apache / temp / (as a transit folder)
/ usr / local / apache / cgi-bin /
2) Place the a.out generated by gcc search.c in / usr / local / In apache / cgi-bin /, the permission is set to nobody
to execute.
3) chown -R nobody.nobody / usr / local / apache / temp
4) Add a file deletetemp permission in /etc/cron.daily to 555
rm -f / usr / local / apache / temp / *
5) In / Add a file myetc permission in etc / cron.hourly to 555
updatedb -U / usr / local / apache / htdocs
6) Delete the
appendix (a total of 2) of a file locate.cron in /etc/cron.daily :
a) index .htm source
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<p>...</p>
<form name="form1" action="http://129.158.217.223/cgi-bin/a.out">
<p> </p>
<p>
<input name="keyname" value="" type=text>
</p>
<p>
<input type="submit" value="...">
</p>
</form>
<p> </p>
</body>
</html>
2. search.com
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
int main(int argc, char* argv[])
{
int fd;
int status;
time_t i;
char cFileName[64];
char cTempName[64];
char cBuffer[1024];
char *p = cBuffer;
char cContent[10240];
char *data;
char keyword[1024];
data = getenv("QUERY_STRING");
if(data==NULL)
{
printf("Content-Type:text/html ");
printf("not found!");
exit(1);
}
sscanf(data, "keyname=%s&", keyword);
p += sprintf(p, "locate '%s' | sed -e 's#^/usr/local/apache/htdocs#http://129.158.217.223#' | sed -e 's#^.*$#<a href=&>&</a>
#' > ", keyword);
i = time(NULL);
sprintf(cTempName, "%d.html", i);
sprintf(cFileName, "/usr/local/apache/temp/%d.html", i);
strcat(cBuffer, cFileName);
cBuffer[1024-1]=0;
system(cBuffer);
fd = open(cFileName, O_RDWR);
status = read(fd, cContent, sizeof(cContent)-1);
close(fd);
printf("Content-Type:text/html ");
printf("<meta http-equiv=refresh content=0;url="http://129.158.217.223/temp/%s"> ", cTempName);
printf("Waiting....................... ");
printf("%s", keyword);
return 0;
}
Written by uNDERCoDE
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦Programming Techniques-Self-made c language compiled cgi to achieve search C language to achieve self-compiled cgi search
π¦ ππΌππ πππΈβπ :
1) Environmental
/ usr / local / apache / htdocs / ( to be retrieved files Under this directory)
/ usr / local / apache / temp / (as a transit folder)
/ usr / local / apache / cgi-bin /
2) Place the a.out generated by gcc search.c in / usr / local / In apache / cgi-bin /, the permission is set to nobody
to execute.
3) chown -R nobody.nobody / usr / local / apache / temp
4) Add a file deletetemp permission in /etc/cron.daily to 555
rm -f / usr / local / apache / temp / *
5) In / Add a file myetc permission in etc / cron.hourly to 555
updatedb -U / usr / local / apache / htdocs
6) Delete the
appendix (a total of 2) of a file locate.cron in /etc/cron.daily :
a) index .htm source
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<p>...</p>
<form name="form1" action="http://129.158.217.223/cgi-bin/a.out">
<p> </p>
<p>
<input name="keyname" value="" type=text>
</p>
<p>
<input type="submit" value="...">
</p>
</form>
<p> </p>
</body>
</html>
2. search.com
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
int main(int argc, char* argv[])
{
int fd;
int status;
time_t i;
char cFileName[64];
char cTempName[64];
char cBuffer[1024];
char *p = cBuffer;
char cContent[10240];
char *data;
char keyword[1024];
data = getenv("QUERY_STRING");
if(data==NULL)
{
printf("Content-Type:text/html ");
printf("not found!");
exit(1);
}
sscanf(data, "keyname=%s&", keyword);
p += sprintf(p, "locate '%s' | sed -e 's#^/usr/local/apache/htdocs#http://129.158.217.223#' | sed -e 's#^.*$#<a href=&>&</a>
#' > ", keyword);
i = time(NULL);
sprintf(cTempName, "%d.html", i);
sprintf(cFileName, "/usr/local/apache/temp/%d.html", i);
strcat(cBuffer, cFileName);
cBuffer[1024-1]=0;
system(cBuffer);
fd = open(cFileName, O_RDWR);
status = read(fd, cContent, sizeof(cContent)-1);
close(fd);
printf("Content-Type:text/html ");
printf("<meta http-equiv=refresh content=0;url="http://129.158.217.223/temp/%s"> ", cTempName);
printf("Waiting....................... ");
printf("%s", keyword);
return 0;
}
Written by uNDERCoDE
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦A fast, modern, zero-conf load balancing HTTP(S) router for deploying microservices:
π¦FEATURES :
>Access Logging - customizable access logs
>Access Control - route specific access control
>Certificate Stores - dynamic certificate stores like file system, HTTP server, Consul and Vault
>Compression - GZIP compression for HTTP responses
>Docker Support - Official Docker image, Registrator and Docker Compose example
>Dynamic Reloading - hot reloading of the routing table without downtime
>Graceful Shutdown - wait until requests have completed before shutting down
>HTTP Header Support - inject some HTTP headers into upstream requests
>HTTPS Upstreams - forward requests to HTTPS upstream servers
>Metrics Support - support for Graphite, StatsD/DataDog and Circonus
>PROXY Protocol Support - support for HA Proxy PROXY protocol for inbound requests (use for Amazon ELB)
>Path Stripping - strip prefix paths from incoming requests
>Server-Sent Events/SSE - support for Server-Sent Events/SSE
>TCP Proxy Support - raw TCP proxy support
>TCP-SNI Proxy Support - forward TLS connections based on hostname without re-encryption
>Traffic Shaping - forward N% of traffic upstream without knowing the number of instances
>Web UI - web ui to examine the current routing table
>Websocket Support - websocket support
πΈπ½π π π°π»π»πΈπ π°π πΈπΎπ½ & π π π½ :
Install from source, binary, Docker or Homebrew.
# go 1.9 or higher is required
1οΈβ£get github.com/fabiolb/fabio (>= go1.9)
2οΈβ£brew install fabio (OSX/macOS stable)
brew install --devel fabio (OSX/macOS devel)
3οΈβ£docker pull fabiolb/fabio (Docker)
https://github.com/fabiolb/fabio/releases (pre-built binaries)
4οΈβ£Register your service in consul.
5οΈβ£Make sure that each instance registers with a unique ServiceID and a service name without spaces.
6οΈβ£Register a health check in consul as described here.
7οΈβ£By default fabio only watches services which have a passing health check, unless overriden with registry.consul.service.status.
8οΈβ£Register one urlprefix- tag per host/path prefix it serves, e.g.:
#HTTP/S examples
urlprefix-/css # path route
urlprefix-i.com/static # host specific path route
urlprefix-mysite.com/ # host specific catch all route
urlprefix-/foo/bar strip=/foo # path stripping (forward '/bar' to upstream)
urlprefix-/foo/bar proto=https # HTTPS upstream
urlprefix-/foo/bar proto=https tlsskipverify=true # HTTPS upstream and self-signed cert
#TCP examples
urlprefix-:3306 proto=tcp # route external port 3306
Make sure the prefix for HTTP routes contains at least one slash (/).
9οΈβ£See the full list of options in the Documentation.
πStart fabio without a config file (assuming a running consul agent on localhost:8500) Watch the log output how fabio picks up the route to your service. Try starting/stopping your service to see how the routing table changes instantly.
> Send all your HTTP traffic to fabio on port 9999. For TCP proxying see TCP proxy.
Done
β git sources
@UndercodeTesting
@UndercodeSecurity
@UndercodeHacking
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦A fast, modern, zero-conf load balancing HTTP(S) router for deploying microservices:
π¦FEATURES :
>Access Logging - customizable access logs
>Access Control - route specific access control
>Certificate Stores - dynamic certificate stores like file system, HTTP server, Consul and Vault
>Compression - GZIP compression for HTTP responses
>Docker Support - Official Docker image, Registrator and Docker Compose example
>Dynamic Reloading - hot reloading of the routing table without downtime
>Graceful Shutdown - wait until requests have completed before shutting down
>HTTP Header Support - inject some HTTP headers into upstream requests
>HTTPS Upstreams - forward requests to HTTPS upstream servers
>Metrics Support - support for Graphite, StatsD/DataDog and Circonus
>PROXY Protocol Support - support for HA Proxy PROXY protocol for inbound requests (use for Amazon ELB)
>Path Stripping - strip prefix paths from incoming requests
>Server-Sent Events/SSE - support for Server-Sent Events/SSE
>TCP Proxy Support - raw TCP proxy support
>TCP-SNI Proxy Support - forward TLS connections based on hostname without re-encryption
>Traffic Shaping - forward N% of traffic upstream without knowing the number of instances
>Web UI - web ui to examine the current routing table
>Websocket Support - websocket support
πΈπ½π π π°π»π»πΈπ π°π πΈπΎπ½ & π π π½ :
Install from source, binary, Docker or Homebrew.
# go 1.9 or higher is required
1οΈβ£get github.com/fabiolb/fabio (>= go1.9)
2οΈβ£brew install fabio (OSX/macOS stable)
brew install --devel fabio (OSX/macOS devel)
3οΈβ£docker pull fabiolb/fabio (Docker)
https://github.com/fabiolb/fabio/releases (pre-built binaries)
4οΈβ£Register your service in consul.
5οΈβ£Make sure that each instance registers with a unique ServiceID and a service name without spaces.
6οΈβ£Register a health check in consul as described here.
7οΈβ£By default fabio only watches services which have a passing health check, unless overriden with registry.consul.service.status.
8οΈβ£Register one urlprefix- tag per host/path prefix it serves, e.g.:
#HTTP/S examples
urlprefix-/css # path route
urlprefix-i.com/static # host specific path route
urlprefix-mysite.com/ # host specific catch all route
urlprefix-/foo/bar strip=/foo # path stripping (forward '/bar' to upstream)
urlprefix-/foo/bar proto=https # HTTPS upstream
urlprefix-/foo/bar proto=https tlsskipverify=true # HTTPS upstream and self-signed cert
#TCP examples
urlprefix-:3306 proto=tcp # route external port 3306
Make sure the prefix for HTTP routes contains at least one slash (/).
9οΈβ£See the full list of options in the Documentation.
πStart fabio without a config file (assuming a running consul agent on localhost:8500) Watch the log output how fabio picks up the route to your service. Try starting/stopping your service to see how the routing table changes instantly.
> Send all your HTTP traffic to fabio on port 9999. For TCP proxying see TCP proxy.
Done
β git sources
@UndercodeTesting
@UndercodeSecurity
@UndercodeHacking
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
GitHub
GitHub - fabiolb/fabio: Consul Load-Balancing made simple
Consul Load-Balancing made simple. Contribute to fabiolb/fabio development by creating an account on GitHub.