Saturday, December 31, 2016
Googles Dynamic Feed Wizard feeding Facebook problem and hacked solution
Googles Dynamic Feed Wizard feeding Facebook problem and hacked solution
Googles Dynamic Feed Wizard is really good.
http://www.google.com/uds/solutions/wizards/dynamicfeed.html
BUT I found a problem with facebook feeds. The feed displayed fine BUT the links to go to external feed or items were relative links to local site.
e.g. /posted.php?id=199235386657&share_id=155115854527260&comments=1#s155115854527260 instead of:
http://www.facebook.com//posted.php?id=199235386657&share_id=155115854527260&comments=1#s155115854527260
This is where were using it: http://lhra.info/
See also the changed javascript: (hardcoded for facebook feed as it is at current moment in time = Oct17 2010) http://lhra.info/gfdynamicfeedcontrol_forfacebook.js
Also changed is ability to default title link to not what is returned by RSS feed.
wwwLHRA$ diff -u gfdynamicfeedcontrol.js gfdynamicfeedcontrol_forfacebook.js
--- gfdynamicfeedcontrol.js 2010-10-17 01:23:52.000000000 +0100
+++ gfdynamicfeedcontrol_forfacebook.js 2010-10-17 02:39:08.000000000 +0100
@@ -27,7 +27,7 @@
this.feeds = [];
this.results = [];
-alert("debug feedUrls:"+feedUrls);
+//alert("debug feedUrls:"+feedUrls);
if (typeof feedUrls == string) {
this.feeds.push({url:feedUrls});
@@ -45,7 +45,7 @@
o.title = s.replace(//g, >);
}
}
-alert("debug maybe url:"+o.url);
+//alert("debug maybe url:"+o.url);
this.feeds.push(o);
}
}
@@ -115,7 +115,8 @@
sortByDate : false,
horizontal : false,
stacked : false,
- title : null
+ title : null,
+ titleurl : null
};
if (options) {
@@ -162,7 +163,7 @@
// The feedControl instance for generating entry HTML.
this.feedControl = new google.feeds.FeedControl();
this.feedControl.setLinkTarget(this.options.linkTarget);
-alert("debug this.options.linkTarget:"+this.options.linkTarget);
+//alert("debug this.options.linkTarget:"+this.options.linkTarget);
// The feeds
@@ -174,7 +175,7 @@
feed.setResultFormat(google.feeds.Feed.JSON_FORMAT);
feed.setNumEntries(this.options.numResults);
feed.load(this.bind_(this.feedLoaded_, i));
-alert("debug feed "+i+" :"+feed);
+//alert("debug feed "+i+" :"+feed);
}
};
@@ -217,6 +218,14 @@
if (this.feeds[index].title) {
result.feed.title = this.feeds[index].title;
}
+//alert("debug result:"+result+" tit:"+result.feed.title);
+//alert("debug feed i:"+index+" result:"+result+" tit:"+result.feed.title+" lin:"+result.feed.link);
+ var entries = result.feed.entries;
+ // CHANGE RELATIVE Facebook URL to ABSOLUTE for use in external page
+ for (var i = 0; i < entries.length; i++) {
+ //alert("debug ent i:"+i+" e:"+entries[i]+" tit:"+entries[i].title+" //lin:"+entries[i].link);
+ result.feed.entries[i].link="http://www.facebook.com/"+entries[i].link
+ }
this.results.push(result);
if (!this.started) {
@@ -375,9 +384,14 @@
this.clearNode_(el);
var link = document.createElement(a);
link.target = google.feeds.LINK_TARGET_BLANK;
- link.href = resultFeed.link;
+ // SET The URL the feed title links to (was http://www.facebook.com, we wish to link to facebook/ourgroup)
+ if (this.options.titleurl == null) {
+ this.options.titleurl = resultFeed.link;
+ }
+ link.href = this.options.titleurl;
link.className = gfg-collapse-href;
link.innerHTML = resultFeed.title;
+//alert("debug title link:"+link+" link.href:"+link.href);
el.appendChild(link);
}
@@ -408,10 +422,13 @@
var className = gfg-listentry ;
className += (i%2)?gfg-listentry-even:gfg-listentry-odd;
var listEntry = this.createDiv_(className);
-alert("debug entry create link:"+entries[i].link+" title:"+entries[i].title);
- var link = this.createLink_("http://www.facebook.com/"+entries[i].link,
+//alert("debug entry create link:"+entries[i].link+" title:"+entries[i].title);
+ // adjusting the link URL here (from relative to absolute) worked for list elements but not selected item
+ //entries[i].link="http://www.facebook.com/"+entries[i].link
+ var link = this.createLink_(entries[i].link,
entries[i].title,
this.options.linkTarget);
+
listEntry.appendChild(link);
if (this.options.pauseOnHover) {
listEntry.onmouseover = this.bind_(this.listMouseOver_, resultIndex, i);
Javascript debugger (Venkmann+Firefox) a bit crashy, hence the old alert("") style debugging.
One thing to do to change this from hack to good solution would be detect relative URLs (look for beginning which is not http:// or file:// ...) and do the right thing.
Surprised grepping internet to not find people finding this problem ... ?
Available link for download
Thursday, October 13, 2016
How not to get Hacked – Choosing the Right Password
How not to get Hacked – Choosing the Right Password
Its a digital nightmare when your password gets hacked. Password compromise = your are fucked, straight away. And if you do happen to be at an important position in a firm, and unfortunately find yourself the root cause of companys security problems, its time to learn a few basics of choosing the right password. Be it your Email ID, terminal login, voicemail or anything that uses a generic password protection system,you need to choose a secure password for your digital ventures. Nevertheless, this simple guide is applicable to every netizen online who wants to secure himself by choosing the right password. Cause in the end, its your password that makes it easy, or hard for attackers to gain access to your account.
About Bad Passwords
Poor weak passwords have the following characteristics (if you have even one,make sure to change it) -
- Password size less than 15 characters
- Password is a word from dictionary
The password is -
- Name of family,pet,your favorite videogame character.
- Computer terms,commands,website name,hardware,software etc.
- Personal data like birthday,mobile phone numbers, address etc.
- Any of the above spelled backwards! or succeeded or preceded by a number or letter (password1, 1 password)
- In short any form of personal stupidity leads to tragic events :P
How to get hacked ?
- Reveal your password to any one.
- Reveal it in an email message,phone call,to your boss, give hints to others,share it with friends and co workers.
- Write it down somewhere.
- Keep same passwords for all your digital ventures, like emails, voicemails etc
- NEVER CHANGE IT.
In any case, if you want the opposite, follow the opposite :)
Making a STRONG Password
use phrases to form passwords, these are much secure to form and hard to guess.
for eg, the phrase -
This is a super secure password and is hard to hack :P
will form a password given below by taking the first letter and substituting similar sounding words with numbers. See..its quite hard to hack :)
Tiassp&ih2h:P
Use numbers, letters, uppercase and lowercase and mix them freely to form you password. make sure its not a dictionary word and DOES NOT CONTAIN any characteristic of weak passwords stated earlier.
A more secure version is to use passphrases to form passwords. A passphrase is a longer version of password and hence its more secure. Make sure its easy to remember,not a famous quotation and hard to guess by intuition
As Clifford Stoll says,
Treat your password like your toothbrush. Dont let anybody else use it, and get a new one every six months
He is damn right..just make sure you change it every month or more often to be secure.
I guess you will now be able to form secure passwords and deploy them fully.
Like This post ? You can buy me a Beer :)
Posted by XERO. ALL RIGHTS RESERVED.
Available link for download