⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssh_dump.pl

📁 GForge 3.0 协作开发平台 支持CVS, mailing lists, bug tracking, message boards/forums, task management, perman
💻 PL
字号:
#!/usr/bin/perl## $Id: ssh_dump_2_5.pl,v 1.1 2001/11/02 11:43:06 cbayle Exp $## ssh_dump.pl - Script to suck data outta the database to be processed by ssh_create.pl#use DBI;require("/usr/lib/gforge/lib/include.pl");  # Include all the predefined functionsmy $ssh_array = ();&db_connect;# Dump the Table information$query = "SELECT user_name,unix_uid,authorized_keys FROM users WHERE authorized_keys != '' AND status !='D'";$c = $dbh->prepare($query);$c->execute();while(my ($username, $unix_uid, $ssh_key) = $c->fetchrow()) {	$new_list = "$username:$unix_uid:$ssh_key\n";	push @ssh_array, $new_list;}# Now write out the fileswrite_array_file($file_dir."dumps/ssh_dump", @ssh_array);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -