protocols

How to make program the default "handler" of a certain protocol?

I have a program that I would like to be launched whenever a url with the protocol "sample://" is clicked/launched. For example, a user clicks on a link in IE/Firefox with the following href: sample://test.txt. My program should then be invoked with the url as an argument. I would like a solution for Windows and linux if possible, though...

Reflection attacks in Auth protocol

Hi all, I have come across a theory on Auth protocol hacking vulnerability which can be found in http://www.owasp.org/index.php/Reflection_attack_in_an_auth_protocol. I understand how this vulnerability causes problems in exchanging the messages and how to bypass validation to become a logged-in and to be a valid user. The following co...

Python Sockets - Creating a message format

I have built a Python server to which various clients can connect, and I need to set a predefined series of messages from clients to the server - For example the client passes in a name to the server when it first connects. I was wondering what the best way to approach this is? How should I build a simple protocol for their communicati...

How do torrents work?

Can anyone explain to me or find me an article online, explaining in technical details how torrents work, which technology is used in creating? ...

Expect-like tool for binary protocol testing

I'd like to write tests for a simple byte-oriented protocol using something like Expect. The test scripts would look like a plain stream of: send "data" expect "data" (Where send writes to stdout and expect reads just enough from stdin, exiting if it doesn't match.) I can't use expect itself because it is designed for buffered, line-...

What are the protocols supported in Iphone's External Accessory Framework

Hi guys I'm working on an iphone/ipod app that will need to communicate with a computer (MAC for now, maybe PC if possible) though the USB dock connector cable. I'm a complete beginner with IPhone programming and from what I've been able to find out, the External Accessory framework is the place to start. While going through the online...

Protocol Definition Language

What protocol definition do you recommend? I evaluated Google's protocol buffers, but it does not allow me to control the placement of fields in the packet being built. I assume the same is true for Thrift. My requirements are: 1. specify the location of fields in the packet 2. allow for bit fields 3. conditionals: a flag (bit field) = t...

How to find whether the MORE FRAGMENTS field is set or no ?

Given this header , how do I find if the MORE FRAGMENTS field is set or not.. struct sniff_ip { u_char ip_vhl; /* version << 4 | header length >> 2 */ u_char ip_tos; /* type of service */ u_short ip_len; /* total length */ u_short ip_id; /...

Pass arguments when using the File protocol

I found this question being asked on several places on the internet (including the File protocol MSDN page) but no clear answer. So, if I am calling my application like this: file://c:\myapp.exe is there any way to pass it some command line arguments, like /nospashscreen=true Things I've tried: file://c:\myapp.exe?/nospashscreen=tru...

Which protocol? svn:// or http(s):// ?

There are 4 common protocols for network access of SVN. svn://repos svn+ssh://repos https://repos http://repos The wikipedia page doesn't say much about the differences of the 4 different protocols. I've always preferred svn:// because it is the easiest to setup, but what is the difference and which one is "better"? ...

Protocol reverse engineering / Reproduce HTTP dialogue

Hello everyone, For the specific needs of a project, I have to interface some of my code with other closed-source code. My idea is to understand how the original application communicates and then mimic the behaviour. I have already done the first step, which is analysing some HTTP exchanges (done using POST request and XML replies) with...

Obtaining view controllers of tabbar control

I have a tabbar navigation controller, and I would like to set up a protocol in one view controller and set its delegate in another view controller. How would I get the view controller pointer of the delegating view controller to the delegate view controller? ...

Confusion on recvfrom() in an application level protocol design

Assume Linux and UDP is used. The manpage of recvfrom says: The receive calls normally return any data available, up to the requested amount, rather than waiting for receipt of the full amount requested. If this is the case, then it is highly possible to return partial application level protocol data from the socket, even if desired M...

Camera RS232 Protocols

I am looking for information on camera RS232/RS485 protocols. The camera I have lists its supported protocols as: Pelco D Pelco P Fastrax Command I don't think that Pelco has the features I need but I can't find any information on the last two. Pelco only appears to allow differential changing of zoom and focus (commands to move in/o...

POST File Stream octet-stream

Can I pass "application/octet-stream" or say a word document as stream or binary via POST (http protocol) ? (yes/no)? ...

Categories vs Informal Protocols

Hi there, I think I understood the difference between (formal) Protocols and Categories. Now, if I got it right, informal protocols should be categories (usually defined on NSObject) which are used for certain purposes (maybe to give the chance to implement only a part of the methods listed in it, unlike formal protocols). I need to be ...

Name me a Binary Parser. A parser for binary data.

So, I'm getting this data. From the network socket, or out of a file. I'm cobbling together code that will interpret the data. Read some bytes, check some flags, and some bytes indicate how much data follows. Read in that much data, rinse, repeat. This task reminds me much to parsing source code. I'm comfy with lex/yacc and antlr, bu...

How to determine if a UIView has a delegate that conforms to a protocol

Howdy all, I have written a custom class that depends significantly on touch dragging/positioning, outside of it's own view boundaries. There is an associated protocol defined with various relevant methods. An example of something that would use this protocol would be a view that allows things to be dropped into it from my custom class....

What's the difference between data source and delegate ?

I have a fundamental question related to Cocoa frameworks design patterns. What's the difference between delegate and data source? Both of them could use @protocols declaration, but some classes or frameworks are using delegate, and some others are using data source. All I can understand from UI/NSTableView is the delegate respond to ...

@protocol implementation in @interface in Objective-C

Hello, I need to develop an application which has a interface which implements methods of 3 protocols. Assume protocol A extends protocol B and protocol C, and interface implements protocol A. This is how my code looks, // This is in MyClass.h file #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "protocol_A" @interfac...