What does XLLS mean? - javascript

Is there some relation between "XLLS" expression and AJAX / Javascript? What does the XLLS actually mean?
Thanks in advance
adding text from a comment below an answer
...the only result I got when I was looking for an answer on Google was the Excel XLLs but nothing related to JS. It's because I'm learning for an exam and there is a question to describe acronym "XLLS". Maybe typo?

Never heard of that in a Javascript context.
The only meaningful Google result I can see is Developing Excel 2010 XLLs
Sure you don't mean XSLT? or XSS?

Related

Zapier Python or Javascript Code for Twitter HTML

I'm using Zapier to run a search on Twitter, create a daily digest of results (Zapier Digest), and send the digest to a mailing list (Mailgun). I seek to format the Tweets similar to Twitter's own emails where the tweet isn't text but HTML where any user mention (#name, corresponding URL is https://twitter.com/[NAME]) and URL in the tweet are actual links. (I don't want the conversion for any hashtags.)
This search, extract, and replace (with added HTML) isn't that hard. But it's too much for Zapier's simple Formatter text functions. So I turned to the Zapier Code action, thinking I could borrow code as I'm not a hardcore coder.
I found Python code as below (and others at that site). After a couple hours of testing I've given up on being able to successfully adapt it for use in Zapier Code. Zapier has limitations on how it uses Python. Their documentation on it is primitive.
Could someone here familiar with Zapier help me with converting that (or similar) code so I could run it on Zapier Python or Javascript? I truly would appreciate it.
Thank you,
Marc
https://coderwall.com/p/wdtkhw/convert-links-username-mentions-and-hashtags-in-a-tweet
function twitterify($ret) {
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", "\\1\\2", $ret);
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1\\2", $ret);
$ret = preg_replace("/#(\w+)/", "#\\1", $ret);
$ret = preg_replace("/#(\w+)/", "#\\1", $ret);
return $ret;
}
David here, from the Zapier Platform team.
Marc, your main problem is that you're using a PHP snippet in our Python interpreter, which is probably why it's giving you trouble. If you have specific questions or there's something we can improve about our documentation, definitely let me know!
I'd check out the python re.sub() function instead. There's a great answer about it here. You'll also want to be able test your regex, for which there's a great site (as there are some sleight differences between PHP and Python regex. There's also a great language resource here if you want to learn more about the Python language.
​Let me know if you've got any other questions!
David,
Regarding documentation, the help page is oriented to someone who has Python or Javascript experience. I don't. The following would help.
In-code commenting. For the most part, the help just says here's what an example does and shows the code. It doesn't explain what each line of code does.
The help virtually skips to advanced examples, such as comma
separated lists. More basic examples would provide firmer ground
for newbies like me.
I continued testing and came up with the following code for Zapier Python, based on the snippet above. While it executed without error (progress!), it made no change to the #user or URL in the input data test tweet.
Marc
import re
tweetHTML = re.sub('/#(\w+)/', '#\\1', input_data ['tweet'])
tweetHTML = re.sub('#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#', '\\1\\2', tweetHTML)
tweetHTML = re.sub('#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#', '\\1\\2', tweetHTML)
return {'tweetHTML': tweetHTML}

Advanced Javascript Obfuscation

I've been training heavily in JS obfuscation, starting to know my way around all advanced concepts, but I recently found an obfuscated code, I believe it is some form of "Native Javascript Code", I just can't find ANY documentation on this type of obfuscation :
Here is a small extract :
'\141\75\160\162\157\155\160\164\50\47\105\156\164\162\145\172\40'
It is called this way :
eval(eval('\141\75\160\162\157\155\160\164\50\47\105\156\164\162\145\172\40'))
Since the code is the work of another and I encoutered it in a JS challenge I'm not posting the full code, so the example I gave won't work, but the full code does work.
So here is my question:
What type of code is this? And where can I learn more about it?
Any suggestions appreciated :)
It's just a string with the characters escaped. You can read it in the JavaScript console in any browser:
console.log('\141\75\160\162\157\155\160\164\50\47\105\156\164\162\145\172\40')
will print:
"a=prompt('Entrez "
It's just escaped characters, one part outputting the string of a query and another actually running the returned string - try calling it in a console.
eval('\160\162\157\155\160\164\50\47\105\156\164\162\145\172\47\51')
Might help?
These numbers is the ascii codes (http://www.asciitable.com/index/asciifull.gif) of characters (in Octal representation).
You can convert it to characters. This is used when somebody wants to make an XSS attack, or wants to hide the js code.
So the string what you written represents:
a=prompt('Entrez
The js engines, browsers can translate the octal format to the 'real' string. With eval function it could run. (in case the 'translated' code has no syntax errors)

obfuscating javascript code like this sample [duplicate]

This question already has answers here:
How can I obfuscate (protect) JavaScript? [closed]
(22 answers)
Closed 9 years ago.
I want to obfuscate code like that has been done here. I have only seem this type of obfuscation before with Google and other big companies. Can anyone suggest how this code has been obfuscated. Also it is better than using eval which can trigger antivirus on computers.
function app() {
var vb = '',
wb = '" for "gwt:onLoadErrorFn"',
xb = '" for "gwt:onPropertyErrorFn"',
yb = '"><\/script>',
zb = '#',
Ab = '/',
Bb = '10DBFC879A4A784134EE84443D45E2C5',
View full code on jsfiddle as it hits the characters limit on stackoverflow: http://jsfiddle.net/NJb2Y/
Also, can this code be deobfuscated? And if, how easily?
Please be sparing if this is not a right question as I would really like an answer on this.
UPDATE: I have searched for obfuscaters online however I am having a hard time finding one that does this. Almost all that I have found use the eval function.
The example you give looks like it was generated by the Google Web Toolkit (that's what the gwt stands for). GWT apps are written in Java and 'compiled' to javascript. GWT seems to have a built-in obfuscator. You may be able to look through the source code of GWT and find the obfuscation code they use.
Any obfuscated javascript code is possible to de-obfuscate. The more code there is, the longer it takes, but obfuscation can never be relied on to protect important code.

spellchecking code comments in Textmate

Does anyone know of a plugin I can use to spell check the comments in my code?
I'm always doing things like this
//Retrns porduct name in upercase
function getUpperCaseProductName(){
var productName = Myobj.currentProduct.data.name;
return productName.toUpperCase();
}
I don't know of a textmate plugin, but I'm pretty sure it does this already via Edit → Spelling, which is enabled by default for comments. Start by checking that you don't have this turned off for comments, or set to the wrong language.
It's unlikely that someone will develop a custom plugin to do something that textmate already has as a feature.
BTW, the //Retrns example you give above is joined to the two slashes. No word in the dictionary has two slashes at the start, so it may be missing it for this reason. If this is the problem, file a bug report with the textmate guys, or perhaps consider moving to a more feature-rich editor if it bothers you a lot (PHPStorm picks up that typo just fine, and you can also check the names of variables and functions if you want to be really pernickety).
Try using the Spelling option under Edit in Textmate2.
I think it does not differentiate between code and comment for Spell Check.

Using JSON in Javascript to obtain results from Google Search Ajax API

I am trying to obtain the url from the innerHTML of a web page using javascript.
This is what I'm doing:
var goog = newTabBrowser.contentDocument.getElementsByTagName("pre")[0].innerHTML;
alert(goog.responseData.results[0].url);
BUT it wont work :S
I outputted goog (using alert) and copied that into my program as follows:
var goog = {"responseData": {"results":[{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://stackoverflow.com/","url":"http://stackoverflow.com/","visibleUrl":"stackoverflow.com","cacheUrl":"http://www.google.com/search?q\u003dcache:U1GC2GYOToIJ:stackoverflow.com","title":"\u003cb\u003eStack Overflow\u003c/b\u003e","titleNoFormatting":"Stack Overflow","content":"A language-independent collaboratively edited question and answer site for programmers."},{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://en.wikipedia.org/wiki/Stack_overflow","url":"http://en.wikipedia.org/wiki/Stack_overflow","visibleUrl":"en.wikipedia.org","cacheUrl":"http://www.google.com/search?q\u003dcache:mWu8b0BQAmwJ:en.wikipedia.org","title":"\u003cb\u003eStack overflow\u003c/b\u003e - Wikipedia, the free encyclopedia","titleNoFormatting":"Stack overflow - Wikipedia, the free encyclopedia","content":"In software, a \u003cb\u003estack overflow\u003c/b\u003e occurs when too much memory is used on the call \u003cb\u003estack\u003c/b\u003e. In many programming languages the call \u003cb\u003estack\u003c/b\u003e contains a limited amount \u003cb\u003e...\u003c/b\u003e"},{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://blog.stackoverflow.com/","url":"http://blog.stackoverflow.com/","visibleUrl":"blog.stackoverflow.com","cacheUrl":"http://www.google.com/search?q\u003dcache:iqtvg9Ge1c0J:blog.stackoverflow.com","title":"Blog - \u003cb\u003eStack Overflow\u003c/b\u003e","titleNoFormatting":"Blog - Stack Overflow","content":"Apr 12, 2009 \u003cb\u003e...\u003c/b\u003e Apparently some users who really should know better are confused about the way \u003cb\u003eStack Overflow\u003c/b\u003e works. I take this as a sweeping indictment of \u003cb\u003e...\u003c/b\u003e"},{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://support.microsoft.com/kb/145799","url":"http://support.microsoft.com/kb/145799","visibleUrl":"support.microsoft.com","cacheUrl":"","title":"How to Troubleshoot Windows Internal \u003cb\u003eStack Overflow\u003c/b\u003e Error Messages","titleNoFormatting":"How to Troubleshoot Windows Internal Stack Overflow Error Messages","content":"This article lists steps to help you troubleshoot problems with \u003cb\u003estack overflow\u003c/b\u003e errors in Windows. Stacks are reserved memory that programs use to process \u003cb\u003e...\u003c/b\u003e"}],"cursor":{"pages":[{"start":"0","label":1},{"start":"4","label":2},{"start":"8","label":3},{"start":"12","label":4},{"start":"16","label":5},{"start":"20","label":6},{"start":"24","label":7},{"start":"28","label":8}],"estimatedResultCount":"273000","currentPageIndex":0,"moreResultsUrl":"http://www.google.com/search?oe\u003dutf8\u0026ie\u003dutf8\u0026source\u003duds\u0026start\u003d0\u0026hl\u003den\u0026q\u003dStack+overflow"}}, "responseDetails": null, "responseStatus": 200};`
and tried
alert(goog.responseData.results[0].url);
and this worked
innerHTML returns a string—not an object structure. You will probably have to use eval or a JSON parsing library (depending on how secure the JSON data is) to convert it from a string into a JavaScript object.
For example, (using the json2.js JSON library):
var googString = newTabBrowser.contentDocument.getElementsByTagName("pre")[0].innerHTML;
var goog = JSON.parse(googString);
// This should give the correct result
alert(goog.responseData.results[0].url);
Steve
Check this out someone has wrote jquery.google plugin I know this plugin to small and it doesn't support paging or like that. I think it will be help you ?
Just check it's source code.
Regards

Categories