Bro IDS Signature file error - bash

I am trying to run bro in my bash terminal. I have got a duplicate local.bro file which i renamed as localv2.bro, and put it in my working directory /home/bibin, so its not in default path. I am just trying to do a simple signature match, therefore i have created a signature.sig file in the directory. In my localv2.bro file i have tried using both ways:
#load-sigs ./signature
And
redef signature_files += "signature.sig
The signature.sig file has the signature my-first-sig example from bro.org site.
In the terminal when i try to execute this command:
bro -r traffic.pcap localv2.bro
I get an error message saying:
line 27: unrecognized character -
I have also tried doing it in a different route:
bro -r traffic.pcap -s signature.sig
This also gives me the same unrecognized character error.
Am i doing something wrong, please can you guide me to a solution ?

Related

problem on opening lvim using the termux-file-editor file

i'm trying to use lvim inside the "termux-file-editor" file but when i try to open it with any file, it gives this error message (see the screenshot).
The code:
#!/usr/bin/bash/
lvim ${1}
the error
i tried executing the lvim in multiple ways like: exec "lvim".
Or: alias lunarvim=lvim.
but it doesn't work.
i was expecting just to start editing the file with lunarvim.
im using a GalaxyA01Core.

Getting Error when the filename contains Space

I am having a filename with space. My Filename is (7 Bridges.app.dSYM)
I am printing the location of the file.
echo $dsymlocation
/Users/aa/Library/Developer/Xcode/DerivedData/bridges2-ekucwkrbbusrvsdxyegvpkdkiitj/Build/Products/Release-iphonesimulator/7\ Bridges.app.dSYM
If i give the location of the file directly as input to the below command, it is working.
dwarfdump --debug-pubnames /Users/aa/Library/Developer/Xcode/DerivedData/bridges2-ekucwkrbbusrvsdxyegvpkdkiitj/Build/Products/Release-iphonesimulator/7\ Bridges.app.dSYM
But if i give the variable name containing the file location, it is not working
dwarfdump --debug-pubnames "$dsymlocation"
It is showing the error as
unable to open '/Users/aa/Library/Developer/Xcode/DerivedData/bridges2-ekucwkrbbusrvsdxyegvpkdkiitj/Build/Products/Release-iphonesimulator/7\ Bridges.app.dSYM': No such file or directory
Can anyone help to resolve this error?
The error message complains about a file named 7\ Bridges.app.dSYM, while the file is, according to what you say, 7 Bridges.app.dSYM. It looks like the content of the variable dsymlocation contains a backslash. We can see the backslash also, when you do the echo $dsymlocation.

How to find line that is causing the error

I have just started using Laravel and cannot get my head around how it throws errors. It doesn't show the line where the error is so I don't know how to locate it. Can anyone help?
htmlentities() expects parameter 1 to be string, array given (View:
M:\webserver\www\app\views\products\admin\create.blade.php)
This file is incredibly long and I cannot see where this array is being sent.
It's obviously coming from a Form::text() but I am passing a null as the second param in all that I can see. Why doesn't Laravel simply tell me the line that is erroring. The error it puts out is no use to me.
check the error file:
app/storage/logs/laravel.log
you can watch changes in the file (on Mac and *NIX) using command line:
tail -f app/storage/logs/laravel.log
remember that the storage directory must be writable by the webserver/PHP process because it's used as scratch space (for blade views, logs, etc.)

How to use FileUtils cp using directory name with spaces in Windows?

I've tried using the suggestions in this thread to no avail: How to use copyfile when there are spaces in the directory name?. To be clear, the directory I'm using is already in double-quotes, and I've tried escaping the spaces, but still get the same error. This is the error message I get:
Error: Failed to open PDF file:
C:/Documents
Error: Failed to open PDF file:
and
Error: Failed to open PDF file:
Settings/cpengelly/My
Error: Failed to open PDF file:
Documents/Dropbox/theproject/tmp/working/main
Error: Failed to open PDF file:
pdf.pdf
Errors encountered. No output created.
Done. Input errors, so no output created.
What is going on here?
you just need to put your directory name in double quotes. example -
FileUtils.cp("C:\\Program Files\\FileZilla\\dbghelp.dll","c:\\temp")

mkdir on windows - CAKEPHP

Hi I am searching for a good solution since a while and I found nothing to help me on google.
I got an error on my website with the function mkdir, but only when I set the debug at 2.
Here is the error
Warning (2): mkdir() [function.mkdir]: Invalid argument
[CORE\cake\libs\folder.php, line 498]
Im on windows server 2003 and every permission are given to all my folder.
The path that is given to the function is
C:\Inetpub\vhosts[DOMAIN NAME]\subdomains[SUBDOMAIN
NAME]\httpdocs\app\webroot\C:
I notice the last C: at the end of the path but don't know where it come from nor does I know what the function is trying to create.
mkdir() should ideally take the path to directory and should not include the file name. The invalid argument warning seems to suggest the same. Try passing the argument without filename.
/Thanks.

Resources