dd & netcat

Discussion in 'Linux, BSD and Other OS's' started by Impotence, Jul 10, 2006.

  1. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
    Im trying to use netcat to make a binery copy of my laptops hdd (using a LiveCD) so if i :swear: anything up i can just restor it :p

    On my desktop i'm using the command: netcat -l -p 1337 > /home/impotence/hash/hash.image
    On my laptop im using the command: dd if=/dev/hda | netcat 192.168.1.5 1337

    [Hash is my laptops name :p]

    When i run the command on my laptop i get the error:-

    "bash: ./netcat: Permission denied
    1+0 records in
    0+0 records out"

    I slightly confused as too why, and i am running this as root (its the backtrack LiveCD, i dont really have a choice! :p)

    any idears?
     
  2. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    Permission denied. Sounds like you haven't set the file permissions but I'm not sure. Sure its executable?
     
  3. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
    ok now im confused :p

    Im trying to send a bit by bit image of my laptops hard drive to my desktop using netcat (nc) on a liveCD.

    I dont see what i need to set to executable...

    i just found THIS so im going to copy & paste the commands out of it.... hopefully it will work :p

    EDIT: its now working, "dd if=/dev/hda > /dev/tcp/192.168.1.5/1337"
     
  4. excabus

    excabus Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Good that you got it working regardless!

    I got it working with netcat by using the following.

    On target computer (computer to be receiving the DD file.)

    nc -l -p randomportnumber | dd --progress of=C:\anydirectory\nameofimagefile.extension

    On evidence computer (computer which you are making the drive image from.)

    sudo dd if=/dev/devicehere | nc ipaddress matchingrandomportnumber

    Working like a charm right now.

    Sorry to resurrect this thread, but I thought this might be useful information.

    If you get the permission denied error, make sure on your target computer your permissions on your folder are set correctly to allow anyone to write files into that folder!

    :3
     

Share This Page