How to use perl code? Where to paste it? [closed] - perl

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I was looking through google for a software that would meet my needs and found very short, 12 lines with regular expressions (whatever this is), perl code. The person who posted it is claiming to say, to others, that this code does what I want. But since Im not programmer I don't know what to do with it? I might need to paste it into txt file and save it somehow but the code is supposted to use text files. I don't think I would be able to use text files inside another text. My purpose is to filter email addresses from giant messy txt files. Im trying to use this code (but don't know what to do with it): http://linuxconfig.org/extract-email-address-from-a-text-file

You run the program using perl. Instructions for getting perl are provided at: http://www.perl.org/get.html
Then see learn.perl.org for getting started instructions.
Assuming you are using a UNIX-like operating system (i.e. not Windows) the process is:
Put the code in a text file on a system with perl installed
Make it executable (chmod +x filename)
Run it as per the example under "Execution".

Save the content to a file named e.g.
extract.pl
And install per for windows: http://strawberryperl.com/ ; if you are on Unix, well done.
now you can execute the script by opening a console window, changing in the directory where the script is saved and execute
perl extract.pl < yourtextfile.txt

Related

How do I encode my VBScript files into .vbe files? [duplicate]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How to encode vb script so that others cant see the code inside
Look at
http://www.microsoft.com/technet/scriptcenter/resources/qanda/mar06/hey0309.mspx
The other posters have (sensibly) pointed you in the direction of the Microsoft Script Encoder, but just in case you were feeling a false sense of security, you need to understand that it is fairly trivial to unencode your scipts as well:
http://www.aspheute.com/english/20011123.asp
http://www.greymagic.com/security/tools/decoder/
Clearly, encoder with scare away a casual browser. If you have something that you really need to hide, you need to take other measures, for example, wrapping your code in an ActiveX DLL (but even these can be disassembled).
Probably overkill, but worth a mention.
Microsoft Script Encoder
Many of the popular scripting ISE's include a way to compile scripts so that the code is encrypted, but it also helps by packing the engine with the code which helps if you run it on a system that doesn't have the same version, or possibly doesn't have the same script engine. I would recommend something like AdminScriptEditor or PrimalScript

creating an iOSOpenDev application and a tweak in the same package [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I've spent three days looking how to create (using iOSOpenDev) one package (.deb) containing an application and a tweak at the same time and I could not find anything.
It is possible to do this?
What you can do is in the xcode project, create two targets (one tweak and one application), both using iOS open dev, and then package them in the same deb. The way you would package them both is creating the correct path to the applications folder (/Applications/YourApp.app) and the path to where your tweak goes (/Library/MobileSubstrate/DynamicLibraies) in the same deb folder, and then build the folder by typing this in terminal
sudo dpkg-deb -b YourDebFolder
The folder should look like this
Where DEBIAN contains the control file, Library contains a subfolder named MobileSubstrate, which then contains another subfolder DynamicLibraries, which contains the tweak, and the Applications folder contains the YourApp.app file.

perl script to implement sudo login in linux [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I wrote a script in perl which should actually sudoto root in linux using the password. After the login, it has to call a shell script. However once the login is done, all the other commands become background process and hence do not execute.
You cannot write sudo equivalent on Perl. This is cus Perl is scripting language and is contains #!/usr/bin/perl in begining. So, when you run it actually exec-s into /usr/bin/perl sudo.pl. And, of course, Perl binary does not have suid flag.
Also, your question... it looks "malwary"...
For interactive session, you can make use of perl Expect package.
https://metacpan.org/pod/distribution/Expect/Expect.pod

How to execute a .pm file on web page [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I was given two .pm files that I need to trace... problem is I haven't encountered one before and I don't know how I can run it on web page for tracing.
Do I just need to upload those .pm files on my web server, go to url pointing to its location?
I'm clueless.
A .pm file is just a Perl module. There are quite a few interfaces that can be used to run Perl code on a webserver (including PSGI/Plack, FastCGI, mod_perl and CGI). The specifics of how you use the modules will depend on how they are designed to interface with the server. The files you have might not even be intended to be used directly.
Depending on what you are trying to acieve you may have to create a perl-script using these pm files. You cant directly acess them using a webbrowser because these filea are more like libraries than like scripts you can run.

exploit Dropbox file redundancy check [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
in Dropbox if a file is already present at their servers, the file is not uploaded. It syncs instantly..
Now, this check is done on a few things i think, probably the file size, file name, and of course the CRC (md5 hash or something...)
I was thinking.. if I know the file name, its size and its CRC, is it possible to create a fake file that produces that particular CRC (reverse hashing) so that dropbox actually syncs the true file?
It's just an experiment, it could be done for example with linux distribution images..
any idea on the topic?
Curious to see that someone is thinking about this also.
Problem 1:
Even if you were able to create a fake file with the same CRC, the client would just not upload the file again (but you would still keep your fake file in your computer).
You would just receive the desired file on the other computers associated with your dropbox account.
Problem 2:
Creating that fake file seems a bit impossible from my point of view. CRC's were developed to check file integrity so it seems a bit complex to create a file with the same CRC without a massive brute-force.
MY SUGGESTION:
I believe it would be much easier to modify the CRC routines in the Dropbox source code (if you have it) and allow the injection of your fake CRC values.
Final comment: I might not be very creative but I do not find a legal reason for the use of this scheme. Dropbox already provides a Public folder to share files (but traffic limits apply).