|
I guess im interested in Internet Security, if that is an appropriate term to use. I want to make sure that when I send some data over internet, its as much secure as possible. I guess I will need to play with .... Network Layer or something, I dont know. Let me know if I was able to help you.
|
|
|
|
|
Protecting data isn't so much a protocol issue as it is a cryptography issue
You should start learning basic cryptography primitives such as what a symmetric cipher vs asymmetric, in addition to key establishment protocols like diffie-hellman.
Keep in mind this is a very large field of study
Thanks,
Matthew.
|
|
|
|
|
There is more to security than just data encryption.
Although researching data encryption, understanding it and implementing it for non-trivial size messages will likely take some time so it is a start.
|
|
|
|
|
mmm, you could make your data secure by just making it un-understandable by having a really idiotic protocol or you can do what everybody else does... encrypt the data. There are lots of good examples which you can follow.
If it is just about file transfer you can take the easy(chicken??) way out and write yourself an app that creates a temp spanned-encrypted zip, transfer that, glue it back to gether and decrypt it.
I've done a lot on communication and protocols but hardly ever bother with security. This ball is for someone else I guess.
Cheers, AT
Cogito ergo sum
|
|
|
|
|
The most secure approach if you can't have offline key transfer is to first share a key using public key cryptography (realistically at the moment that means RSA), and then use that key for the data transfer. You can refresh the key periodically if you think key re-use is compromising your security (using the public key exchange protocol again, of course).
The easiest way to do that is use SSL. My sockets library also offers an RSA protected key exchange and you're welcome to have a look at that code to get some inspiration if you want to do it yourself.
|
|
|
|
|
overloaded Name wrote: I know basics for Network programming or Socket Programming but I dont know where to start for programming basic internet protocols.
What, you wanna learn the Network Time Protocol[^]?
Most protocols are described on the wikipedia. Is there any specific protocol that you are interested in?
Bastard Programmer from Hell
modified 12-Dec-11 12:02pm.
|
|
|
|
|
Eddy Vluggen claims to be: Bastard Programmer from Hell Holland
ftfy [see your wikilink]
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Whehe, aight - just corrected the link
|
|
|
|
|
hello and greeting to all...i got a question and looking for advise.
im building an app which run behind the window...not actually behind!
just an app which function is to looking for specific file, that will created everyday...
im using filewatcher and system tray to trace recently created file..
if there exits a file which i want and it just newly created, i will read that file and store into sql..after that..i delete it!
but when i delete, my app notify that it already delete..when i recheck again..the file still available but it cannot be opened..window prompt "the file is not exist..do u want to create new"
i google and found that i is bcos of the file is being shared between 2 activity which is, system watcher and stream reader...
can anyone help me how can i solve my problem...??
|
|
|
|
|
beh7606 wrote:
but when i delete, my app notify that it already delete..when i recheck again..the file still available but it cannot be opened..window prompt "the file is not exist..do u want to create new"
i google and found that i is bcos of the file is being shared between 2 activity which is, system watcher and stream reader...
can anyone help me how can i solve my problem...??
I haven't used the <a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx">FileSystemWatcher</a>[<a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx" target="_blank" title="New Window">^</a>] yet, but it might help to split the task into two separate tasks;
Once you processed a file, add it's path to a list.
Have a background-thread remove the files in that list.
Bastard Programmer from Hell
|
|
|
|
|
A couple of things to watch for:
1.
FileSystemWatcher looks for file system activity, and fires events when some file operations happen (or start to happen). The number of events is undefined; creating and filling a big file may generate several Changed events.
2.
FileSystemWatcher does NOT signal the end of a file operation, so you won't know when the writing process is done writing.
3.
One way to cope with the above is by inserting a delay: after a Created or a Changed event, just wait one minute, and only then do what you intended.
4.
Another work-around is using two files (this assumes you control the producer: have it create the actual file of interest, and when done, create a small "semaphore" file, optimally using simple code such as
File.WriteAllText("someFolder\semaphore.dat", "there is a new file called someFolder\myActualDataFile.txt");
Then have your FileSystemWatcher watch for the semaphore file only.
5.
When reading files or file streams, you must mjake sure to close them properly. Calling Close() or Dispose() normally takes care of that. Applying a using construct is a very good way to make sure it always happens:
using (StreamWriter swFromFile = new StreamWriter(logFileName)) {
swFromFile.Write(textToAdd);
...
swFromFile.Write(textToAdd);
}
|
|
|
|
|
hai! your solution is good!! thanks you...i will try to do it your way..hopefully it successful..thank you...!!! -sharing is caring- *_*
|
|
|
|
|
hi,
I want to use regular expressions for analyzing a url, but I can't get the regex groups as I would expect them to be.
My regular expression is:
@"member/filter(.*)(/.+)*"
The strings to match:
1) "member/filter-one"
2) "member/filter-two/option"
3) "member/filter-three/option/option"
I expect to get the following groups:
1) member/filter-one, /filter-one
2) member/filter-two/option, /filter-two, /option
3) member/filter-three/option/option, /filter-three, /option(with 2 captures)
I get the result for the first string, but fore the 2 others I get:
2) member/filter-two/option, /filter-two/option, empty string
3) member/filter-three/option/option, /filter-three/option/option, empty string
What can be the issue?
|
|
|
|
|
We do have a Regular expressions forum[^] - you should use that in future.
But, it's a Sunday, and I'm feeling generous!
If you name your groups instead of using anonymous groups it becomes clearer what the problem is:
member/filter(?<Prefix>.*)(?<Option>/[^/]+)*
Shows that all of the matches are in the Prefix group: nothing gets as far as the Option group because the "any character, repeated" clause in the prefix swallows the option text as well.
Get a copy of Expresso [^] - it's free, and it examines and generates Regular expressions.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
modified 11-Dec-11 8:02am.
|
|
|
|
|
I second using the correct forum in the future.
benams wrote: (/.+)*
I've never gotten that sort of thing to work, so I expect it won't.
Try @"member/filter([^/]*)/([^/]*)/([^/]*)"
(And I like to name my groups too.)
|
|
|
|
|
I plan to make a Winforms app to sell, and am wondering how to avoid having it be pirated. I was thinking I could first get the user to create a UUID, inside of which there is his motherboard serial # and hardcode each distribution such that upon app start, there would be a check of that motherboard serial #, with the app actually running only if that matches. (I would set up a way for the customer to get a new distribution from me for other computers he may get.)
But there probably is a better way. Any ideas?
|
|
|
|
|
swampwiz wrote: But there probably is a better way. Any ideas?
Yes, don't bother.
You're wasting time on people who for the most part are not going to pay anyway, no matter what you do. You could use that time to actually make your program better. The idea you describe (and most others) only make it harder for legitimate users to use the program - suddenly they have to go through some sort process when they get a new computer? And the pirated version will just skip the UUID check (or whatever) entirely. Many paying users will then pirate the app even though they paid.
There are a couple of things that work to some degree:
- dongles (or other custom hardware). These things always break and cost a fortune for you just to set up the infrastructure. Only worth it for corporate applications that cost thousands per seat or if you intend to create a whole new platform.
- moving the functionality to a server. Works best if it's inherently an online program (multiplayer game etc), otherwise users will hate you.
- making the app free. Maybe with ads, or in-app purchases. Some may mess with that, but large scale piracy is unlikely because there isn't much to save.
Anything else can be broken, and will be, if the app is popular enough. And if it isn't popular, why waste time on such things?
|
|
|
|
|
Spot on!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
If you want to avoid piracy then only distribute your app on a single box that is disconnected from the internet. Otherwise there is no foolproof method. If they want it badly enough they will hack it
No comment
|
|
|
|
|
swampwiz wrote: how to avoid having it be pirated
Just make it so no one wants it (which is very likely anyway) and no one will steal it.
I'd rather have a lot of people using my free program.
modified 10-Dec-11 15:27pm.
|
|
|
|
|
Anything that runs on the users machine can be pirated, simply by duplicating the complete environment. ..and you don't want to;
Pirates aren't people who would have bought your product, hence, you are not losing any money (forget what the ad on copy-protection says), but you are gaining a user-base and valuable market-share.
Microsofts dominance is due to the fact that the product was easily pirated, and that has made it the most distributed OS. Once that particular pirate needs your product in a formal setting (say, within their company), they'll close that buy - and that's a sale that you loose if your product is hard to distribute.
Bastard Programmer from Hell
|
|
|
|
|
First get them hooked, then get them paying... Does make me think of some other market which seems to be very profitable
Cheers, AT
Cogito ergo sum
|
|
|
|
|
Addy Tas wrote: First get them hooked, then get them paying...
Called a vendor-lock in.
Addy Tas wrote: Does make me think of some other market which seems to be very profitable
Marketing?
Bastard Programmer from Hell
|
|
|
|
|
I have created a wcf service which is returning data in json format.
Only issue is that when i call the function it is creating a file instead of returning it as a string,
can any one help where i am doing wrong
[ServiceContract]
public interface IService1
{
[OperationContract]
[WebGet(BodyStyle= WebMessageBodyStyle.Wrapped,
RequestFormat=WebMessageFormat.Json,
ResponseFormat=WebMessageFormat.Json,
UriTemplate="players"
)]
List<Person> GetAll();
}
<services>
<service name="coopWCF.Service1" behaviorConfiguration="Service1Behavior">
<endpoint
address=""
binding="webHttpBinding"
contract="coopWCF.IService1"
behaviorConfiguration="AjaxBehavior">
</endpoint>
</service>
<behavior name="AjaxBehavior">
<webHttp defaultOutgoingResponseFormat="Json" />
</behavior>
|
|
|
|
|
You may get better help on this by posting it in the correct forum[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|