403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.33
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/www/thttpd/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/www/thttpd/files/patch-extras_makeweb.c
--- extras/makeweb.c.orig	2005-06-29 17:53:25 UTC
+++ extras/makeweb.c
@@ -48,6 +48,11 @@
 
 static char* argv0;
 
+static void
+usage( void )
+{
+    fprintf( stderr, "usage: %s [-d webdir]\n", argv0 );
+}
 
 static void
 check_room( int size, int len )
@@ -126,17 +131,27 @@ main( int argc, char** argv )
     struct passwd* pwd;
     char* username;
     char* homedir;
+    int opts;
     char dirname[5000];
     char linkname[5000];
     char linkbuf[5000];
     struct stat sb;
 
     argv0 = argv[0];
-    if ( argc != 1 )
+
+#ifndef TILDE_MAP_2
+    webdir = WEBDIR;
+#endif /* TILDE_MAP_2 */
+
+    if ( (opts = getopt(argc, argv, "d:h")) != -1 )
+    {
+	switch (opts)
 	{
-	(void) fprintf( stderr, "usage:  %s\n", argv0 );
-	exit( 1 );
+	    case 'd': webdir = strdup(optarg); break;
+	    case 'h':
+	    default: usage(); return 1; break;
 	}
+    }
 
     pwd = getpwuid( getuid() );
     if ( pwd == (struct passwd*) 0 )
@@ -162,8 +177,6 @@ main( int argc, char** argv )
 
 #else /* TILDE_MAP_2 */
 
-    /* Gather the pieces. */
-    webdir = WEBDIR;
 #ifdef TILDE_MAP_1
     prefix = TILDE_MAP_1;
 #else /* TILDE_MAP_1 */

Youez - 2016 - github.com/yon3zu
LinuXploit