Exploit databaseDownload repository ZIP
GH-ea821316336f01071e5d83d15c2dd13b
opsxcq/exploit-cve-2017-7494
Sources for CVE-2017-7494
38 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files12
opsxcq/exploit-cve-2017-7494Revision 4d0bde4f1a7d
- ↑..Parent directory
- ABI/
- gen_ndr/
- idl/
- ndr/
- rpc/
- tools/
- ndr.pc.in
- ndr_krb5pac.pc.in
- ndr_nbt.pc.in
- ndr_standard.pc.in
- tables.pl
- wscript_build
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/librpc/tables.pl
Perl · 1,598 bytes#!/usr/bin/perl -w
###################################################
# package to produce a table of all idl parsers
# Copyright [email protected] 2003
# Copyright [email protected] 2005
# released under the GNU GPL
use strict;
use Getopt::Long;
use File::Basename;
my $opt_output = 'librpc/gen_ndr/tables.c';
my $opt_help = 0;
#########################################
# display help text
sub ShowHelp()
{
print "
perl NDR interface table generator
Copyright (C) tridge\@samba.org
Usage: tables.pl [options] <idlfile>
\n";
exit(0);
}
# main program
GetOptions (
'help|h|?' => \$opt_help,
'output=s' => \$opt_output,
);
if ($opt_help) {
ShowHelp();
exit(0);
}
my $init_fns = "";
###################################
# extract table entries from 1 file
sub process_file($)
{
my $filename = shift;
open(FILE, $filename) || die "unable to open $filename\n";
my $found = 0;
while (my $line = <FILE>) {
if ($line =~ /extern const struct ndr_interface_table (\w+);/) {
$found = 1;
$init_fns.="\tstatus = ndr_table_register(&$1);\n";
$init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
}
}
if ($found) {
print "#include \"$filename\"\n";
}
close(FILE);
}
print <<EOF;
/* Automatically generated by tables.pl. DO NOT EDIT */
#include "includes.h"
#include "librpc/ndr/libndr.h"
#include "librpc/ndr/ndr_table.h"
EOF
process_file($_) foreach (@ARGV);
print <<EOF;
NTSTATUS ndr_table_register_builtin_tables(void)
{
NTSTATUS status;
$init_fns
return NT_STATUS_OK;
}
EOF