Sorry Salem again. I found my mistake. Had comments on one of the lines and hadnt see it. But now it shows another one. I get: "passer" after I try to execute code. I will try to find answer to this...
Type: Posts; User: MiniComa
Sorry Salem again. I found my mistake. Had comments on one of the lines and hadnt see it. But now it shows another one. I get: "passer" after I try to execute code. I will try to find answer to this...
But it doesnt show any errors then.
And if I take code from libipq manual page: http://linux.die.net/man/3/libipq it works fine.
Sorry Salem. I understood you incorrectly and compiled this with other flags too. Now I get this:
/tmp/ccaUJtDN.o: In function `die':
/home/dell/Desktop/Geri/A.c:65: undefined reference to...
I get this with -rdynamic. -g flag doesnt do anything.
/lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7f4272d83626]
/lib/libipq.so.0(ipq_destroy_handle+0x18)[0x7f42730c2fb8]
./A[0x400c46]...
I am not going to do nothing bad. This is for my studies. Do you think I would keep the original C code If I wanted to do smth evil?
Hi,
I try to run this code: ipt_evil.c - ipt-evil - A userspace iptables QUEUE that does "evil" things to packets. - Google Project Hosting . But I get this error: Socket opertaion on non-socket -...
I have figured it out by myself. Code looks like this:
unsigned char data[4] = {0x00, 0x00, 0x01, 0xb3};
int k = 0;
int j = 0;
int N = 5;
while (k < m->data_len) {
if (m->payload[k] ==...
Would you look into full code if I post a link? With "a" variable I try to divide stream into two parts where in one part I have modified packets with sequence header and in the other I have all...
Could you say what do you mean by saying this "you need to get your variables right"? Because English is not my first language and I did not understand what you mean.
Talking about whole code, I can...
What can I do to avoid that?
Did I understand you correctly and code should look like this? Because it gives me the same output.
unsigned char data[4]={0x00,0x00,0x01,0xb3};
int k = 0;
int j;
int N=5;
int n=N;
while(k...
I want to change every N-th byte of payload. And if I set m->payload[N] = 0xFF; it will change only first one. Sorry if my question was obscure.
P.S. How do you made code to look so nice?
Hi,
I want to change N-th byte of payload. This code works but does not do what I want. I see that a-th byte of payload is set to 0xAA. What I am doing wrong here?
unsigned char...
Thank you dwks. I have used unsigned char instead BOOL but will try your suggestions.
Thank you, dwks. I have found this link also but because of BOOL I thought it is more C++ code but I have made some modification to be C. Just wanted to ask if someone has better options.
I dont...
Hi,
Do any of you have UDP checksum C code? It would be even better to see how it works in some examples.
Thank you Andreas. I am newbie in programming so all info are very useful to me.
Thank you. Cant believe I was so dumb to miss it.
The main idea is to detect wanted bytes pattern. I must be doing smt wrong here. I skip through bytes until I find 0x00 and then with memcmp() function try to check if wanted pattern starts here. If...
Hello,
Could you tell me what is wrong with this code:
unsigned char data[4]={0x00,0x00,0x01,0xb3}; //byte pattern
int i = 0;
while(m->data_len > 100) {
if (m->payload[i] != 0x00) {
I stream video file with VLC and catch it with iptables and libipq in Linux client. I want to identify frames and drop some of them in order to see how video quality changes.
Hello,
I have one MPEG PES packet: MPEG PES data - Pastebin.com and want to know is it possible to say if this packet( or frame) is I, P or B. I want to write a script in case to deal with more...
Thank you Salem. I will try to do this.
Hmm. As I work with Ubuntu and execute code (tried with few memory functions), I got error: "Segmentation fault (core dumped)" instantly. Any other suggestions?
Hello,
I am working with video packets and know that MPEG4 packets begin with hex values 00 00 01 B6. I want to know if I am working with mp4 or not. How can I read information from packet to...