w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Are UDP Packets dropped when UDP header checksum is incorrect?
Yes they would be dropped. If you need more reliable communication you're much better off using TCP. for more information, take a look at this: http://www.diffen.com/difference/TCP_vs_UDP UDP there's no guarantee that the packets will even be sent, let alone received. If they are in fact received though, they are checked. If they fail checksum they are dropped. EDIT: also to add to that, udp does not by default order the packets as they are sent, that has to be done at the application level. Bear this in mind if you still intend on using UDP.

Categories : C++

tcpdump returns 0 packets captured, received and dropped
tcpdump is the right tool to dump ip packets. But if your openstack security group rules blocks ICMP, 0 ICMP packets are expected. I just want to understand what do you mean by "cannot connect to the virtual machines at all". ping command doesn't work? or other protocol like ssh or HTTP. Generally the first common problem when connecting to OpenStack VM is the security group rules. the default one disallow ICMP protocol. You can run the following command to see the rules: nova secgroup-list: it usually returns a default one nova secgroup-rules-list default: it will show the defined rules. where there must be at least one rule to allow ICMP protocol. Here's the official doc to tell how to add rules allowing ICMP and SSH.

Categories : Linux

Packets dropped by kernel during load testing of haproxy -> node.js -> db
The tcpdump errors are a red haring (meaning they are not related to your problem). TCPDump tries to stay out of the way of impacting system performance. If the system would get backed up for something that tcpdump is doing then it will simply drop the packet instead of inspecting it. This does not mean that the system or network stack is dropping packets. Try adding the "-n" switch to tcpdump. -n Don't convert addresses (i.e., host addresses, port numbers, etc.) to names. Unless you have a caching DNS server like dnsmasq installed, nscd is more than likely disabled. This means that for every connection that comes in tcpdump will try to do a reverse dns lookup. I bet that by adding the -n your "dropped packets" go away. Your real problem sounds to me like you are either overwhe

Categories : Node Js

Creating firewall rules using iptables
Yes and no. No because: iptables works by defining how to treat packets based on their categorization into chains (INPUT, OUTPUT, FORWARD, ...) first and only then also on specific characteristics (source or destination address, protocol type, source or destination port, etc). You can never define an iptable rule that does not apply to a specific chain. INPUT, OUTPUT, and FORWARD are the default chains of the iptables system. INPUT addresses everything with destination localhost (i.e. that is addressed to your network device); OUTPUT applies to everything with source localhost (i.e. that comes from your computer). Yes because: You can define custom chains. You can do that like so sudo iptables -N MYCHAIN then you can send packets from both the INPUT and the OUTPUT (and if you like t

Categories : Linux

Add firewall rules to a vApp Network with PowerCli 5.1
I found the answer, here is is for anyone else who needs it. $vAppNet = Get-CIVAPP 111 | Get-CIVAppNetwork vApp_Network $vApp = Get-CIVAPP 111 $networkConfigSection = (Get-CIVapp 111).extensiondata.GetNetworkConfigSection() $vAppNetwork = $networkConfigSection.NetworkConfig | where {$_.networkName -eq "vApp_Network"} $fwService = New-Object vmware.vimautomation.cloud.views.firewallservice $fwService.DefaultAction = "drop" $fwService.LogDefaultAction = $false $fwService.IsEnabled = $true $fwService.FirewallRule = New-Object vmware.vimautomation.cloud.views.firewallrule $fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule #First Rule $fwService.FirewallRule[0].isenabled = $true $fwService.FirewallRule[0].description = "Allow all outgoing traffic" $fwServic

Categories : Powershell

Windows Firewall inbound rules and environment PATH variable
Despite setting the inbound firewall rule to allow any connections to 'java', hoping it would pick up the environment PATH value, I still couldn't get the connection working. In the end changing the jenkins.xml file to not use the 'java' PATH variable and instead use 'C:Program FilesJavajre7injava.exe' and setting the inbound firewall rule back to match this worked. Interesting that Windows saw the PATH variable and the literal file path so differently that it didn't satisfy the firewall rule (perhaps it's by design and a security feature?).

Categories : Misc

Using .NET desktop application with DevExpress over Remote Desktop
I'm working with DevExpress .Net controls (and moreover sometimes with their controls source code) since 2007. And it seems I know the possible reasons of visual drawback of these controls under RDP. These reasons are: - Skinning technology (which is bitmap-based) - Double-buffered painting So, let me explain. When the user is connected via a Remote Desktop Connection, all drawing operations performed by control are transferred over the network connection to the RDP client for display. If control draw a line, the "DrawLine" command is sent over the network to the client. If control draw a text, a "DrawText" command is sent (along with the text to draw). But if control draw a bitmap, the entire bitmap needs to be transferred over the network. Thus this can be a main bottleneck when using

Categories : Dotnet

Configure Firewall for Remote Debugging Dialog pops up for local database
This is generally required when you are connecting from a different computer rather than where the database engine exists. But I have observed that the problem also can occur if you are specifying computer name or ip address instead of specifying loop back address (127.0.0.1) or (local) as server name even though the database engine is on local machine. In such case, the debugger needs to be configured. Details of how to configure are here

Categories : Sql Server

Remote client doesn't receive UDP packets
You don't need to do port forwarding for the client side, NAT takes care of that automatically. http://en.wikipedia.org/wiki/Network_address_translation Your client might not be reachable for different reasons (firewall, etc.).

Categories : Java

Remote Desktop Application
You need to right click on toolbox and select choose items There go to COM tab and select and there you select Microsoft Terminal Services Client control Now you'll find a remote desktop connection in your toolbox..Drag and drop on to your form That's it :)

Categories : Vb.Net

Remote Desktop for Android
create java server which can send screen snapshots to android device via wifi and android client which can receive images and display on screen. you have use socket programming for this. use asynctask at client side .

Categories : Android

What would be the most practical place to implement error logging in a 3-tiered desktop app?
I agree with you that if you have a traditional 3-tier desktop, then error handling and logging in the presentation layer makes the most sense. Where it gets to be a debate is if you are going to have a non-presentation layer interfacing with your other layers (business and data-access); like a web service for instance. Having a logging and error handling layer is the approach I see most often used in those scenarios.

Categories : C#

copying files from remote desktop using php
Yeah you can copy files from remote server if you have previlliages/rights here is link <?php if(!@copy('http://someserver.com/somefile.zip','./somefile.zip')) { $errors= error_get_last(); echo "COPY ERROR: ".$errors['type']; echo "<br /> ".$errors['message']; } else { echo "File copied from remote!"; } ?>

Categories : PHP

Error in 3D rendering with xtk on Remote Desktop
OpenGL doesn't work with remote desktop because remote desktop opens up another desktop and isn't attached to the hardware display, thus I would assume WebGL has the same limitations. You will need to do a different type of remote desktop maybe vnc or even join.me seems to work fine.

Categories : Misc

Azure Remote Desktop Traceability in a Cloud Service
There have been a few changes since the link you mentioned is published: You can now enable/disable remote desktop through the portal. You don't have to do it at the time of publishing your cloud service. Using this, you can provision remote desktop connections for individual users in your team instead of relying on one shared RDP connection. To do so, click on CONFIGURE tab for your cloud service and then click on Remote icon and follow the instructions. The thing you do on portal with remote desktop can also be done programmatically using Service Management API. With the latest Service Management API release, RDP functionality is basically an extension which you can enable/disable on the fly. I wrote a blog post not too long ago describing this functionality: http://gauravmantri.com/20

Categories : Security

Copy local text file to remote desktop
Well, first of all, you are missing a space after the "Copy": ExecuteCommand("Copy" & Directory.GetCurrentDirectory & ... that will turn into (given that the current directory is "C:MYDIR" as an example) cmd.exe /kCopyC:MYDIR The lack of a space after the /k option to cmd.exe is not a problem, but looks awkward. I'd put one there as well. Second, the "\myservername -u username -p password C$Files.txt" looks just wrong. That should probably be "\myservernameC$Files.txt" following your example. Username and password makes no sense at this point and in the context of the Copy command (copy past error?). Then you have some bogus(?) line wrappings in the "ExecuteCommand..." example of your question. Could be that those are causing more issues but this is hard to tell as it stand

Categories : Dotnet

Windows Azure VM Remote desktop connection issue
RDP port (3389) is widely blocked from network administrators of most corporations. What you need to do is either of: Talking with your network administrator at work and ask for permission to use RDP port to connect to your Azure Virtual Machine Configure different public port for the RDP Endpoint. Setting it to 443 (the HTTPS Standard port) or 22 (Standard SSH port) might solve the issue without contacting system administrator Of course, if you use that VM for Secure Web (which works on 443) you have to chose another port number.

Categories : Windows

How to use InputSimulator to simulate specific keys on Remote Desktop?
As suggested i copy my solution as an answer. I hope these will help for anyone working on similar problems. :) The solution is a bit long, but the problem was not only 'how-to-press a button programatically', but also 'how-to-make it work via remote desktop' and 'how-to-make a general solution for different keyboards'. Well, im not 100% sure that the last problem is completely solved, but the solution below may be used for further developing. I also know that the code is not optimal and sometimes ugly, but im still testing and developing it! :) //m_text is the whole text i want to write. It may contain special characters, //like 'enter', 'tab', lower/upper-case chars, and chars with shit/alt is //pressed, like ';'. //Test with this string, its difficult-enough. :)

Categories : C#

can't access remote desktop's opened tcp from local system
Also if it's a firewall issue then rather turning the firewall you can write inbound and outbound rule for specific port. Turning your firewall on server is a dangerous compromise with security.

Categories : Misc

how to Diogenes users that login with remote desktop in windows xp by programming with c#
[DllImport("wtsapi32.dll")] static extern IntPtr WTSOpenServer([MarshalAs(UnmanagedType.LPStr)] String pServerName); [DllImport("wtsapi32.dll")] static extern void WTSCloseServer(IntPtr hServer); [DllImport("wtsapi32.dll")] static extern Int32 WTSEnumerateSessions( IntPtr hServer, [MarshalAs(UnmanagedType.U4)] Int32 Reserved, [MarshalAs(UnmanagedType.U4)] Int32 Version, ref IntPtr ppSessionInfo, [MarshalAs(UnmanagedType.U4)] ref Int32 pCount); [DllImport("wtsapi32.dll")] static extern void WTSFreeMemory(IntPtr pMemory); [DllImport("Wtsapi32.dll")] static extern bool WTSQuerySessionInformation( System.IntPtr hServer, int sessionId, WTS_INFO_CLASS wtsInfoClass, out System.IntPtr ppBuffer, out uint pBytesReturned); [StructLayout(LayoutKind.Sequential)] private str

Categories : Windows

Check whether application is running under Terminal Services as opposed to Remote Desktop
One way is to use the below code: string s = System.Environment.GetEnvironmentVariable("SessionName"); If the value of s is "Console", it could be running in terminal services. On the other hand, if the value is something like "RDP-Tcp#01", it is running under Remote Desktop.

Categories : C#

What DLL do I need to place at system32 to connect to remote MSSQL using VB6
Your connection string will only work if you have SQL Server installed as a default instance (because it will default to port 1433). If SQL Server is installed as a named instance (the default for SQL Express), then it will use a random port number. Do this... On the server, Click Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> Microsoft SQL Server Configuration Manager Expand SQL Server Network Configuration Click on Protocols Make sure TCP/IP is enabled Right click on TCP/IP Click Properties Click IP Addresses Scroll down to IPAll. Take note of the TCP Dynamic Ports. Once you determine the port to use, then you can modify your connection string. Provider=SQLOLEDB;Password=1234;Persist Security Info=True;User ID=sa;Initial Catalog=test

Categories : Sql Server

Remote Desktop not working with Windows Azure Cloud Service. "Legacy plugin RemoteAccess is found in role"
Turns out you can't have parts of your username in your password for some reason. I also ran into credential caching problems which is solved here - http://www.c-sharpcorner.com/uploadfile/ae35ca/windows-azure-fixing-reconnect-remote-desktop-error-the-specified-user-name-does-not-exist-verif/

Categories : Visual Studio

Application with libpcap can only capture all the packets when tcpdump is opened, or only can capture few packets,how to resolve it?thanks
If you're calling pcap_open_live(), you're probably passing 0 as the ''promisc'' argument. If you're calling pcap_create() and pcap_activate(), you're probably not calling pcap_set_promisc() between those calls (or are passing pcap_set_promisc() a ''promisc'' argument of 0). I.e., you're probably not turning promiscuous mode on, so your machine is only capturing traffic to and from your machine, not other traffic on the network. Tcpdump, by default, turns promiscuous mode on, so, while it's running, the adapter on which you're capturing, which is probably the same adapter as the one on which tcpdump is capturing, is in promiscuous mode, and you'll see other traffic on your network.

Categories : Misc

Delphi6: Need to know is my application running in console session or remote desktop session
I use the following const SM_REMOTESESSION = $1000; if GetSystemMetrics(SM_REMOTESESSION) <> 0 then begin // you are in a remote session end Per the MSDN page for GetSystemMetrics: SM_REMOTESESSION = 0x1000 This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services client session, the return value is nonzero. If the calling process is associated with the Terminal Services console session, the return value is 0. Windows Server 2003 and Windows XP: The console session is not necessarily the physical console. For more information, see WTSGetActiveConsoleSessionId. I am using this in Delphi 2007 and the function is defined in the Windows unit, but I did need to define the constant myself. I don't know if Delph

Categories : Delphi

MySQL connection from my desktop to remote MySQL not working
Below is the excerpt from the mySql Docs If the following error occurs when you try to connect from a host other than the one on which the MySQL server is running, it means that there is no row in the user table with a Host value that matches the client host: Host ... is not allowed to connect to this MySQL server You can fix this by setting up an account for the combination of client host name and user name that you are using when trying to connect. If the following error occurs when you try to connect from a host other than the one on which the MySQL server is running, it means that there is no row in the user table with a Host value that matches the client host: Host ... is not allowed to connect to this MySQL server You can fix this by setting up an

Categories : Mysql

Sending TCP packets via Netty, Netty is dividing the data into different packets?
If you'd like to abstract fragmentation from your handler you need to frame your messages. This can be done easily by making use of the LengthFieldPrepender when sending and the LengthFieldBasedFrameDecoder when receiving. This ensures that your message decoder only sees a byte buffer representing a full message. Note that your frame handlers should be first in your ChannelPipeline except when you are also using an SSL handler and/or compression handler in which case SSL should be first, followed by compression, followed by the frame handlers. Being first in the pipeline means that a handler will be first to handle and inbound event and last to handle an outbound event.

Categories : Java

Any specific rules for converting MySQL data to Prolog rules for exploratory mining?
You could maybe use nth1/1 and the "univ" operator, doing something like this: fieldnames(t, [id,this,that]). get_field(Field, Tuple, Value) :- Tuple =.. [Table|Fields], fieldnames(Table, Names), nth1(Idx, Names, Field), nth1(Idx, Fields, Value). You'd need to create fieldnames/2 records for each table structure, and you'd have to pass the table structure along to this query. It wouldn't be terrifically efficient, but it would work. ?- get_field(this, t(testId, testThis, testThat), Value) Value = testThis You could then build your accessors on top of this pretty easily: findThisById(X, This) :- get_field(this, X, This). Edit: Boris points out rightly that arg/3 will do this with even less work: get_field(Field, Tuple, Value) :- functor(Tuple, Table, _), f

Categories : Mysql

Do I need to convert mod_rewrite rules to Plack::Middleware::Rewrite rules if my web framework wants to support PSGI?
The benefit of PSGI is deployment flexibility. As long as you have rules in mod_rewrite, you are stuck with Apache and, therefore, not getting the full benefit of PSGI. However, as long as you are happy with Apache, I don't see a strong motivation to rewrite all of your rules. If mod_rewrite is giving you headaches, then go for it. Also consider putting your routing logic in your main app code with something like Router::Simple or Path::Router BTW, unless you are really attached to FastCGI, there' probably no reason to use Plack::Handler::FCGI. Keep Apache as your reverse proxy and your app runs in Starlet or one of the other Plack web servers.

Categories : Perl

Detect Desktop and Redirect mobile browser to Desktop Main Website
So if you want to detect a desktop trying to view the mobile version put this in your .htaccess file: Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^m.domain.com$ RewriteCond %{HTTP_USER_AGENT} !(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino [NC] RewriteCond %{HTTP_USER_AGENT} !^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|

Categories : PHP

Android VpnService to capture packets won't capture packets
Ok, it was not easy at all but I figured out how to capture packets. Since I am not extremely familiar with networking (but this new job is requesting that I am) I had difficulty with setting everything correctly. Basically after setting the right route in the VpnService.builder I got to receiving packets correctly. So: builder.addAddress("192.168.0.6", 24); // was wrong, you need to put an internal IP (10.0.2.0 for example) and builder.addRoute("0.0.0.0", 0); // needs to be this. you don't need to set up a DnsServer through builder.addDnsServer() to make it work. Hope this helps anyone!

Categories : Android

FxCop custom rules don't have a name in VS2012 (but "official" rules have a name)
This happens because the rule name (as opposed to its class type name) is not contained in the violation message in the FxCop report generated by the Code Analysis run. In theory, Visual Studio could (and probably should) look for the rule name under the <Rules> node in the report before it starts looking elsewhere. However, it doesn't in VS 2012. Instead, it only gets the rule names from rule information acquired from loaded rule assemblies. The tricky thing here is that, for UI display purposes, Visual Studio is doing a completely separate search and load of rule assemblies than is done in the Code Analysis runs. The latter is performed by running fxcopcmd.exe with a command line generated off MSBuild properties. The former uses completely separate logic embedded in the Visua

Categories : Visual Studio 2012

What is the difference between a desktop app and a non-desktop app in windows
With the introduction of Windows 8, Metro, and Windows Store, API documentations now specify which framework(s) they are supported on. Not all desktop APIs are available to metro/mobile apps, and vice versa.

Categories : Windows

Android - Where is the best place to place the "addProvider" / "Security.insertProviderAt" code line
Personally, I also don't like the idea of inserting it subclass of Application. I prefer to add this static initialising block in my main Security/CryptoManager class for security related things, whose instance you know what you will always refered to/create before doing any operation which will require SC. Just to be on safer side, you can make sure that this static block is executed by calling some method like CyrptoManager.init()

Categories : Android

How to make the function return to a certain place if invalid input takes place?
change you if to a while this way. While no selection occured the code stays on this block and only continues when a user made a selection function Choice(options) { wait() function wait() { // only proceed after a selection is made; selection = parseInt(selectedchoice); while (selection !== 1 || selection !== 2 ) { selection = parseInt(selectedchoice); } // Finding what the user selected for (var i in options.choices) { m++ if (m === selection) { //console.log("PICK IS " + i); pick = i; break } console.log(options.choices[pick].condition) if (selection >= options.choices.length || selection <= 0 || options.choices[pick].condition === false) { selection = 0;

Categories : Javascript

How to place output from an external php file to a specific place on the page
Firstly, you shouldn't be using the ID "allContent" on two separate elements. IDs are supposed to be unique. Classes can be used for styling multiple elements. Why not change it to the code below? Is there a reason you want them to be different? echo '<div class="commentBox"><p>' . 'This is from external PHP' . '</p></div>'; echo '<div class="commentBox"><p>' . 'This is also from external PHP' . '</p></div>';

Categories : PHP

how the FireWall knows if the transportation is UDP or TCP?
The header of the packets are completely different, TCP is much bigger for example. A stateful firewall needs to intercept the TCP headers to map the packets to its state table, but also stateless firewalls sometimes have techniques implemented to recognize valid TCP or UDP headers. Most home routers (broadband/wireless) make use of this when you are using port forwarding to distinguish between both protocol versions.

Categories : Security

firewall: 2-way UDP communication possible?
Yes this is called NAT traversal (or UDP punch through) and works in a similar way to TCP - the stateful NAT device is aware you recently sent a UDP packet from a certain end point internally to a certain end point outside and for a period will accept UDP packets from the same outside endpoint and forward them to the same internal end point. I always prefer the IETF docs than the plethora of conflicting information out there (including on this site): http://tools.ietf.org/html/rfc5128

Categories : Networking

Is the id of the place, returned by google place api remain constant?
Yes and no. If ID 1 is specified for Place 1, then ID 1 will never be used for another place. But, theoretically, another place with ID 2 could be created and then Place 1 is merged into it because both virtual places represent the same physical place. Then, the same queries that were returning ID 1 for this place could now return ID 2. Both ID 1 and ID 2 would be valid for this place.

Categories : Google Maps

CSS lower specificity rules override higher specificity rules
Your both rules having different meaning .parent-class p this specify the rule for p which is inside the container having class .parent-class p.child-class this specify the rule for p which has the class child-class JsFiddle Example

Categories : CSS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.