« first day (1246 days earlier)      last day (3986 days later) » 

Bob
Bob
4:00 PM
after that line, browser.document.innerHTML is blank
in JavaScript on Stack Overflow Chat, 52 secs ago, by Jeremy
What am I supposed to do when someone steals my avatar... >.<
this guy...
@allquixotic so... what now?
@Bob hmm
@Bob :/ i really don't know, unless we can use openid itself
then submit that as a cookie
Bob
Bob
4:15 PM
@allquixotic well, first thing to do is to figure out why
(function (c, a) {
    if (c == "stack_exchange") {
        openid.loadSignin();
        $(document).trigger("openidResize");
        return
    }
    var b = providers[c];
    if (!b) {
        return
    }
    this.highlight(c);
    if (c == "openid") {
        $("#openid_input_area").empty();
        this.setOpenIdUrl("");
        $("#openid_identifier").focus();
        $(document).trigger("openidResize");
        return
    }
    if (b.label) {
        this.useInputBox(b);
        this.provider_url = b.url;
that's the JS that gets executed
(function () {
    var f = $("#forgot-password");
    f.show();
    $("#sideBar").hide();
    $("#affiliate-iframe").detach();
    $("#affiliate-signup").find("p").first().text("Don't have an account?");
    var e = $("#openid_choice");
    var d = e.parent();
    e.detach();
    openid.setPageTitle("Log In");
    var c = $('<div id="loading-signup"></div>');
    d.prepend(c);
    StackExchange.helpers.addSpinner(c);
    var a = $("#forgot-password").find("a");
    a.attr("href", "https://openid.stackexchange.com/account/recovery");
that's openid.loadSignIn
$.ajax({
url: "/users/signin",
data: {
from: window.location.href
},
success: function (j, h, g) {
if (!window.postMessage) {
c.empty()
}
var i = $('<iframe frameborder="0" id="affiliate-signin-iframe" style="width:100%;height:165px" src="' + j + '"></iframe>');
c.prepend(i);
if (window.postMessage) {
$(i).hide()
}
}
notice
a get of /users/signin
on success will have a j value
which is a url
the URL for the iframe
that's probably the URL you ultimately want
Bob
Bob
@JimmyHoffa oh god
though, that'd probably work (thanks)
$.ajax({url:'/users/signin', success:function(j,h,g) { console.log(j); }})
oh it's a post
don't forget data:{from:window.location.href}
0
Q: Why Some Of File Downloads Do Not Work With Download Managers?

Boris_yoSome of downloads do not download actual file but some kind of redirection file like download.php and thus there is no way to download file other than using browser's native download function. Example would be this URL. Next to "Multipart" there are 0, 1, 2, 3, 4, 5 numbers becuse this download ...

that data: is the post body contents
you could probably give it any URL; it's the redirect-to URL if I had to guess "get a url for doing open ID signin, and I'm coming from X (implicitly: so the login url should be configured to redirect them to X when they're done signing in)"
Bob
Bob
4:23 PM
@JimmyHoffa and that entire thing redirects back to SE.com
perfect.
thanks!
Anonymous
no
Anonymous
plz
Bob
Bob
@PatoSáinz why did you ping him?!
Anonymous
sh*t it never happened
Anonymous
>_>
4:25 PM
okay jeremy wants this, then i will do it
@PatoSáinz don't worry! they can't do anything
I am on the brink.
Anonymous
@Utkarsh i was about to warn you about the serious legal implications on stealing avatars
Anonymous
Can you please provide me with your full contact info. in order to send you a DMCA takedown notice?
8
Anonymous
If only stars added rep...
4:40 PM
@PatoSáinz More sucker punch
@jokerdino That movie was terrible...
@JimmyHoffa So you did get sucket punched after all.
Bob
Bob
4:57 PM
@allquixotic almost there! :D
it filled in the email and password! :D
at least, I think it did
Anonymous
@Bob congrats
Anonymous
@jokerdino :)
Where?
Bob
Bob
wtf
/home/bob/node_modules/zombie/lib/zombie/eventloop.js:266
    index = this.timers.length;
                       ^
TypeError: Cannot read property 'length' of null
    at EventQueue.setTimeout (/home/bob/node_modules/zombie/lib/zombie/eventloop.js:266:24)
    at cs (<anonymous>:2:711)
    at Object.f.fx.custom (<anonymous>:4:21953)
    at Object.f.fx.hide (<anonymous>:4:22700)
    at Object.g (<anonymous>:4:19689)
    at Function.f.extend.dequeue (<anonymous>:2:23897)
    at Object.<anonymous> (<anonymous>:2:24190)
@allquixotic your turn :P
@Bob what is the focus?
5:03 PM
@Bob Where's the codes? Github?
Bob
Bob
@JimmyHoffa I'll chuck it up in a second
be warned that it's a messy hack
Bob
Bob
cleaning it up comes later
@allquixotic I would seriously hope you're not giving your private keys to any trust chain company :P
5:06 PM
@Bob What about eventloop.js?
Bob
Bob
@Jeremy that's part of zombie.js
Ah, okay.
Bob
Bob
as you can see, the callstack is rather useless
might even be some page JS being executed
(yes, we're using a DOM implementation and executing page JS in Node)
Anonymous
i hate js
Anonymous
and i cannot help it
5:08 PM
@Bob why don't you go directly to the login page?
I'm not sure what the the timers feature is for, but can you just set it to an empty array?
Bob
Bob
@JimmyHoffa I could. But that's not the issue. That particular exception occurs after.
might be worth stripping most of the crud out though
That's the URL you want
Bob
Bob
(I've just been patching holes as they appear)
Simplify it though by not going to a URL that causes you to follow redirections and such
go directly to the login page (that URL is specifically stackexchange login which is what you want right?)
Bob
Bob
5:10 PM
@JimmyHoffa yea, that might help
I'm not even sure why it visits the chat page first (@allquixotic?)
perhaps to take advantage of existing cookies. bleh.
moreover
first you get that page
(maybe?)
but what you need is...
in firefox console I just executed get of the /users/signin and here's the body of the response:
Bob
Bob
@JimmyHoffa that page won't work
can't have iframes
"https://openid.stackexchange.com/affiliate/form?affId=11&background=transparent‌​&callback=http%3a%2f%2fstackexchange.com%2fusers%2fauthenticate&color=black&nonce‌​=Q%2b%2fGUgAAAAAymwAzgGK9bQ%3d%3d&openid.sreg.requested=email&signupByDefault=fal‌​se&onLoad=signin-loaded&authCode=tjpCyypRXfx4CVzDtTTdIEpe3skNQWyajd8q6JoJfkLfxXKM‌​iSjsgP0S%2bRtEVYru%2bbNK4ZEUyCa10krEInIiPTOxgVLgo4pf%2bs1ZgU%2bL%2bT0ShfhmvdhOQ0%‌​2bhWjtSTi0BTbOPpOwxzec8B%2fmkHe2AE9WH3z6a%2blz%2fMw8OkZRN69s%3d"
@Bob you don't need iframes
you need the url from requesting /users/signin
Bob
Bob
@JimmyHoffa that page linked earlier uses them
that's the body of /users/signin
so
Bob
Bob
5:13 PM
@JimmyHoffa yes, that's what I'm doing in the latest iteration
it put's the URL I just linked in an iframe
Bob
Bob
var postData = "from=" + browser.location.href;
 28             var postRequest = http.request({
 29                 host: browser.location.hostname,
 30                 port: browser.location.port,
 31                 path: '/users/signin',
 32                 method: 'POST',
 33                 headers: {
 34                     'Content-Type': 'application/x-www-form-urlencoded',
 35                     'Content-Length': postData.length
 36                 }
 37             },
You don't need the parent frame
Bob
Bob
then it points zombie to the string in the response
unless it has maybe an fkey or something
Bob
Bob
5:15 PM
@JimmyHoffa I know. I'm not using it.
@Bob What's your response from that http request?
the body of it
oh it's a url
Bob
Bob
@JimmyHoffa the correct one? :P
but what's the body of that URL
Bob
Bob
it's the same thing you have above
@JimmyHoffa hm? uh.. lemme just fix this a bit
Right but you request that URL as step 2 right
Bob
Bob
5:16 PM
I've been ripping out half of it, gimme a sec
Bob
Bob
huh, it's making it back to chat before it dies:
[TypeError: Object [object Object] has no method 'removeAttribute']
Object [object Object] has no method 'removeAttribute' TypeError: Object [object Object] has no method 'removeAttribute'
    at Object.f.support.opacity.f.cssHooks.opacity.set (<anonymous>:4:7021)
    at Function.f.extend.style (<anonymous>:4:6067)
    at f.extend.step.opacity (<anonymous>:4:23801)
    at Object.f.fx.update (<anonymous>:4:21640)
    at Object.f.fx.step (<anonymous>:4:23524)
    at h (<anonymous>:4:21908)
    at Object.f.fx.custom (<anonymous>:4:22231)
spams that error a few times
actually, I don't think it even dies
Huh I can open the iframe URL directly
in firefox I did the ajax get of /users/signin, then plop that url straightaway in a window and I get exactly the login page
Bob
Bob
@JimmyHoffa oh, it's well past that step
here's the HTML it loads:
<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>



    <title></title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script type="text/javascript" src="/Content/js/master.js?v=HACgRYo9ChqZhgjdGc9hUaVD9JQ%3d"></script>
    <link rel="stylesheet" type="text/css" href="/Content/css/all.css?v=HACgRYo9ChqZhgjdGc9hUaVD9JQ%3d" />


            <style type="text/css">
                body
                {
                    background: transparent !important;
Yeah
Looking at the same in firefox right now..
Bob
Bob
5:21 PM
@JimmyHoffa it was well past that
in fact, it might have managed to load the bot
@Bob oh so you got zombie opening that and executing the login?
Bob
Bob
ya
Neato.
Bob
Bob
hm.
that timers error is transient
it just happened again
well they are timers
Smells like a missing lib
Bob
Bob
5:22 PM
O.O
Bob
Bob
what the
that's new
Perhaps some objects zombie are kicking off which should be in it's DOM context are executing as Node objects missing the DOM happy
Bob
Bob
@allquixotic far from stable; nice segfault ^
@Bob if it is logging in, would it be having conflicts?
Bob
Bob
5:23 PM
Bus error
it's throwing every bloody error under the sun at ame
I can't even get the same error twice
Bot up and running!
Zombie: Event loop is empty
!!listcommands
@Bob help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, awsm, ban, unban, color, convert, define, domain, export, findcommand, forgetseen, github, google, hang, inhistory, import, jquery, learn, test, why, ok, hello, friday, after5, theanswer, caution, nicethings, europe, goaway, status, idk, thatword, poptart, routertroubleshooting, networkingproblem, meta, rlemon, no, foxno, yes, orlmente, fixit, uio, taytaytay, ping, maybe, say, facepalm, hv, ohhh, whocares, snore
toostupid, bababababat, plz, whee, lol, sudo, beatingbloodoutofarockwithascythe, test1, ittts, gates
oh wait, amazon reviews my review before it shows up o0
Bob
Bob
nope.
@Bob that's not it, is it?
Bob
Bob
[SO-ChatBot-Driver] Loading bot!
Blob is not defined ReferenceError: Blob is not defined
    at <anonymous>:1:21704
    at <anonymous>:1:22386
    at <anonymous>:1:31209
    at Contextify.sandbox.run (/home/bob/node_modules/zombie/node_modules/jsdom/node_modules/contextify/lib/contextify.js:12:24)
    at Object.window._evaluate (/home/bob/node_modules/zombie/lib/zombie/window.js:187:25)
    at Browser.evaluate (/home/bob/node_modules/zombie/lib/zombie/browser.js:966:24)
    at /home/bob/chatbot/SO-ChatBot/runner.js:56:37
it failed the evaluate
@JimmyHoffa if it were running, you'd see two responses, one without the custom commands
5:25 PM
@Bob Alright you're most of the way to the right idea BUT the part where you're still living in a dom, once the login completes you need to use zombie to scrape for the fkey
and the fkey is assumably what you use for all your chat execution stuff
Bob
Bob
@JimmyHoffa I'm performing the login with zombie
I retrieve the URL using that POST request
@Bob Yeah but the zombie can grab values and make them available to node directly
Bob
Bob
and tell zombie to visit that URL, fill in the form, and click submit
Zombie can scrape the DOM for the FKEY, then when you have a FKEY variable that's all you need to make requests of chat.stackexchange.com
after it has logged in
(assuming the fkey is the relevant token)
Bob
Bob
@JimmyHoffa it then just visits chat.se
I was under the impression that the fkey would just be carried in a cookie
5:27 PM
@Bob If so you can stuff it into manual node HTTP requests
the point is to use zombie to login, and then you can make the adapter use node nominally for all requests after it has the auth tokens it needs
Bob
Bob
@JimmyHoffa ...what I mean is zombie should handle all of that
@Bob you are expecting too much out of a zombie...
Bob
Bob
@JimmyHoffa that would be another way, yes, but might require a rewrite of adapter.js
@Bob pfleh zombie's unstable and not going to make that super easy, you want to use zombie for the hard crap like the dom scraping etc, but then you want to get out of it
Bob
Bob
and any other parts of the bot that may use DOM objects for whatever reason
5:28 PM
@Bob you're already rewriting adapter.js, the hard parts of adapter.js are the login bits
Bob
Bob
e.g. localstorage
@JimmyHoffa adapter doesn't handle login, and I wasn't touching it
@Bob you want away from localstorage, you want me to write the bot.memory.save for node.JS using just file IO? gladly. :)
Bob
Bob
@JimmyHoffa I'd rather get other parts working :P
I know hehe
Bob
Bob
but it's 4:30 AM and i really should get some sleep :\
5:30 PM
haha whoa
you are way more dedicated than I to stuff like this... good work though!
Bob
Bob
pretty much just stripped the early stuff out
@Bob now we know why it doesn't work. ASK MORPHEUS!
Bob
Bob
and here's the revision with that crap still there: gist.github.com/Elusive138/756b1b30c82a32bf2874/…
@JimmyHoffa but you actually know what you're doing and would be faster :P
@allquixotic ^ I'll leave that with you guys, good luck
or give up, whatever
5:32 PM
@Bob I think I see where a hole may exist
Bob
Bob
@JimmyHoffa hm?
If I had this thing up and running locally I'd test something
Bob
Bob
oh yea, do you two want access to the server I'm testing on?
                    rslt = browser.document.evaluate("//a[starts-with(@href, '/login/global') and text() = 'logged in' and not(ancestor::div[contains(@style,'display:none')]) and not(ancestor::div[contains(@style,'display: none')])]", browser.document, null, /* XPathResult.FIRST_ORDERED_NODE_TYPE */ 9, null).singleNodeValue;
                    browser.visit(rslt.href, function () {
Bob
Bob
@JimmyHoffa that's in the older revision
not the most recent
5:33 PM
you grab a url and visit it, I would suggest clicking the link instead (there may be javascript listeners attached)
Bob
Bob
is it?
No it's in the new one
Bob
Bob
oh.
@JimmyHoffa no need
visiting works in my Awesomium driver
@Bob hrmm I would still say see if you get different behaviour by clicking instead
@Bob thanks :D I was napping
5:34 PM
Zombie may be missing something (it appears to be missing a variety of things) that the DOM expects
@Bob Yeah sure if I can get access somewhat easily...
Bob
Bob
@JimmyHoffa send me a public key
uh... email?
i asked him to send me a public key for access to superuser.myserver.org and he never did ;p
Bob
Bob
lemme know when you have that
@allquixotic I'm testing on phoebe
I think you have access to that one already
@Bob check your email, let me know if that works
Bob
Bob
uhm... can any mods delete that email above?
@jokerdino?
5:37 PM
@Bob you can delete it
then jokerdino needs to destroy it
Bob
Bob
@JimmyHoffa past the 2 min already
after deletion room owners can still view history and see what it was pre-delete
@Bob oops :P
Bob
Bob
@JimmyHoffa I don't care if room owners can see it
@allquixotic I decided I would use my *nix at home to do it because keys are a pain in the ass in windows... then I just didn't bother :)
@Bob is what I emailed you usable?
Bob
Bob
@JimmyHoffa should be
5:40 PM
@Bob done
Bob
Bob
@jokerdino Thanks!
Sorry it took a while. Was on the telly
#sherlock
@jokerdino I finally got my wife to start watching it with me!
Ash
Ash
[oracle docs ] (docs.oracle.com/javase/tutorial/jdbc/basics/…) states that > A Statement is an interface that represents a SQL statement. You execute Statement objects, and they generate ResultSet objects .
I've wanted to watch that ever since it first came out
5:42 PM
@JimmyHoffa Season 3?
@Ash [oracle docs ] (docs.oracle.com[...]) states that > A Statement in oracle will make you want to stab yourself in the face
Ash
Ash
how can an interface create objects ? can someone clarify ?
@jokerdino Just starting the show, since it came out I've been dying to watch but the wife can't handle accents usually, she finally gave it a shot and is interested enough
@JimmyHoffa You mean that British accent? I couldn't care less about accents.
@jokerdino Me either but my wife can't understand them
Especially if it's a strong accent, they may as well be speaking chinese to her, she just can't make out what they're saying at all sometimes
5:44 PM
How is it that you can't understand "accents"?
Bob
Bob
@JimmyHoffa I've sent the login details
The accents aren't too strong in Sherlock though
Bob
Bob
can you test? and check if you can use sudo
@jokerdino A strong english accent sounds like chinese to her, she can't understand the words they're saying
For a non-native like me, I don't have too much of a problem with either of the accents. I might have trouble picking up the nuances, inside jokes, culturalisms, phrases and idioms but never much of any accent.
Bob
Bob
5:45 PM
@JimmyHoffa @allquixotic if you feel like testing on phoebe, I've moved everything to /chatbot
brb again. on the telly
@JimmyHoffa they're not really that much of a pain, I don't think. >_>
Bob
Bob
@allquixotic saved sessions + kitty + pageant = I don't even notice
I can't figure out how to make putty use the key...
Bob
Bob
@JimmyHoffa on the left, connection => ssh => auth
5:47 PM
ah ok
Bob
Bob
select a private key file on the right
@Bob works, sudod.
Bob
Bob
yay
@JimmyHoffa check if the chatbot works
@Bob you run chatbot as sudo?
Bob
Bob
@JimmyHoffa no?
5:48 PM
@Bob was wondering why you gave me sudo heh
Bob
Bob
@JimmyHoffa just in case? :P
Alright. How do I run the chatbot? I'm looking at the js. node something ?
Bob
Bob
it's a vserver anyway, worst case I can nuke it
Oh nevermind @Bob, clippy says it can help me run the chatbot.
2
Bob
Bob
oh wait
quickly removes file
5:49 PM
@Bob the one with the password? :)
Need a sockpuppet account...
Bob
Bob
@allquixotic is it alright if @JimmyHoffa sees/knows the password for Cavil?
sorry, forgot to ask earlier :(
I wonder how emacs behaves in putty
Bob
Bob
@JimmyHoffa ya, same here
You don't have emacs installed?? blasphemer...
Ash
Ash
5:51 PM
> test
Bob
Bob
@JimmyHoffa lol
vim user here :D
BLASPHEMER!! HIEROPHANT! BRINGER OF DESTRUCTION!!
Heh, if I need more than nano I'll grab a proper IDE :P
Anonymous
nano for life
Anonymous
actually, I just use sublime
Anonymous
5:52 PM
and nano for the quick 'n' dirty
@Bob lemme guess, you're a tab user too? Oh god don't answer that. My heart couldn't take it...
nano for editing files on the server, sublime or an IDE for local files.
Bob
Bob
" Solarized syntax highlighting
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme solarized

" tell it to use an undo file
"set undofile
" set a directory to store the undo history
"set undodir=/home/bob/.vimundo
"set undolevels=1000
"set undoreload=10000

" Auto indent
"autocmd FileType c setlocal cindent
"autocmd FileType sh setlocal autoindent
filetype indent on
filetype plugin on
" Four spaces instead of tab
set tabstop=4
set shiftwidth=4
set expandtab

" Enable line numbers
@DarthAndroid emacs is a proper IDE!
Bob
Bob
5:52 PM
@JimmyHoffa tab user?
@Bob sure!
@JimmyHoffa One where I don't need to spend more time configuring it than I do programming in it.
sorry i am in and out
Bob
Bob
@allquixotic phew (thanks)
puts file back
@DarthAndroid I only mess with emacs config for fun sometimes, I definitely have never needed to (and rarely do to be sure)
Ash
Ash
5:54 PM
> A Statement is an interface that represents a SQL statement. You execute Statement objects, and they generate ResultSet objects.docs.java
Bob
Bob
@JimmyHoffa nodejs runner.js master.min.js
It comes packaged with configuration for pretty much ever language I've ever touched
@JimmyHoffa So it auto-detects installed compilers and knows how to build projects and such?
Bob
Bob
where master.min.js contains the minified bot code
@JimmyHoffa so, what was the tab user thing?
@JimmyHoffa the filetype-based indent and plugin (syntax) are enough for me in vim :P
@DarthAndroid detects file-extensions I open and for compilation it just figures the necessary ones are in the path. Configuration would be needed if I was using weird non-standard compilers I'm sure...
but why would I do that
Bob
Bob
5:55 PM
I prefer a full windows-based IDE on a local machine
@Bob VIM SHALL FALL!?!?
Bob
Bob
vim is just convenient on remote machines
!!tell Bob sleep
@allquixotic Command sleep does not exist.
Bob
Bob
@allquixotic not like I have much to do tomorrow
today*
5:56 PM
@Darth project files are an effect of an IDE, so if you have a project file it's from some IDE you have for editing that project... just use that IDE then. Emacs is for everything you don't have projects from some other IDE for. When writing javascript/html/css/perl/python/haskell/erlang/whatever else doesn't rely on some project file from visual studio
@Ash in that context, "SQL Statement" refers to the concept or idea of a SQL statement, "Statement" is the Type that represents this concept/idea (not necessarily the OOP definition of an interface).
@JimmyHoffa Uh, proper IDE / project support for Javascript/HTML/CSS provides some insane contextual completion.
Bob
Bob
@DarthAndroid I have yet to find a good IDE for JS
IntelliJ Ultimate / WebStorm
@Bob emacs
Bob
Bob
@DarthAndroid trying WebStorm. does not work.
I'm currently using extjs 2.3.0, which is a bit of a problem
most IDEs have trouble with extjs
the ones that support it only support 3 or 4
5:58 PM
You can easily install the Node.JS hookup on emacs as well to compile and load the editor buffer in Node.JS
I can't speak for specific libraries, but properly jsdoc'd javascript will have static type checking available for you
Alternatively just use Node.JS's REPL for javascript development is pretty nice
Bob
Bob
@JimmyHoffa yea yea, I'll stick with vim on VPSes tyvm :P
or Chrome's console if you're doing website JavaScript
@Bob pfleh
Bob
Bob
the extjs thing is tied into a Java EE project
which makes it more of a clusterfuck
5:59 PM
VIM doesn't have chords though! :D

« first day (1246 days earlier)      last day (3986 days later) »