Author Topic: Can't find .out file  (Read 6175 times)

Offline chedRvendetR

  • Single posting newcomer
  • *
  • Posts: 4
Can't find .out file
« on: January 26, 2014, 03:16:02 am »
So apparently .out files are formed when programs are compiled, but for some reason I can't find it! I need to read the .out files for my programs so I can continue reading my book that shows how to interpret them. Please help.

Many thanks    8)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can't find .out file
« Reply #1 on: January 26, 2014, 03:27:56 am »
So apparently .out files are formed when programs are compiled, but for some reason I can't find it! I need to read the .out files for my programs so I can continue reading my book that shows how to interpret them. Please help.

Many thanks    8)
Please ask a good question, I mean you should state what you have done step by steps, and what the expect result, all should in details. Also, we need the OS, Compiler, C::B version information.

Without those information, how can we help you?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline chedRvendetR

  • Single posting newcomer
  • *
  • Posts: 4
Re: Can't find .out file
« Reply #2 on: January 26, 2014, 05:03:57 am »
So sorry! I've tried looking in the bin folders but have only found the 'file.exe' file and 'file.o' object file. I originally thought file.o was short for file.out until I searched up that it actually stood for .object.

The .out file should contain stuff that looks something like this:

reader@hacking:~/booksrc $ gcc firstprog.c
reader@hacking:~/booksrc $ 1s -1 a.out
-rwxr-xr-x 1 reader reader 6621 2007-09-06
22:16 a.out
reader@hacking:~/booksrc $ .a/a.out
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
reader@hacking:~/booksrc $

(This is an example of an .out file taken from 'Hacking: The Art of Exploitation')

OS = Windows Vista (32 bit)
Compiler = GCC
CB version = 10.05
« Last Edit: January 26, 2014, 05:17:07 am by chedRvendetR »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find .out file
« Reply #3 on: January 26, 2014, 11:48:25 am »
For me this explanation says nothing.... it seems that the out file is your executable file

what does the .out file should contain? Remember (and probably you should already know it, if you read a book like 'Hacking: The Art of Exploitation') that file extensions says nothing about a file (on unix).
And probably you should read a book for basic programming first... (compiling, linking, bash commands....)

[Edit:] and please update your c::b because 10.05 is really really really old..

greetings

Offline chedRvendetR

  • Single posting newcomer
  • *
  • Posts: 4
Re: Can't find .out file
« Reply #4 on: January 27, 2014, 05:00:32 am »
Yeah I don't have much experience with compilers and the like. I've had a problem with installing newer codeblocks versions but now I've successfully installed the latest one.

Here's a better example of what the .out file should contain:

reader@hacking:-booksrc $ objdump -D a.out |
grep -A20 main.:
08048374 <main>:
 8048374:          55                            push
%ebp
 8048375:          89 e5                         mov
%esp,%ebp
 8048377:          83 ec 08                     sub
$0x8,%esp
 804837a           83 e4 f0                      and
$0xfffffff0, %esp
 804837d:          b8 00 00 00 00             mov
$0x0,%eax
 8048382:          29 c4                         sub
%eax,%esp
 8048384:          c7 45 fc 00 00 00 00    movl
$0x0,0xfffffffc(%ebp)
 804838b:          83 7d fc 09                 cmpl
$0x9,0xfffffffc(%ebp)
 804838f:          7e 02                          jle

etc etc

I hope this example helps
« Last Edit: January 27, 2014, 05:20:58 am by chedRvendetR »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Can't find .out file
« Reply #5 on: January 27, 2014, 06:24:37 am »
a.out is the traditional format / default name for (binaries and) executables generated by a build-toolchain on unix when I started programming (long, long ago)

So instead of a.out you can just use your executables name or (if you use C::B projects) name the executable a.out (see Build targets"-tab in the projects properties).

See https://en.wikipedia.org/wiki/A.out.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find .out file
« Reply #6 on: January 27, 2014, 09:30:08 am »
Good luck with your book. If you realy want to learn hacking beginn to read the documentation of your tools.
Search for gcc output parameters and read the documentation. Then start to think what os you are using, and what files does a main function contain...

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Can't find .out file
« Reply #7 on: January 27, 2014, 09:34:27 am »
O come on jens. Don't make it to easy...

Offline chedRvendetR

  • Single posting newcomer
  • *
  • Posts: 4
Re: Can't find .out file
« Reply #8 on: January 28, 2014, 03:12:55 am »
Good luck with your book. If you realy want to learn hacking beginn to read the documentation of your tools.
Search for gcc output parameters and read the documentation. Then start to think what os you are using, and what files does a main function contain...

Thank you, and I will do that.

a.out is the traditional format / default name for (binaries and) executables generated by a build-toolchain on unix when I started programming (long, long ago)

So instead of a.out you can just use your executables name or (if you use C::B projects) name the executable a.out (see Build targets"-tab in the projects properties).

See https://en.wikipedia.org/wiki/A.out.

Ah. Thank you very much  8)

That explains it but I'm still unable to read when I open 'a.out'
« Last Edit: January 28, 2014, 03:18:20 am by chedRvendetR »