<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ladysign Dev Blog &#187; trick</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/trick/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Javascript: Frame Hijacking Phishing</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/javascript-frame-hijacking-phishing/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/javascript-frame-hijacking-phishing/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:44:25 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[frame]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hijacking]]></category>
		<category><![CDATA[How to Hijack]]></category>
		<category><![CDATA[How to phish?]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[screenscraping]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=71</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 5 out of 5 stars</p>
<p>This hack is often used for frame hijacking/phishing technics. Imagine there&#8217;s a webpage (not yours) on where you c[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/javascript/javascript-frame-hijacking-phishing/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 5 out of 5 stars</p>
<p>This hack is often used for frame hijacking/phishing technics. Imagine there&#8217;s a webpage (not yours) on where you can not run code on. For example in Salesforce there are pages on which you can not implement your own code.<br />
I found out a way how you can manipulate others pages; and it&#8217;s so damn mean. (gnehgnehgneh).</p>
<p>Before showing you any code I will tell you the basics of this idea:<br />
1. Let the user go to a different URL then the one they want.<br />
2. This page contains only an iframe of the requested page, the user wants to see.<br />
The iframe loads 100%, so the user won&#8217;t see a difference. (And ofcourse you can also trick the URL adress in the adress bar so the user can not read it aswell.)<br />
3. Beside the iframe, this fake page also contains code. With this code you are controlling the codes within the iframe. (Yes you can, it&#8217;s all about DOM scripting baby!)</p>
<p>Allright, show me the money!</p>
<p>First you&#8217;ll have to add the secret iframe in your HTML. This is no rocketscience; just make sure you give the iframe an ID so you can trigger it later on. An onload javascript function. And it&#8217;s much nicer if you give a 100% width and height, scrolling 1 and frameborder and margin 0. So you almost can not see the iframe.</p>
<pre class="brush: xml; title: ;">
&lt;iframe id=&quot;theLoadedPage&quot;
	src=&quot;http://www.blankURL.com&quot;
	onload=&quot;hjackFrames('theLoadedPage')&quot; name=&quot;theLoadedPage&quot; width=&quot;100%&quot;
	height=&quot;100%&quot; scrolling=&quot;1&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot;
	marginheight=&quot;0&quot;&gt;
&lt;p&gt;Loading...&lt;/p&gt;
&lt;/iframe&gt;
</pre>
<p>If you are a perfectionist like me, then add some extra css styles, to make it even more nicer; and let the iframe overrule the orginal screen.</p>
<pre class="brush: css; title: ;">
html {
	overflow: hidden;
}

html,body {
	width: 100%;
	height: 100%;
	margin: 0px;
	padding: 0px;
}

iframe {
	overflow: hidden-x;
}
</pre>
<p>Now start writing the code trick.<br />
First you&#8217;ll need a main function, which request the page in the iframe on 100%.</p>
<pre class="brush: jscript; title: ;">
function main() {
	var loadPageSrc = document.getElementById(&quot;theLoadedPage&quot;);
	loadPageSrc .setAttribute(&quot;src&quot;,&quot;http://www.newLoadedPage.com&quot;);
}
</pre>
<p>Now here&#8217;s the hack. I built it in a try/catch closure handle errors.</p>
<pre class="brush: jscript; title: ;">
function hjackFrames(id){
try {
		var frame=document.getElementById(id);
		var inside;
		if (frame.tagName!='IFRAME'){
			return;
		}

		inside=window.frames[id].document.getElementsByTagName('BODY')[0];

/* this part is not part of the hack, but from here you can manipulate the page,
for example; hide all submit buttons. */
		var allInputs=[];
		allInputs=inside.getElementsByTagName('INPUT');
		for (var i=0;i&lt;allInputs.length;i++){
			if(allInputs[i].type == &quot;submit&quot;){
				allInputs[i].style.display = &quot;none&quot;;
			}
		}

} catch(err) {
                  /* do other nice things, here since the hack is failing */
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/javascript-frame-hijacking-phishing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce trick: load hidden s-control on every page</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:38:14 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[s-control]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=67</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>This is one of my first Salesforce hacks; this trick will learn you how to load an hidden S-Control on every Salesforce p[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>This is one of my first Salesforce hacks; this trick will learn you how to load an hidden S-Control on every Salesforce page:</p>
<p>My S-Control is &#8220;hidden&#8221; using a style sheet command. The &#8220;hint&#8221; that there is an embedded S-Control is a message on the sidebar that reads &#8220;Field Level Help Enabled&#8221;.</p>
<p>Basically, you write an S-Control, then create a custom home page component of type &#8220;HTML&#8221;, choose the &#8220;show HTML&#8221; checkbox, and type in the following code:</p>
<pre class="brush: xml; title: ;">
&lt;iframe src=&quot;/servlet/servlet.Integration?lid=XXXXXXXXXXX&quot; style=&quot;display: none&quot;&gt;&lt;/iframe&gt;
</pre>
<p>After you save this change and add it to the home page sidebar, it will execute on any page that includes the sidebar. The &#8220;lid&#8221; parameter is the ID of the S-Control to execute.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

