Sponsored Content
Top Forums Shell Programming and Scripting Linux Script to move executable to quarantine Post 302315543 by gavintam on Tuesday 12th of May 2009 04:15:38 PM
Old 05-12-2009
Bug

Thanks kodak. I finally get it done with this! a bit revision to get it automatically move executable to quarantine directory. And interestingly, a exe file is FOUND not an executable!! but its all fine. Smilie

Code:
#!/bin/bash
SAMBAPATH=/exports/samba
LIST=`ls $SAMBAPATH`
LOOKFOR="x-dosexec"
EXE=/tmp/exelist.log

cd $SAMBAPATH
for i in $LIST; do
        if (file -ib $i | grep $LOOKFOR > /dev/null 2>&1>/dev/null); then
                echo $i >> $EXE
        fi
done

cat $EXE | while read index; do mv $index /tmp/quarantine/;done;
rm $EXE

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux PHP Executable Output Issue with IE

I have developed a PHP web page that executes a batch file and pipes the output to a file. It works fine when using Firefox, Safari, etc. However, when using IE, it does not work. $execute = `batch.bat $var1 $var2 | tee /batch.output`; print "<pre>$execute</pre>"; When the page is run in... (1 Reply)
Discussion started by: dleblanc67
1 Replies

2. Linux

Size of the Library/Executable is high in LINUX

HI All, We have a 32bit Gui application created using C++. We ported the application from Solaris to Linux. Issue we are facing is the size of the library and executable is very large in LINUX compared to Solaris. Red Hat Enterprise Linux 5.4 is the Linux version we using. Please... (0 Replies)
Discussion started by: sanushchacko
0 Replies

3. UNIX for Dummies Questions & Answers

[Solved] About commands for linux executable files

I have seen commands like this: (hello is the executable file or maybe script file) ./hello hello .hello So, anyone could tell me the differences among these commands? (2 Replies)
Discussion started by: icyfight
2 Replies

4. UNIX for Dummies Questions & Answers

What are the executable file formats in Solaris and Linux?

we all knew that .exe files are the executable file formats in windows....... Similarly, what are the executable file formats in solaris and linux ........ please tell me:D Thanks in Advance. (2 Replies)
Discussion started by: vamshigvk475
2 Replies

5. UNIX for Dummies Questions & Answers

Run executable in one directory and then move to another successively

Hello, I have several hundred subdirectories which contain input files for a binary executable. I need to get into each of the subdirectories, run the executable and then move to the next one and repeat the process. What is the best way to do this? Arbitrarily my file structures look like... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

6. Shell Programming and Scripting

Get the File name of perl executable in Linux

Hi All, I just want to know how to get the executable name of the perl script as i know "$0" will give me the script name but i want to know the executable name which i got it from the script using pp command. Regards Raj (1 Reply)
Discussion started by: kar_333
1 Replies

7. Shell Programming and Scripting

Move script from windows to Linux using NFS mount

Hi All, Is there a command or script which will push a file from Windows server to Linux box? using the mount command. I want the details or document of the whole process please. I want this script to run every 30 minutes to push the file from windows to unix Thanks (16 Replies)
Discussion started by: thinkingeye
16 Replies

8. Shell Programming and Scripting

Shell script to encrypt the xls file using executable jar in Linux SUSE 11.4

Dear Experts, I am an ERP consultant and would like to learn shell script. We are working on Linux SUSE 11.4 and I am very new to shell scripting. We can manually encrypt an excel file using "executable jar" through command prompt by placing the jar file & the file to be encrypted on a physical... (1 Reply)
Discussion started by: nithin226
1 Replies
Mono(chktrust)															    Mono(chktrust)

NAME
chktrust - Check the trust of a PE executable. SYNOPSIS
chktrust [options] filename DESCRIPTION
Verify if an PE executable (CLR assembly, Win32 EXE or DLL) has a valid Authenticode(r) signature that can be traced back to a trusted cer- tificate authority (CA). This means that (a) the signature is valid (i.e. file integrity) and, (b) the code-signing certificate can be chained back to one of the certificates in the Trust store. OPTIONS
-q , -quiet Quiet mode. Limited display on console. -v , -verbose Verbose mode. More details displayed on the console. -help , -h , -? , /? Display help about this tool. KNOWN RESTRICTIONS
chktrust cannot validate Authenticode signatures on CAB files. AUTHOR
Written by Sebastien Pouliot COPYRIGHT
Copyright (C) 2003 Motus Technologies. Copyright (C) 2004 Novell. Released under BSD license. MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-list for details. WEB SITE
Visit http://www.mono-project.com for details SEE ALSO
signcode(1),makecert(1),certmgr(1),setreg(1) Mono(chktrust)
All times are GMT -4. The time now is 09:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy