System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have an application that opens 1 RAW socket and 1 IP socket.  The RAW socket is used to send out VLAN-tagged UDP packets, and the IP socket is used to send out ICMP request packets.

Sockets are created as follows:
RAW - socket(AF_PACKET, SOCK_RAW, htons(ETH_P_8021Q);
IP      - socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);

I can see that the ICMP request gets sent out properly.  But occasionally the UDP packets get sent out with an ICMP header wrapped around the UDP header, and most of the time they are sent out correctly.  So the packet looks like ETH-IP-ICMP-IP-UDP-PAYLOAD.

Is there any reasonable explanation for this?  Is there something that I can check within the code that may cause this to happen?
0
I have many subscription form hackers putting in false emails and I want to stop them with fail2ban.

This isn't catching any from the log file.  I ran

 fail2ban-regex /path to log file /path to filter.d/http-post-dos.conf

All I get are continuous lines of
Matched time template Day/MONTH/Year:Hour:Minute:Second

# Fail2Ban configuration file
#
[Definition]

# Option: failregex
# Note: This regex will match any GET entry in your logs, so basically all vali$
# You should set up in the jail.conf file, the maxretry and findtime carefully $

failregex = ^<HOST> -.*"POST.*

# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

Open in new window


Here is an excerpt of my log file

1.1.1.1 - - [23/Jan/2016:07:04:06 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:14 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:18 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:23 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:27 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:32 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:36 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:41 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:45 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"
1.1.1.1 - - [23/Jan/2016:07:04:50 -0500] "POST / HTTP/1.1" 200 12821 "-" "-"

Open in new window


You can see how fast they are hitting my form.

I am on a Centos 6.5 server.

Thanks,
0
I need to call method from the C# application from ksh. I am new to KSH script.
Is anyone aware if it possible, and what is the impact for it?
0
I have a code at c++ mfc:
....
    void SaveBitmap(QString FileName)
      {
            static BYTE parms[] = VTS_BSTR ;
            InvokeHelper(0x16, DISPATCH_METHOD, VT_EMPTY, NULL, parms, FileName);
      }
    void SaveJPG(QString FileName)
      {
            static BYTE parms[] = VTS_BSTR ;
            InvokeHelper(0x18, DISPATCH_METHOD, VT_EMPTY, NULL, parms, FileName);
      }
      long InitEngine()
      {
            long result;
            InvokeHelper(0x1a, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
            return result;
      }
.....

How can I rewrite his at Qt?
0
How to grayed out an option on ShoreTel IP phone system?? we need to disable an option under the ShoreTell program software
0
Could I use syslog() function in a way that allows to redefine the log message file?

By default all log messages are written to
/var/log/messages

I want to redefine it to /var/log/mymessages  in such way, that only my C application will have access to this file.
Is it possible?
0

System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Top Experts In
System Programming
<
Monthly
>