Unable to create socket: Operation not permitted - Mac [closed] - c

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to run portscaner as part of my work at school. When I run the code it shows an error msg "Operation not permitted". This msg is printed directly after the OS fails to create a socket.
Notes:
1. my system is Mac OS X 10.6.8
2. in this project I'm using row socket.
3. I've written a code before the creates TCP socket and runs perfectly.
I assume this error appear because row sockets require some kind of higher privilege that my system currently has. Does anyone know how to change the privilege in my system?
Any helps is highly appreciated :)
Thanks

The process has to have root privileges to open a raw socket.

Some time another socket is running under the same port

Related

Is it better for me to use a for loop in Bash or C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I'm writing a program to "break" one of my company's devices. The issue is that too much TCP traffic on the device shuts its port down and we need to try to replicate this. Originally, my thought has been to use the for loop in C, but I also think it's probably more representative of the failures that are occurring if there are more simultaneous connections. So my thought now is to create a bash script that will execute the program multiple times.
The real issue is that we are seeing the failures occur because TCP connections are being opened and closed for every command that comes in.
So I have a simple C program that opens a connection, sends a command to the device, gets the response, and then closes the connection. My original thought was to create a for loop inside the C code that performs all the connections, but it wouldn't happen simultaneously. So I wonder how much, if anything I lose with a bash script that executes the compiled C program in the for loop.

Can not connect through ssh to my remote machine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Yesterday i restarted my remote computer only to find that i could no longer connect to it through ssh. I can connect to the computer if I'm using the computer, but when i try to on my other computer it does not work. I have tried reinstalling it but i have had no luck. Whenever i try to connect to it through a different computer, its "Connection timed out". I have also checked ssh status and it says it is running.
Also, I am kind of a beginner to this so if my terminology is off feel free to correct me.
I don't know what i should do. Any help and all help is appreciated!
Check if the firewall is blocking port 22.
maybe some changes have been made and got applied only when you restarted the machine.
Have a look at the output of
iptables -L | grep ssh
and see if there is any info

How to give root permission to dynamic mounting printer port.? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
How can i give user permission to dynamically mounting printer port "/dev/usb/lp0" to the normal user in fedora os.
This port will be mounted when i connect the usb printer.As a normal user how do i open this port in read_write mode.
Thanks in advance
As mentioned, a udev rule should solve this for you:
In your user udev rule directory (e.g. /etc/udev/rules.d) create a file called "10-local.rules" and add the following lines:
KERNEL=="lp0", SUBSYSTEM=="usb", MODE="0666"
then udev system should change the permissions to give every read and write access to the device.

remote desktop overtaking someone else's disconnected session [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
We have one user account on the remote server. When computer A initiates a remote session, then disconnects from it, and computer B initiates a remote connection, computer B is being connected to the A's session.
How can I make sure that only the same device can reconnect to its remote session?
If it's a single user account I don't think you can. You need to make sure that they log off instead of disconnecting, then they can start a new session with the right account.
See here for more info.

Getting RDP Access what ports to use/open up? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am currently attempting to get remote desktop server access to a different server, and that server admin was asking me what ports I was using. I was unsure to what he meant, and how I could find out this info ?
Thanks
If it's Windows remote desktop, then TCP port 3389 is what you need to tell him, although I'd like to think the admin should know that information!
If you are using the default configuration it will be port 3389 that the server is listening on. For non-standard configurations it can be anything, only the server administrator will be able to tell you.
http://en.wikipedia.org/wiki/Remote_Desktop_Protocol

Resources