Click here to Skip to main content
       

C#

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Trying to retrieve PowerShell variables in C#memberTyson326423 Jul '12 - 2:02 
Update - I was able to achieve this by removing the IF and using the following.
 
var myvar = shell.Runspace.SessionStateProxy.GetVariable("myvar");
myLabel.Text = Server.HtmlEncode(myvar.ToString());

QuestionConnecting and disconnecting from internetmemberFred 3422 Jul '12 - 10:17 
How can we disable and enable the internet from inside of our program?
AnswerRe: Connecting and disconnecting from internetmemberWes Aday22 Jul '12 - 10:32 
Fred 34 wrote:
disable and enable the internet

 
It is highly unlikely that you are going to be writing a program that can disable or enable the internet so you must mean something else.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

GeneralRe: Connecting and disconnecting from internetmemberFred 3422 Jul '12 - 11:07 
In fact I want to disable internet for awhile to prevent spyware to access that sensitive portion of program which contains some personal information which is not coded yet. for example account number which is coming from keyboard.
GeneralRe: Connecting and disconnecting from internetmemberEddy Vluggen22 Jul '12 - 11:27 
How is that going to help? My keylogger doesn't send data when it is entered, it sends it at midnight.
 
Think again.
Bastard Programmer from Hell Suspicious | :suss:
if you can't read my code, try converting it here[^]

GeneralRe: Connecting and disconnecting from internetmvpDave Kreskowiak22 Jul '12 - 11:37 
An utter waste of time. It doesn't matter if the machine has internet access or not. Malware is still going to get this information and hang onto it until it CAN send it.

GeneralRe: Connecting and disconnecting from internetmemberFred 3422 Jul '12 - 11:42 
U are right, I did not think about it in this way.
GeneralRe: Connecting and disconnecting from internetmembersunilkpv22 Jul '12 - 23:33 
Well there are 2 crude ways to do it: (if you haven't written drivers for your connectivity interfaces Poke tongue | ;-P )
1. Enumerate all the network interfaces (non-virtual) and disable them
2. Configure a non-existent proxy server (like 0.0.0.0 port 80) for time being. After you are done with your execution reset this dummy proxy. Ensure you can backup any existent proxy settings if any.
Sunil

AnswerRe: Connecting and disconnecting from internetmemberEddy Vluggen22 Jul '12 - 10:48 
#Define "The Internet".
 
You could disable every TCP/IP adapter on my machine, if you ran under an administrative account. Then again, maintenance and support might become angry if my internet doesn't work for no good reason.
 
Keep in mind that Windows Update and the virusscanner would be affected to.
Bastard Programmer from Hell Suspicious | :suss:
if you can't read my code, try converting it here[^]

AnswerRe: Connecting and disconnecting from internetmvpLuc Pattyn22 Jul '12 - 11:09 
Fred 34 wrote:
How can we disable the internet ...

 
Sorry, I'm not going to hand you that code; would some launch codes for a nuclear missile be sufficient?
For most CP members, life would be quite different without Google, MSDN, CodeProject, and many more.
 
Sniff | :^)
Luc Pattyn [My Articles] Nil Volentibus Arduum

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid