/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/
/* * htdbm.c: simple program for manipulating DBM * password databases for the Apache HTTP server * * Contributed by Mladen Turk <mturk mappingsoft.com> * 12 Oct 2001
*/
staticvoid htdbm_usage(void)
{
fprintf(stderr, "htdbm -- program for manipulating DBM password databases.\n\n" "Usage: htdbm [-cimBdpstvx] [-C cost] [-TDBTYPE] database username\n" " -b[cmBdptsv] [-C cost] [-TDBTYPE] database username password\n" " -n[imBdpst] [-C cost] username\n" " -nb[mBdpst] [-C cost] username password\n" " -v[imBdps] [-C cost] [-TDBTYPE] database username\n" " -vb[mBdps] [-C cost] [-TDBTYPE] database username password\n" " -x [-TDBTYPE] database username\n" " -l [-TDBTYPE] database\n" "Options:\n" " -c Create a new database.\n" " -n Don't update database; display results on stdout.\n" " -b Use the password from the command line rather than prompting for it.\n" " -i Read password from stdin without verification (for script usage).\n" " -m Force MD5 hashing of the password (default).\n" " -B Force BCRYPT hashing of the password (very secure).\n" " -C Set the computing time used for the bcrypt algorithm\n" " (higher is more secure but slower, default: %d, valid: 4 to 31).\n" " -d Force CRYPT hashing of the password (8 chars max, insecure).\n" " -s Force SHA hashing of the password (insecure).\n" " -p Do not hash the password (plaintext, insecure).\n" " -T DBM Type (SDBM|GDBM|DB|default).\n" " -l Display usernames from database on stdout.\n" " -v Verify the username/password.\n" " -x Remove the username record from database.\n" " -t The last param is username comment.\n" "The SHA algorithm does not use a salt and is less secure than the " "MD5 algorithm.\n",
BCRYPT_DEFAULT_COST); exit(ERR_SYNTAX);
}
int main(int argc, constchar * const argv[])
{
apr_pool_t *pool;
apr_status_t rv; char errbuf[MAX_STRING_LEN]; int need_file = 1; int need_user = 1; int need_pwd = 1; int need_cmnt = 0; int changed = 0; int cmd = HTDBM_MAKE; int i, ret, args_left = 2;
apr_getopt_t *state; char opt; constchar *opt_arg;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.