Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mellow_

Pages: [1]
1
Hardware / Re: restore flashdrive image!
« on: June 14, 2013, 02:49:16 pm »
Ok then, am just gonna charge really extra now or else am getting my baseball bat out.
Wish me luck cos i just lost alot of memories there.
Why were you installing Ubuntu from the flash drive without backing up the important data on there first?

2
General discussion / Re: Hacking Localhost Episode 6
« on: June 12, 2013, 06:48:56 pm »
I actually listened to a few minutes then I just got bored and closed the page. You guys just sit on your asses and talk for more than an hour?. This is probably the most boring hobby I've ever heard of, No offence.
That's what podcasting is? Some people prefer to listen to others talk instead of music, etc.

3
C - C++ / Re: [C++] File Reading from Command Line
« on: June 12, 2013, 06:47:15 pm »
I'll look around and see if there are any non-windows implementation, but if not I'll definitely use that. Thanks a ton, enjoy the rep.

4
C - C++ / [C++] File Reading from Command Line
« on: June 11, 2013, 07:14:44 pm »
I have a quick question with reading a file. I'm trying to read a file from the command line with the following:
Code: [Select]
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;


void readFile(char* file, string& fileContents)
{
    fstream fs;
    stringstream ss;
    fs.open(file,ios::in);
    while(fs.good())
        ss << static_cast<char>((char)fs.get());
    fileContents = ss.str();
    fileContents = fileContents.substr(0,fileContents.size()-1);
}


int main(int argc, char* argv[])
{
    if(argc != 2) { //Terminate program if zero or more than one arguments provided.
        cout << "Usage: " << argv[0] << " <filename>" << endl;
        exit(1);
    }
    char* pFilename = argv[1];
    string fileContents;


    readFile(pFilename, fileContents);
    cout << fileContents;
}
I had problems getting getline() to work with the file I opened, I'm not particularly sure why. So I did this method where I read each charater into a stringstream, make a string equal to the stringstream's contents, and then shave off the last character which is an unnecessary EOF gathered by stringstream. This would break if any unicode was involved.


Any way to make this more elegant or to have getline() work?

5
People say this stuff is going to happen every time some new impressive piece of tech comes along.

6
Found it on the Webs / Re: ethical hacking repository
« on: June 10, 2013, 06:00:10 pm »
Damn a lot of great books here. Thanks a ton for the information!  :)

7
High Quality Tutorials / Re: C++ tutorial
« on: June 10, 2013, 04:55:26 pm »
Thanks for this. Command-line args and binary trees were confusing as hell, this makes it nice and concise.

8
Hacking and Security / Re: Where to start with hacking
« on: June 10, 2013, 02:30:05 am »
I think the best advice really is, learn.

Web exploits and vulnerabilities? Learn about HTTP protocol, DNS, sockets, TCP/IP, SSL, whatever!

Want to rip into programs? Learn ASM and programming languages. Read lots of code. Learn how a PE executable works, among all others.

Remember one thing: it won't be easy, and it won't be fast. It will take years to learn enough to be competent, and you'll never ever stop learning once you start. Hacking and programming is for life.

9
Hacking and Security / Re: Most embarrasing hack you've ever done?
« on: June 10, 2013, 12:24:42 am »
When I was in high school I went out of my way to create a small script in VB to disable a service essential to the schools security system. They had a 'server' service, and the 'client' service on every machine. With the client service disabled, the computer stops communicating with the server and instead of having some safety measure in place, it simply grants you access to every device on the network.

All of them. (what the fuck??)

I did this with the intentions of telling the administration and IT at school that it's a bad idea to allow us access to VB and other languages outside of the main computer labs. I demonstrated why, was promptly banned from computer use for the rest of my time in high school, and suspended for two weeks.

I guess they didn't appreciate the help. What a bunch of assholes lol.

Pages: [1]