As a side note, when I was the lead guy during the once famous "Langley Cyber Attack", where my work in an epic "email reply spam battle" happened over two decades ago, long before spam filters became of age, we wrote all our email anti-spam filters and detection algorithms in PERL.
Edit: For anyone interested in the early days of "cyberwar" in the 1998/1997 timeframe:
That PERL code "way back when" was "very crude" by todays standards, but it was very effective and fast. PERL was the best tool for that job "way back when". I was a huge PERL advocate back then, and would write all scripts in PERL, even when PERL was not needed. I loved PERL so much back then that I tried to get everyone to learn it and use it.
Sometimes old guys like me forget that the younger generations may not have had the chance to develop code in PERL and other "out of favor" programming languages these days. But when I read this discussion it brings back wonderful memories of some of the best "tech days" of my life, defending the US Air Force against hackers with PERL scripts in real-time.
wisecracker, I say "go for it" if you or anyone reading this has the time or interest to learn PERL. I would love to see a lot of people posting PERL problems here. Perhaps that would jog even more great memories from decades ago from the deep trenches of cyber warfare battles when the web was but an infant.
Can anyone tell me if the copy command in PERL has the same functionality as in KSH shell in UNIX or does it actually move the file ??
$cp_stat=system("cp $ENV{OLAMEBSDIR}/data/olam.ddabal$type $ENV{OLAMDIR}/balance/data/olam.ddabal$type.$HeaderDate"); (1 Reply)
Could someone tell me what is wrong with these PERL statements
it is always setting the $status2 to the number inside of the brackets......why????????
if (/^Status:/)
{
$stat = $Fld;
print "\$stat is $stat\n";
}
the above is where i'm searching for a string... (1 Reply)
When i run my perl/tk script, a perl window pops up behind the GUI window,, can this be hidden????
Also, can the Icon be changed, the Tk icon in every window??? (1 Reply)
If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time?
i.e.
system("ps | grep rminer");
system("ls -al | grep 431"); (1 Reply)
Hi everyone
I am not even a novice at Perl scripting .. but had to edit one the other day. The only way I can get it to run is by prefixing 'perl' before running it - ie # perl scriptname
I am running AIX.
Any ideas why i have to do that ?
Thanks! (2 Replies)
Playing with an until loop as follows:
my $input;
until ($input eq "quit") {
print "Please enter something:";
$input = <STDIN>;
chomp $input;
if ($input eq "dog") {
print "cat" ;
}
else {
print "Please re-enter";
}
}
Something simple like this...
I want to prompt the user to... (3 Replies)
Hi All,
I am new to perl and just want to read the text file and write back it into another file with some modification.
Here is my requirement:
input file:
USB_OTG_PATH top.usb_top.otg_top
USB_HSIC_PATH top.usb_top.hsic_top
.. (All starts with USB_)
...
START_PATH USB_OTG_PATH.interrupt... (2 Replies)
Hi All,
I am new to Perl and got a real stupid question. We are trying to install the Date:Calc package for some calculations with dates.The security guys mentioned they won't install it as root in /usr/bin/perl but have asked us to install it in any directory and use it from there.
Here's the... (2 Replies)
I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open())
I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
LEARN ABOUT OSX
slapd-perl
SLAPD-PERL(5) File Formats Manual SLAPD-PERL(5)NAME
slapd-perl - Perl backend to slapd
SYNOPSIS
/etc/openldap/slapd.conf
DESCRIPTION
The Perl backend to slapd(8) works by embedding a perl(1) interpreter into slapd(8). Any perl database section of the configuration file
slapd.conf(5) must then specify what Perl module to use. Slapd then creates a new Perl object that handles all the requests for that par-
ticular instance of the backend.
You will need to create a method for each one of the following actions:
* new # creates a new object,
* search # performs the ldap search,
* compare # does a compare,
* modify # modifies an entry,
* add # adds an entry to backend,
* modrdn # modifies an entry's rdn,
* delete # deletes an ldap entry,
* config # process unknown config file lines,
* init # called after backend is initialized.
Unless otherwise specified, the methods return the result code which will be returned to the client. Unimplemented actions can just return
unwillingToPerform (53).
new This method is called when the configuration file encounters a perlmod line. The module in that line is then effectively `use'd
into the perl interpreter, then the new method is called to create a new object. Note that multiple instances of that object may be
instantiated, as with any perl object. The new method receives the class name as argument.
search This method is called when a search request comes from a client. It arguments are as follows:
* object reference
* base DN
* scope
* alias dereferencing policy
* size limit
* time limit
* filter string
* attributes only flag (1 for yes)
* list of attributes to return (may be empty)
Return value: (resultcode, ldif-entry, ldif-entry, ...)
compare
This method is called when a compare request comes from a client. Its arguments are as follows.
* object reference
* dn
* attribute assertion string
modify This method is called when a modify request comes from a client. Its arguments are as follows.
* object reference
* dn
* a list formatted as follows
({ "ADD" | "DELETE" | "REPLACE" },
attributetype, value...)...
add This method is called when a add request comes from a client. Its arguments are as follows.
* object reference
* entry in string format
modrdn This method is called when a modrdn request comes from a client. Its arguments are as follows.
* object reference
* dn
* new rdn
* delete old dn flag (1 means yes)
delete This method is called when a delete request comes from a client. Its arguments are as follows.
* object reference
* dn
config This method is called with unknown slapd.conf(5) configuration file lines. Its arguments are as follows.
* object reference
* array of arguments on line
Return value: nonzero if this is not a valid option.
init This method is called after backend is initialized. Its argument is as follows.
* object reference
Return value: nonzero if initialization failed.
CONFIGURATION
These slapd.conf options apply to the PERL backend database. That is, they must follow a "database perl" line and come before any subse-
quent "backend" or "database" lines. Other database options are described in the slapd.conf(5) manual page.
perlModulePath /path/to/libs
Add the path to the @INC variable.
perlModule ModName
`Use' the module name ModName from ModName.pm
filterSearchResults
Search results are candidates that need to be filtered (with the filter in the search request), rather than search results to be
returned directly to the client.
EXAMPLE
There is an example Perl module `SampleLDAP' in the slapd/back-perl/ directory in the OpenLDAP source tree.
ACCESS CONTROL
The perl backend does not honor any of the access control semantics described in slapd.access(5); all access control is delegated to the
underlying PERL scripting. Only read (=r) access to the entry pseudo-attribute and to the other attribute values of the entries returned
by the search operation is honored, which is performed by the frontend.
WARNING
The interface of this backend to the perl module MAY change. Any suggestions would greatly be appreciated.
FILES
/etc/openldap/slapd.conf
default slapd configuration file
SEE ALSO slapd.conf(5), slapd(8), perl(1).
OpenLDAP 2.4.28 2011/11/24 SLAPD-PERL(5)