|
I know how to program but I am not an expert that what I mean
|
|
|
|
|
Why write code to do this when just about every proxy server already does this?
|
|
|
|
|
Call it what it is: spyware.
For you and a few thousand others, this seems to be the only "productive" thing you can find to do.
In the "old" days, there were "quota" systems. So what if someone hits some "bad links" (by accident or otherwise) if the work is getting done.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Andiko wrote: 3. How to send and store result to remote db for further processing?
Just that says that you need a far less ambitious project to work on. Create a inventory control system, a regular one.
|
|
|
|
|
Hi,
I am getting strange issues when I tried to open my solution in VS 2013, there was no problem till Friday, these problems suddenly appeared. when I am trying to modify the Web Config of my WCF Service its giving me these errors within within VS
No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
RequiredTypeIdentity Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
When I am trying to run the application, VS is closing automatically, can anybody please help me, I am really not understanding what VS is trying to do, but help is needed, any help would be greatly appreciated - thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
|
|
URL's passing as a question
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Hello to all,
I am struggling to find a way to get MAC address ONLY from the ethernet card in my PC.
It's easy when my PC is not connected on the VPN:
Function getMacAddress()
Dim nics() As NetworkInterface = _
NetworkInterface.GetAllNetworkInterfaces
Return nics(0).GetPhysicalAddress.ToString
End Function
But if it's already connected then the first (0) device is ethernet card of the server that I'm connected and my ethernet is second (1) device so I don't know how to determine.
This is showed on the image on this link: https://postimg.org/image/4ndewjjhz/
Any help is very appreciated!
|
|
|
|
|
No, it's NOT the network interface of the server you're connected to. You cannot get remote MAC adresses.
What you're getting is the MAC of the virtual network adapter created by the VPN software.
Dump the data on all the adapters returned, not just the first one.\
MAC addresses are not assigned to machines. They are assigned by the manufactures of the network adapters, or a generated in software for the adapter.
MAC's can NOT be used as a unique identifier for any purpose. They are NOT unique to any machine!
|
|
|
|
|
Hi Dave,
So what do you suggest to use as the unique identifier?
|
|
|
|
|
You didn't say thing about the type of app you're writing, but typically, I'd generate a GUID and send that to the client and it stores it appropriately, passing it back to the server as appropriate when needed.
|
|
|
|
|
Actually I have made an Windows Form application and I am trying to protect it by giving a specific activation code generated by some machine id or something like that. I read about many different ways of getting unique hardware serials but there is no perfect solution cause hardware components can be cloned or replaced. I agree with you about activation through server but I would like to make possibility to make also offline registration.
|
|
|
|
|
Honestly, the copy protection problem has never been solved, by any vendor. It's a waste of your time and, more importantly, your customers time.
My primary job is software repackaging for deployment in the enterprise environment. Trust me when I tell you, as a customer, licensing is a giant pain in the ass.
Normally, vendors use the data submitted about the customer, such as company name, contact name, phone number, address, email address, and whatnot, run all that through an algorithm to generate a license key file. That license file is checked for validity by the application on launch.
But, in all cases, if someone wanted to hack your app and take out the license validation, there's nothing you can do to stop them.
DO NOT TRY AND "ROLL YOUR OWN" LICENSING SOLUTION. You'll end up making it ridiculously easy to break. Use a commercial solution. Google for "C# licensing framework".
|
|
|
|
|
Dave,
Thank you so much for the great advice!
I will keep in mind all your words.
All the best,
Danijel
|
|
|
|
|
I'm creating a "Find In Files" application for my own use in VB.net. After seeing all the problems people have working around UnauthorizedAccess exceptions, I used a windowless call to cmd.exe to get a directory list and sent it to a text file like so:
sw.WriteLine("dir/s/b/ad >" & ChrW(34) & dataPath & ChrW(34))
This avoids directories to which I don't have access, and it's pretty fast. But since I didn't see this anywhere else, I have to assume either I'm a genius or this is a really bad idea (probably the latter).
I thought I might upload the project to CP when it's done, so my question is whether this is considered an acceptable practice or should I work on a different method of enumerating the directories?
Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.
|
|
|
|
|
"Acceptable" to who?
I would say there are more options than you may have considered; e.g. piping batch files; shell scripting; running app at admin level.
There are very few "new" ways of doing things; only existing ways that can be improved upon.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
|
Richard MacCutchan wrote: Why make things more complicated than they need to be?
Because this allows UnauthorizedAccess exceptions to occur. As Eddy says below, this may be due to running in debug mode. Just now getting back to the project so I'll try running it outside the debugger. Also once the directory list is created I'm using Regex to search inside files, which GetFiles doesn't support. I'm learning as I go here. Thanks.
Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.
|
|
|
|
|
You can also try one of Directory.EnumerateFileSystemEntries Method (System.IO)[^] which can list the contents of a single directory, and optionally, subdirectories.
Alan Burkhart wrote: I'm using Regex to search inside files, which GetFiles doesn't support I don't understand what that means. Once you have a list of filenames you still need to open and read each one in order to search the contents.
|
|
|
|
|
Richard MacCutchan wrote: I don't understand what that means. Once you have a list of filenames you still need to open and read each one in order to search the contents.
Just that Regex provides a few more options without slowing down the search.
Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.
|
|
|
|
|
If the Directory.GetFiles was slow for you with UnauthorizedAccessException's, then it is because there was a debugger attached.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Just now getting back to the project. Will try running outside the debugger and see what happens. Thanks.
Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.
|
|
|
|
|
Hi everybody
I want to delete lines in text file based on search criteria entered in textbox.
My text file is like this:
[account]
user = usertest
pwd = test
description = test
date = "21/03/2018"
address = "blah bla"
email = "yyyy'
[account]
user = usertest2
pwd = test2
description = test2
date = "21/03/2019"
address = "atatatta"
email = "ccccc'
when i enter in textbox (usertest) for deleting I want to delete all lines of this user.
I have tried something but I am not able to delete all lines
Dim sw2 As String = IO.File.ReadAllText(textpath)
Dim Lookfor As String = txtuser.Text.Trim()
If sw2.Contains(Lookfor) Then
sw2.remove
Please help
|
|
|
|
|
1) Split string on "[account]"
2) Remove element containing "user = xxx" from split string collection
3) Rejoin remaining elements into a string; using "[account]" + newLine as a delimiter.
(Looks like an ".ini" type of file; you might find a ready made solution on Google for ".ini" files).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|