Printing Opcodes to a File [closed] - opcodes

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.
Just curious, if open a hex editor and type opcodes manually and save it. Such as move 1 to register 1 move 2 to register 2 then call add, would that give me working program? Or does some how automating this gives me crappy compiler?
EDIT: Forgot about OS, I have Mac OS X and Linux at my disposal, x86's as the CPU.

As I noted in the comments, the OS/platform is important here. Most platforms will expect some sort of structure to an executable (if only a header etc.). e.g. see the a.out format as used by older versions of Unix.
As you've indicated you have Mac OS X, check out the Mach-O format.
Beware that typing 'A0 A1'... etc. is different from putting the actual bytes (in this case 160/161) in the file.

As long as you have the proper file format for the binary then yes.
Old DOS .com files were just this - the raw program serialized out to disk. .exe files and unix ELF files have a structured format to them which includes (among other things) relocation information.

Only if the file is a properly formatted executable binary file. See references on the COFF and ELF formats, for example.
You could also dump the contents of a small executable file using od if you're curious about what a particular executable file looks like.

Related

how to know the file type and name from the http response? [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.
Now i can figure out is through 'Content-Disposition' and 'Content-Type'!
Is there any tips about know the file type and name from the http response?
A HTTP response is a resource, not a file, so it has neither file type nor file name.
For some resources the server uses a corresponding file to create it, like for example most images. In that case the name of the resource is usually the same as the name of the file, and the content type is derived from the file type.
For some resources the server returns a file name in the content disposition header. This can be the same as the name of a file on the server, but it can just as well be a file name that the browser sent to the server when the file was uploaded, and the data is stored under a different file name on the server, or perhaps stored in a completely different way.
Some resources are created by the server when needed, typically by running a script source or by calling some compiled code to generate it. In that case the name of the resource can correspond to a file on the server, but it's not the file that is returned but the result of processing the file.

Applying AJAX to refresh contents of a table designed in HTML and Perl [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 am having issue in applying AJAX so as to refresh certain contents of a table designed in HTML and Perl.
Say, if the contents of the following cells
{R2,C3},{R3,C4},{R4,C(5-7)}, {R(7-10),C(8-11)}
need to be refreshed every 10 seconds,
what shall be the corresponding PERL code for the same?
Millie a Thanks for sharing your Kowledge and Time.
Get the data you want (how you do this depends on how it is stored).
Convert it to JSON (the JSON module is well documented) … assuming you want to use JSON, although it is a common choice.
Output a Content-Type: application/json header (how you do this depends on the method by which you are interacting with your web server, it will be different between Plack / a framework / mod_perl / raw CGI / etc) … the same assumption applies.
Output the JSON text (ditto).
There is a simple example using FastCGI.
You need to build a JS method to Asynchronously obtain content from server side
You need a server side module (pearl in this case) to produce that content, there is no special code requiered on the same . you can use your existing PERL server-side module.

What is a configuration file [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.
What is configuration file? What does it contain?
How it is different from a plain ASCII data file?
A silly extra question: What is meta data?
A configuration file is a file that contains configuration data.
It could be any kind of file: XML, .properties, text, INI, etc...
A configuration file generally contains info about how a program works or operates.
A data file generally provides data to a program.
Both files may or may not be ASCII files.
Metadata is data about data.
If your program displays data about houses, an example of metadata might be whether or not to display addresses.
Such data does not describe a house; it is data about how to display house data (ie data about data).
refer http://en.wikipedia.org/wiki/Configuration_file for all detail info about Configuration file....
and about meta data http://en.wikipedia.org/wiki/Meta_data

Is it possible to store pictures,sounds,videos in SQL Database? [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.
Is it possible to store pictures,sounds,videos in SQL Database (or any other database) ? If yes what format should it be and please specifiy about the special settings that has to be configured if any. Thanks in advance.
In MySQL you can store any binary content in a table using the BINARY or VARBINARY data type for a column. Quite all database system as such a data type. It can be used to store a full file content such as picture, video, sound,... or just a binary snippet.
Nevertheless, storing binary files in a database is considered as a bad practice, because it quite always brings to disappointments. Indeed, a file stored in database cannot be easily processed for a download, an inclusion in a HTML page, a streaming, ... . And it is quite always complicated to manipulate because of its length. Most often, a file sorted in a database is disadvantageous compared to a file stored in a directory. Its is advised to store the file name in the database base, and save the actual file in a physical directory.
Although its generally not recommended to store images inside the Database, its better to store path of the image. Nevethless the images can be stored in the database by using a longblob datatype. Check out this example from MySql forums.

In which language is made a page ".shl"? [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.
Pages like this:
http://info.abril.com.br/noticias/carreira/ibm-da-curso-gratuito-de-ingles-a-distancia-06092010-37.shl
are make in which language? Is "shl" a language? I didn't found more about..
File extensions on the web can be misleading. Webservers can be configured to treat extensions any way they want. There's nothing stopping a webmaster from naming all their HTML files ".exe" and calling their PHP scripts ".aspx"
Check that server's output headers. maybe there's a language signature. e.g. PHP can put in an "X-Powered-By" header if the webmaster so chooses.
It doesn't have to be a specific language, it depends on the configuration of the webserver. I would hunt for clues on the page, as the file extension is no help concerning finding out the underlying technology.
Well all webpages - including the example page you link to - are written in HTML and javascript. What the server-side language is that generates (or simply returns) that HTML and javascript could be practically anything.
However, the file ending .shl doesn't necessarily mean the server side language is .shl related. You can have your URLs ending with anything you like.
As far as what .shl file extension might be, I don't know. A google search throws up this: "Inno Setup String Tables file format" but i have no idea what this is.