PDA

View Full Version : Facebook chat monitoring?



Tickyy
05-23-2014, 07:44 PM
I need a program that simply watches/monitors the chat and keeps it on a file so i can watch it later.

I am not asking for a keylogger or something similar to that, i simply need a program that i can type my username and password and all it does is create a file of the chat/conversation that has been made for a week or so.

program being open source would be awesome.

Thank you.

Pavement
05-23-2014, 09:17 PM
I just go to the archive thing and select all and copy paste :P

Tickyy
05-24-2014, 07:55 AM
I just go to the archive thing and select all and copy paste :P

Try doing that when it has been deleted before...

Pavement
05-24-2014, 09:54 AM
My bad. That's just what I've done before but I guess mine wasn't deleted.

Kyle Undefined
05-24-2014, 10:51 AM
So are you trying to get deleted messages? Or just to prevent from losing messages by deletion?

Tickyy
05-24-2014, 11:56 AM
So are you trying to get deleted messages? Or just to prevent from losing messages by deletion?

Let me explain it to you this way.

My girlfriend keeps deleting the conversation she has with uni friends, she says she doesn't but i kinda don't believe her so i want something that saves the conversations she makes, that way i will find out if she is deleting the conversations or not.

i would check my self but i am busy studying the only time i get in touch with a PC is weekends at home, the alternative is my phone... but i was hoping there's already a program(or something else useful) that does this already.

Clarity
05-24-2014, 11:58 AM
Sounds like maybe this problem should be solved more directly than with behind-the-scenes monitoring.

Tickyy
05-24-2014, 12:04 PM
Sounds like maybe this problem should be solved more directly than with behind-the-scenes monitoring.

Tried once, it happened again, this time i want to do it so i have evidence and also see myself what she REALLY talked with her friends. She keeps telling me that she was simply just talking normal stuff, if so, then why delete it? This is the only way i actually find peace and really know what's been happening...

Ian
05-24-2014, 02:27 PM
This (https://addons.mozilla.org/en-us/firefox/addon/facebook-chat-history-manager/) might work.

masterBB
05-24-2014, 03:26 PM
Wouldn't a keylogger being easier?

Tickyy
05-24-2014, 03:43 PM
Wouldn't a keylogger being easier?

First of all, a keylogger is against the rules here in srl.(Well admins might just close an eye this time?)

But that brings me into an idea, she uses her phone for facebook so that should make things easier. I might try one out and install one on her phone ^_^.


This (https://addons.mozilla.org/en-us/firefox/addon/facebook-chat-history-manager/) might work.

i'll try it out, thanks :)!

Edit: doesn't work :(

masterBB
05-24-2014, 04:50 PM
Oh right, I am a mod ;) Tbh, it is not just against the rules. It is also against our philosophy, spying on someone is always bad. Privacy ftw. Of course the situation might be more complicated, but I am pretty sure the NSA is using that same argument

Brandon
05-24-2014, 05:35 PM
This would definitely be a challenge..

Only options are:

.Net languages with a web-control, cookies, SSL enabled
Java SSL socket with cookies enabled
C/C++ with libCurl, SSL, cookies enabled


That's for desktop apps. Why? Because facebook API doesn't support such a thing and you'd have to do it manually.

Sk1nyNerd
05-24-2014, 07:01 PM
if youre trying to do it on the phone i dont think you can without her knowing. i have SMS tracker installed on my phone incase anyone ever steals it and sends any messages ill know where and who they are contacting. with google play stores new privacy update the app cant run unless it is clearly visible (ex the task menu when you swipe down) because it is "secretly" collecting information. basically making the app pointless. idk what kind of phone or if all apps follow this policy but im guessing something on the computer where her account is always on is your best bet

Kyle Undefined
05-24-2014, 07:58 PM
Yeah, honestly it's more work than it's worth.

P1nky
05-24-2014, 08:16 PM
Let me explain it to you this way.

My girlfriend keeps deleting the conversation she has with uni friends, she says she doesn't but i kinda don't believe her so i want something that saves the conversations she makes, that way i will find out if she is deleting the conversations or not.

i would check my self but i am busy studying the only time i get in touch with a PC is weekends at home, the alternative is my phone... but i was hoping there's already a program(or something else useful) that does this already.
Leave her, why be with someone who you have doubts in.

Brandon
05-24-2014, 08:17 PM
Was curious.. Still.. not sure you want to go down the road of spying..

CurlSocket.hpp:

/** © 2014, Brandon T. All Rights Reserved.
*
* It is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* It is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with it. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CURLSOCKET_HPP_INCLUDED
#define CURLSOCKET_HPP_INCLUDED

#include <curl/curl.h>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>

class CurlSocket
{
private:
CURL *curl_handle;
std::string params;
struct MemoryStruct{char *memory; std::size_t size;};
struct MemoryStruct data;
static std::size_t WriteBuffer(void *contents, std::size_t size, std::size_t nmemb, void *userp);

public:
CurlSocket();
~CurlSocket();

operator CURL*() {return curl_handle;}

void SetURLFollow(bool follow);
void SetSSL(bool VerifyPeer, bool VerifyHost);
void SetCookies(const char* CookieJar, const char* CookieFile);

void SetURL(const char* URL);
void ClearParams();
void AddParam(const char* Param, const char* Value, bool Escape = false);

std::string DoGet();
std::string DoPost();
};

#endif // CURLSOCKET_HPP_INCLUDED



CurlSocket.cpp:

/** © 2014, Brandon T. All Rights Reserved.
*
* It is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* It is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with it. If not, see <http://www.gnu.org/licenses/>.
*/

#include "CurlSocket.hpp"

CurlSocket::CurlSocket() : curl_handle(nullptr), params(), data {0}
{
curl_global_init(CURL_GLOBAL_ALL);
curl_handle = curl_easy_init();

if (curl_handle)
{
curl_easy_setopt(curl_handle, CURLOPT_FAILONERROR, true);
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36");
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteBuffer);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, &data);

curl_easy_setopt(curl_handle, CURLOPT_AUTOREFERER, 1L);
}
}

CurlSocket::~CurlSocket()
{
curl_easy_cleanup(curl_handle);
curl_global_cleanup();
curl_handle = nullptr;
}

std::size_t CurlSocket::WriteBuffer(void *contents, std::size_t size, std::size_t nmemb, void *userp)
{
std::size_t realsize = size * nmemb;
struct MemoryStruct *mem = static_cast<struct MemoryStruct *>(userp);

mem->memory = static_cast<char *>(realloc(mem->memory, mem->size + realsize + 1));
if (mem->memory == NULL)
{
printf("Cannot Allocated Enough Memory (ReAlloc is NULL).\n");
exit(EXIT_FAILURE);
}

memcpy(&(mem->memory[mem->size]), contents, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;

return realsize;
}

void CurlSocket::SetURLFollow(bool follow)
{
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, follow);
}

void CurlSocket::SetSSL(bool VerifyPeer, bool VerifyHost)
{
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, VerifyPeer ? 2L : 0L);
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, VerifyHost ? 2L : 0L);
}

void CurlSocket::SetCookies(const char *CookieJar, const char *CookieFile)
{
curl_easy_setopt(curl_handle, CURLOPT_COOKIEJAR, CookieJar);
curl_easy_setopt(curl_handle, CURLOPT_COOKIEFILE, CookieFile);
}

void CurlSocket::SetURL(const char *URL)
{
curl_easy_setopt(curl_handle, CURLOPT_URL, URL);
}

void CurlSocket::ClearParams()
{
params.clear();
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, nullptr);
}

void CurlSocket::AddParam(const char *Param, const char* Value, bool Escape)
{
if (Param && Value && strlen(Param) && strlen(Value))
{
if (!params.empty())
{
params += "&";
}

params += Param;
params += "=";
params += Escape ? curl_easy_escape(curl_handle, Value, 0) : Value;
}
}

std::string CurlSocket::DoGet()
{
curl_easy_setopt(curl_handle, CURLOPT_POST, 0L);
CURLcode res = curl_easy_perform(curl_handle);

if (res != CURLE_OK)
{
printf("%s\n", curl_easy_strerror(res));
}

if (data.memory)
{
std::string result = data.memory;
delete data.memory;
data.memory = nullptr;
data.size = 0;
return result;
}

return std::string();
}

std::string CurlSocket::DoPost()
{
curl_easy_setopt(curl_handle, CURLOPT_POST, 1L);
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, params.c_str());
CURLcode res = curl_easy_perform(curl_handle);
curl_easy_setopt(curl_handle, CURLOPT_POST, 0L);

if (res != CURLE_OK)
{
printf("%s\n", curl_easy_strerror(res));
}

if (data.memory)
{
std::string result = data.memory;
delete data.memory;
data.memory = nullptr;
data.size = 0;
return result;
}

return std::string();
}




Main.cpp:

#include <iostream>
#include <fstream>
#include "CurlSocket.hpp"

std::string HtmlDecode(std::string str)
{
std::string subs[] = {"& #34;", "&quot;", "& #39;", "&apos;", "& #38;", "&amp;",
"& #60;", "&lt;", "& #62;", "&gt;", "&34;", "&39;", "&38;", "&60;", "&62;"
};

std::string reps[] = {"\"", "\"", "'", "'", "&", "&", "<", "<", ">", ">", "\"",
"'", "&", "<", ">"
};

std::size_t found = 0;

for(int i = 0; i < 15; i++)
{
do
{
found = str.find(subs[i]);
if (found != std::string::npos)
str.replace (found, subs[i].length(), reps[i]);
}
while (found != std::string::npos);
}

return str;
}

int main()
{
CurlSocket sock;
sock.AddParam("email", "mehwtfbleh@hotmail.com");
sock.AddParam("pass", "***Fake***");
sock.SetCookies("Cookies.dat", "Cookies.dat");
sock.SetSSL(false, true);
sock.SetURLFollow(true);

//https://m.facebook.com/
sock.SetURL("https://www.facebook.com/dialog/oauth?client_id=0x1024&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconn ect%2Flogin_success.html");
sock.DoPost();

sock.SetURL("https://www.facebook.com/profile.php?id=************&ref=tn_tnmn");
std::string res = sock.DoGet();

std::fstream file("C:/Users/Brandon/Desktop/Facebook.html", std::ios::out);
if (file.is_open())
{
file << res;
file.close();
}

return 0;



It logs in and everything. You just need to send the cookie with every request and monitor the chat.. Not too hard. Just tedious. Takes time to find what to send and request :l

It is probably a better idea to just make a C# window-less program with a web-view control and monitor the chat with that. Way easier than trying to use a C or C++ service. Though more powerful, it's more tedious to write. It's more than doable in C#. It's very easy in any language if you know what you're doing..


Another option is to use a socket on the mobile link: https://m.facebook.com/ and this still requires the code above. It is no different at all. Either way, the code above should get you started. It logs in and works. You just need to monitor the messages now :l


http://i.imgur.com/WapNDMk.png


I feel bad for helping with this.. ={

[XoL]
05-24-2014, 08:31 PM
Keyloggers are not against the rules from what I gathered? I asked for one a while back, someone pmed it to me.

Very simple to install, very quite and it just emails the logs to you. Just need to put it in your exceptions list for anti-virus lol.

Tickyy
05-24-2014, 09:04 PM
Guys great news, i talked with her and we set everything to the table discussed everything and everything's ok now(kinda), even though @brandon that code looks sick, you gotta show me how it works, what language is it?

Thanks for everything though guys, i still might install a keylogger just for a few days, just to make sure.

masterBB
05-24-2014, 09:19 PM
;1294804']Keyloggers are not against the rules from what I gathered? I asked for one a while back, someone pmed it to me.

Very simple to install, very quite and it just emails the logs to you. Just need to put it in your exceptions list for anti-virus lol.

The Rules:



SRL Rules & Regulations


Behave
Although the main focus of SRL is for scripting, we also like to have fun and debate over the “Real Questions of Life”. You are free to talk about any other subject; however it must be within moral standards . Always remember that you should debate the topic, not the person. Speaking directly to the adolescent majority: don't do anything your parents wouldn’t want you to do here! Failing to stay within morality will lead to infractions or bans. In short, just behave!

Key Logging / Password Theft / Phishing:
Any topic related to key logging, password cracking, or helping others create, use, or distribute password cracks or key loggers is strictly prohibited. Any party involved in such topics will be immediately reported to their internet service provider.

Infected Files:

Posting, linking to, or distributing viruses, trojans, worms, malware and any other malicious pieces of software, in any form, is not tolerated. This also includes topics on the creation and or distribution of the aforementioned items. Any parties involved in such activities will be reported to their internet service provider.

Malicious Intent:

Posting of any information or directions with a malicious intent is expressly forbidden. If you do so, appropriate action will be taken against you as seen by the staff. An example of malicious intention would be to tell a user to delete his System32 folder to fix an error.


- SRL Management

Hazzah
05-24-2014, 09:40 PM
If you are that worried about who your girl friend is talking to you either need to chill out or find a new girlfriend because tbh this sounds extremely controlling and I dont see why its any of your business who she is talking to.

[XoL]
05-25-2014, 02:19 AM
The Rules:
Well, guess I was wrong! Its been a while since I looked at the rules :/ My bad!


If you are that worried about who your girl friend is talking to you either need to chill out or find a new girlfriend because tbh this sounds extremely controlling and I dont see why its any of your business who she is talking to.

Agreed, although I sometimes wish I could see who mine talks to... Just gotta get over the fact, if she actually likes you then she wouldn't be cheating on you.

Tickyy
05-25-2014, 02:27 PM
If you are that worried about who your girl friend is talking to you either need to chill out or find a new girlfriend because tbh this sounds extremely controlling and I dont see why its any of your business who she is talking to.

As long as she is a part of my life that i spend with, that automatically makes it my business. Could you guys please stop reasoning if this is right or wrong, i am not a control freak. I have my reasons why i am doing this. Thank you.


;1294820']Well, guess I was wrong! Its been a while since I looked at the rules :/ My bad!



Agreed, although I sometimes wish I could see who mine talks to... Just gotta get over the fact, if she actually likes you then she wouldn't be cheating on you.

It was actually her idea to share our social media to each other, i was actually against it, so blame on her.



Just making things clear for any admin/mod out there. Based on the rule:

Key Logging / Password Theft / Phishing:
Any topic related to key logging, password cracking, or helping others create, use, or distribute password cracks or key loggers is strictly prohibited. Any party involved in such topics will be immediately reported to their internet service provider.

I am not asking for password cracking, this has absolutely nothing to do with password key logging/cracking, i have the password.

grats
07-03-2014, 04:50 AM
lol wat

http://pidgin.im/ does all this crap just login on some other computer

it'll save the messages sent to the user by default.. you have to config xmpp all ghetto as hell to get the messages she sends from the browser.. but I doubt that matters in your case, seeing half the conversation is more than enough for you to see what you want to see.