w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

C# HttpListener and Windows Firewall
This is because HttpListener is built on top of http.sys which will listen on the port you specified on behalf of your program. I haven't found a way to allow only a single program using HttpListener through the Windows Firewall, but you might want to limit your inbound rule to system components only by: Entering typing system in the field "This program" in the tab "Program and services" Selecting protocol type TCP in the tab "Protocols and Ports" together with the port you will be listening on

Categories : C#

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

Trying to open ports via Windows Firewall, but only when process is running (Error: "Syntaxerror")
start "Origin" /DE:Origin Origin.exe Guess only: The help for start indicates that there should be a SPACE between the D and the E.

Categories : Windows

How to check if port or program is allowed in Windows 2008 firewall using netsh advfirewall commands
Yanick, Is the reason you can't use PowerShell down to the restrictions in BladeLogic? If so, we've developed a workaround for calling Powershell scripts from BladeLogic! :) -John.

Categories : Windows

In an obfuscated Windows Store App, is there any danger in including the Public Debug Symbols?
From what I can tell, Dotfuscator's GUI does have an option to "Emit Debugging Symbols": To my knowledge, the Community Edition of Dotfuscator does not have this functionality, at the least, I could not find it within browsing the options it provides. This seems to be confirmed by the Community Additions of the Visual Studio 2005 article on Dotfuscator.

Categories : C#

Is there any pattern that provide similarities of public static, private and public methods and vars in JS?
"Static" methods in JavaScript are usually achieved by simply assigning a function to a property of the constructor function object: function MyClass() {} // Constructor MyClass.staticMethod = function () {};

Categories : Javascript

Singleton object w/ Private/Public: Public function dependency problems
You can simply define the functions inside (or alongside) the constructor and just "attach" them to the new instance. This way the functions are free to refer to one another as required: function PKMNType_Engine(){ "use strict"; function getEffectiveness(defenseType, offenseType){ return 1; } return { PKMNTypes_getEffectivness: getEffectiveness, PKMNTypes_getMatchup: function(type1, type2, offensiveType){ var output = getEffectiveness(type1, offensiveType) * getEffectiveness(type2, offensiveType); return output; } }; }

Categories : Javascript

github ssh public key not found with node.js child_process.spawn() on windows, but visible on child_process.exec()
I suppose the environment variables are lost in a classic node.js spaw() function, especially HOME (which isn't defined by default in windows, and is necessary for ssh to find its keys) Maybe a spawn like win-spawn would work better: Spawn for node.js but in a way that works regardless of which OS you're using. Use this if you want to use spawn with a JavaScript file. It works by explicitly invoking node on windows. It also shims support for environment variable setting by attempting to parse the command with a regex. Since all modification is wrapped in if (os === 'Windows_NT'), it can be safely used on non-windows systems and will not break anything.

Categories : GIT

Are "public" and "public final" redundant for interface methods?
You cannot have a final method declared in an interface. Fields are always final but methods are always abstract (and never final). You cannot define an interface method that is to be implemented only by classes in the same package.* From section 9.3 of the Java Language Specification: Every field declaration in the body of an interface is implicitly public, static, and final. It is permitted to redundantly specify any or all of these modifiers for such fields. and from section 9.4: Every method declaration in the body of an interface is implicitly public (§6.6). Every method declaration in the body of an interface is implicitly abstract, so its body is always represented by a semicolon, not a block. It is permitted, but discouraged as a matter of style, to redundantly

Categories : Java

PHP OpenSSL Public Key Encryption With String Public Key
The key that you should pass to this function is a PHP resource object, and not the string representation of the key itself. $pubkey = openssl_get_publickey(base64_decode($row['public_key'])); $success = openssl_public_encrypt($data, $encrypted, $pubkey);

Categories : PHP

Cannot access public field on public inner class
The A character in int А = new Main2().А; is not a UTF-8 character, and is not the same as the one used in the variable name in the Main2 class. Copy-paste the A from the inner class and use that. It will compile.

Categories : Java

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

Symfony2 - Logging out of one firewall
Logging out clears the security-context in the session, therefore you are logged out of your second firewall aswell. You should be using roles instead of two different firewalls. ROLE_ADMIN and ROLE_CLIENT - i don't see the need for a second firewall here :)

Categories : Security

How can I install Leiningen packages behind a firewall?
Dependency Tree In order to figure out which jars your project needs you can do: $ lein deps :tree Which will show you something that is called a "dependency tree". It will look similar to: [clj-time "0.5.0"] [joda-time "2.2"] [clojure-complete "0.2.3"] [org.myproject/some-proto "0.0.1-20130523.145830-9"] [org.flatland/protobuf "0.7.2"] [ordered-collections "0.4.0"] [org.flatland/schematic "0.1.0"] [org.flatland/useful "0.9.0"] [com.datomic/datomic-free "0.8.3862"] ... Installing Jars with Lein One simple way to install manually downloaded jars would be to use "lein-localrepo": $ lein localrepo install [-r repo-path] [-p pom-file] <filename> <[groupId/]artifactId>

Categories : Clojure

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

How can I log into a firewall first before running fabric commands?
Creating a new task and fabric role should do the trick: from fabric.api import run, task from fabric.decorators import roles from fabric.state import env env.roledefs = {"firewall": ["mybox"]} @roles("firewall") @task def do_stuff_on_firewall_server(): run("some-cmd") You can run this command pretty easily: fab do_stuff_on_firewall_server

Categories : Python

How do I make my program ask for firewall permisions
Basicly, Firewall supposed to pop up automatically (in my programs it did), but if it don't you can add firewall rules programatically, as explained here or here. Also, consider asking Administrator authentication: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> Good luck!

Categories : C#

C# MYSQL - "Tunnel" past firewall
Microsoft Windows include a firewall which specifically blocks ports. If you plan on using MySQL through a network port then you should open and create an exception for this port before performing the installation. To check and if necessary add an exception to the firewall settings: First ensure that you are logged in as an Administrator or a user with Administrator privileges. Go to the Control Panel, and double click the Windows Firewall icon. Choose the Allow a program through Windows Firewall option and click the Add port button. Enter MySQL into the Name text box and 3306 (or the port of your choice) into the Port number text box. Also ensure that the TCP protocol radio button is selected. If you wish, you can also limit access to the MySQL server by choosing the Change scope butto

Categories : C#

How to add an application as Firewall exception in WiX installer
heat accepts an XSL transform argument to modify its output in any way you need. A simple XSL stylesheet can add an element to a particular File element selected via XPath. This assumes that there is only test.exe in your heat run. If that's not the case, modify the XPath in the match attribute: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix='http://schemas.microsoft.com/wix/2006/wi' xmlns:fire='http://schemas.microsoft.com/wix/FirewallExtension' xmlns='http://schemas.microsoft.com/wix/2006/wi' exclude-result-prefixes='wix' > <xsl:output method="xml" indent="yes" /> <xsl:template match="//wix:File[contains(@Source,' est.exe')]"> <wix:File>

Categories : Wix

Jenkins Slave port number for firewall
We had a similar situation, but in our case Infosec agreed to allow any to 1, so we didnt had to fix the slave port, rather fixing the master to high level JNLP port 49187 worked ("Configure Global Security" -> "TCP port for JNLP slave agents"). TCP 49187 - Fixed jnlp port 8080 - jenkins http port Other ports needed to launch slave as a windows service TCP 135 139 445 UDP 137 138

Categories : Jenkins

Symfony2 lock full site with firewall
You need to add an catch-all firewall that requires authentication, like this: - { path: ^/, roles: ROLE_ACTIVE_USER } That will make all pages that aren't explicitely listed to be accessible without authentication (i.e. with IS_AUTHENTICATED_ANONYMOUSLY) inaccessible. However, since you didn't list your homepage yet, you'll need to add that too. - { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY } Make sure to put it above the catch-all entry, as Symfony processes entries from top to bottom, and stops when it found a matching entry.

Categories : Security

display login form inside firewall
I finally fixed it, I was just confusing firewalls and access control list. As shown in the question, I had created 2 firewalls on the home page, and in symfony2, you cannot be logged in 2 different firewalls - in no way that I know - In this case, if you want to have the login form inside any firewall page, you do not manage it with the firewall, but with the access control list. # Security.yml firewalls: members_area: pattern: ^/ provider: <any_working_entity-based_provider> anonymous: ~ # To allow unauthenticated users to access the firewall --> The login form form_login: login_path: / check_path: /login_check post_only: true default_target_path: / use_referer: false logou

Categories : PHP

php can only access from local machine, it does not result from firewall
nginx is only listening to localhost server_name localhost; you need to change that to either server_name *; or server_name youraddress.com;

Categories : PHP

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

Can't update/install using composer behind a corporate firewall
I confirm being able to clone/pull/push a GitHub repo behind a firewall. And you do need https_proxy in addition of http_proxy: set http_proxy=http://<login_internet>:<password_internet>@aproxy:aport set https_proxy=http://<login_internet>:<password_internet>@aproxy:aport set no_proxy=.company (the no_proxy part is there to avoid using the proxy for internal url, internal to the company)

Categories : PHP

Forward ssh protocol via ssh tunnel | corporate firewall
Disclaimer: If this kind of connection is allowed ask your security people to enable it for you. If it is not allowed and you nevertheless use some tunneling to circumvent the security concept of your company you will get a lot of trouble! Be warned. You already managed to get to your router. In this case I would use ProxyCommand ssh router nc -w1 %h %p in your .ssh/config. This will first open a ssh connection to you router and connect to the actual target host and then start the actual ssh connection. Also git should work with this kind of setup.

Categories : GIT

How to communicate between internal Git repo behind firewall with external machine?
You can of course use git pull from external PC on Internal PC, e.g. via SSH. Or you can use the Upstream Repo to push to. Or you can open a port in the firewall to access internal PC. Which ports are open, btw?

Categories : GIT

Mac launch daemon keeps loading the firewall shell script
Use LaunchOnlyOnce key in plist file. LaunchOnlyOnce : This optional key specifies whether the job can only be run once and only once. In other words, if the job cannot be safely respawned without a full machine reboot, then set this key to be true.

Categories : Osx

symfony 2 add roles in an event listener before firewall check
Ok. I have decided to create A Firewall listener to achieve this. I followed the tutorial http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html but only created the Firewall LIstener. The token and provider I am using the one that I was already using.

Categories : Security

Grails unable to download dependencies behind proxy and firewall
Generally it depends on the requirement of the application for dependencies. Ideally below items should resolve most of the dependencies (except if you want to refer some custom repo). //With reference to BuildConfig grailsCentral() - http://repo.grails.org/grails/core grailsPugins() - http://repo.grails.org/grails/plugins mavenCentral() - http://repo1.maven.org artifactory - http://repo.grails.org/grails Additional repos are are also mentioned in BuildConfig.groovy as commented in newly created projects. (check their validity) // uncomment these (or add new ones) to enable //remote dependency resolution from public Maven repositories //mavenRepo "http://snapshots.repository.codehaus.org" //mavenRepo "http://repository.codehaus.org" //mavenRepo "http://download.j

Categories : Grails

Can I use SQL Server-2012 Express edition over a network when the FIREWALL is on
You still need to make sure you're connecting through a known port, and open that port on your firewall. In the configuration manager, open the TCP/IP settings. Under IPAll, ensure Dynamic Ports is blank and TCP Port is 1433. Then, make sure 1433 is allowed inbound on your firewall. If you have a network level firewall, check with it's administrators to make sure that port is open. Yes, network sharing will work with the professional edition with a firewall - just need to make sure the correct ports are open.

Categories : Sql Server

Using Google App Engine to Initiate Messages to a Device Behind Firewall
Since the secure data connector is deprecated, your best option is to deploy a service that will proxy the incoming requests. You have a number of options like configuring your firewall and setup port forwarding or apache reverse proxy. If your internal addresses change, then that is also the place to deal with this. For instance, you could let the DHCP server trigger a configuration change in your apache reverse proxy.

Categories : Google App Engine

Authenticating Hybrid Mobile Application with ADFS behind firewall
I assume your API (WebApi based) is hosted on Azure, right? Obtaining a token from an STS in a mobile client, usually involves delegating the authentication to a web browser (using passive profile) and then extracting the token with then it becomes available. This is often the case with STSs that don't support "Active Profile" (an endpoint where you can send client credentials and receive a security token in exchange). ADFS supports this (through WS-Trust), but you don't want ADFS exposed to the internet (you could though, and ADFS has a specific role for this without the need for a VPN). This technique is illustrated in this sample. PhoneGap will likely have an equivalent. A (simpler?) way in your case might be to get a Windows Azure AD (WAAD) account, and use DirSync to synch your AD

Categories : Authentication

Symfony2 - detect if user is inside a secure firewall
If you are into something that is ContainerAware, you may get the Request, and then the URI [see docs]: $request = $this->container->get('request'); $uri = $request->getUri(); Then you can check such string against /admin as you wish.

Categories : PHP

how to get syslog messages from Cisco firewall completely in delphi?
I am disappointed when one of when I called one of my friends and asked about this matter. he said better to not use Indy in delphi, because it is bugy. so I searched for the other components. there is an open source one. ICS(Internet Component Suite) which is working very well. you can get this open source for any delphi version or C++ Builder! see this : http://www.overbyte.be/ in product part select ICS and you can download the latest version. fortunately it has many component and it has TSysLogServer. it doesn't lose any packet of UDP. it is true that UDP doesn't guarantee no loss for packets. but when I see other programs like kiwi and wiresharks get the packets properly I should know that the source of the problem in my program is the component. so the answer for my question is:

Categories : Delphi

How do I configure NPM to Trust the firewall issuer for HTTPS proxying?
Found the solution... (Ignoring SSL Certs) npm config -g set strict-ssl false Thanks to this thread in google groups.

Categories : Node Js

FOSUserBundle : security context exception, even thou i have a default main firewall
There is no firewall for mydomain/de_DE/area configured ... that's why you have no security.context for that route. $ means end in a regex. That's why.. - { path: ^/(de_DE|de_CH)/$, role: ROLE_USER } ... will only match exactly ... yourdomain/de_DE/ yourdomain/de_CH/ ... and no other route.

Categories : Regex

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



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