predator78 22 Junior Poster

Not sure how you have this implimented but if the user doesn't chose a directory couldn't you just have the program simply clear the the box and send a messsage to the user stating that the directory they chose does not exist? That way if they chose nothing or an invalid directory both cases are handled.

predator78 22 Junior Poster

Hello all....

Sorry if this is extremely simple and stupid but I was taking a look at the Forgers32 manuals just to have a poke at the win32 api. I was able to get his first example working to pop up a basic window but for some reason the title text displayed in the title window is in chinese or something lol. I tried pokin around a bit to try and understand why but can't seem to find the answer. Here's his sample code incase that helps speed up anybody willing to explain it to me.

#include <windows.h>
const char g_szClassName[] = "myWindowClass";
// Step 4: the Window Procedure
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_CLOSE:
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
//Step 1: Registering the Window Class
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
if(!RegisterClassEx(&wc))
{
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
// Step 2: Creating the Window
hwnd = CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szClassName,
"WHY AM I CHINESE LOL",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
NULL, NULL, hInstance, NULL);
if(hwnd == NULL)
{
MessageBox(NULL, "Window Creation Failed!", …
predator78 22 Junior Poster

Yeah that was all I meant by not assuming. Yeah it's always wise when networking to lower security to get it working then raise the level once you know things are working correctly. Good luck with your project sounds fun.

predator78 22 Junior Poster

Also I wouldn't recommend "assuming" the router is doing anything. It should be doing what you are telling it if the settings are correct, and forwarding traffic to the machine you designated as your web-server. Another thing you shouldn't need the http:// if you are trying to access directly through the router. Simply type the address of the router into the address bar.

predator78 22 Junior Poster

Well first thing that comes to mind that you didn't state. Are you running a web-server on the machine that the traffic is being forwarded to? If not it could be getting requests but doesn't have anything to send back. Also remember when your in your testing phase you may have to turn off your security settings and start turning them on one by one until you are at your desired level of security.

predator78 22 Junior Poster

Unless you are using a proxy of some sorts.

skilly commented: curious +3
predator78 22 Junior Poster

I tried pinging the router and got responce timed out. This message holds the key to your problem, the ping was sent to the router the router we can assume most likely recieved it unless there is something wrong with the hardware, but it never sent the message back. Either your addressing is incorrect thus you are not part of the network, or a setting in the router maybe incorrect. Do the things jingda requested, most likely your firewall is blocking the connection.

predator78 22 Junior Poster

A short simple answer defined here as well as some other good little tid bits, but if this is for homework I suggest you really get out and do some research. Your teacher probably isn't going to be impressed with a one sentence answer to this. Anyway by gaining the trust of a computer that is trusted by the target network you can bypass alot of security. Have a look here transitive attack.

predator78 22 Junior Poster

I haven't really studied these until today, but from the information I have gathered today they are in fact quite similar. Also it seems that the techniques would in fact work well together in my opionion. Major diffrence?

syn-cookie: Uses a timestamp and uses that to create a queue associated with the client, also provides an encrypted portion to ensure client integrity.

HFC: Uses hops(the distance from client to server) and basically creates a list of valid ip -> to hops to check against and filter out possible ip's that have been spoofed.

As far as you question reguarding using them together like I said they seem to work well together and both are great counter-measures however according to the information I gathered syn-cookie has been updated and replaced with tcpct which is a tcp extension and would probably be prefered over syn-cookie so you may want to research that as well.

s.w.a commented: thank you for your huge attention,helpful information and clear sentances +2
predator78 22 Junior Poster

GREAT RESOLUTION!!!! Yeah networks can be painful to troubleshoot. Even the greatest of us can lose sight of the obvious stuff at times as complicated as things get. A great mentor also once introduced me to packet tracer it's a great program that let's you assemble virtual networks for testing. You can also keep the configuration of you current network as a file and introduce new things or take existing things out for testing purposes to help keep your network running at an optimal level. Worth checking out for any administrator IMHO. Great work!!!

predator78 22 Junior Poster

yes, they are to be taken literally. It's piracy, and piracy at the high seas carries a mandatory death penalty so why not this form?

As to European countries not wanting to extradite, that's why laws need changing and international cooperation and synchronisation of laws is needed.

I'm not talking about chopping someone's head off for downloading a single song.
But for the diehards, who download, redistribute, and often sell gigabytes a day and make money out of it? Sure.
I've had friends lose their jobs because the company they worked for went under as a result of piracy.
None of them died as a result, but others have (suicides because they ended up in the gutter quite frequently).
As a result, pirates (especially the large ones) are directly responsible for the deaths of people, thus a case can be made that piracy in volume is homicide.

Not sure where you live jwenting but remind me to never visit. I don't think I ever want to be in a place where a teenager downloading music is directly linked to mass suicides and even homicide. I also think it might be scary to live in a government under the control of someone that supports killing of citizens for anything less than murder.

predator78 22 Junior Poster

Yeah I surely don't support Obamacare and believe the implementation was completly wrong in that situation. And although I do think america has had one of the best health care systems around, I do agree with the fact it leaves many out in the cold. Do I have a solution? No.... I wish I did it's very sad to know that there are sick people and babies out there that do not have proper health care. Also jwenting you are correct in the sence that slackers may "mooch" of a system like this and yes would have to be weeded out. Does this have to equal camps and assasiation? I don't think so, it's not like that now. And you would be suprized how many people living on the streets are anyting but "slackers", if you don't believe me on that one maybe you should go donate some time and see for yourself. And when you realize the truth it may make you see if you where in some of the positions they are you might want an angels hand to help pick you up.

predator78 22 Junior Poster

1. fun(0) zero is passed in
2. that means n <= b would be true
3. if that is true then fun(50+fun(50+fun(50+fun(50+0))))
4. like math parethesis first? fun(50) can disregaurd add zero
5. that's once through keep going or let the comp do work :).

predator78 22 Junior Poster

string::find does do that buddy. I know this stuff is hard to read, but you should start learning now, if we give a man a fish we feed him for a day, if we teach a man to fish we feed him for a lifetime. Now grant it I am not great at this either but I am forcing myself to learn and possibly we can get a better answer from some uber smart peeps here.

Now let me refer you back here string::find.
Ok at the top this line
size_t find ( const string& str, size_t pos = 0 ) const;
Ok this is the first version of string::find method.
There is another thing of intrest for us noobs below.

Find content in string

Searches the string for the content specified in either str, s or c, and returns the position of the first occurrence in the string.

When pos is specified the search only includes characters on or after position pos, ignoring any possible occurrences in previous locations.

So if we search for str it will return the position at which if finds str(or string).

So you see the very first version shows us we can search for a string inside a string. Look to the example below it shows the diffrent versions of string::find in order of descriptions we just looked at.

found=str.find(str2);
in english then this means found will be assigned the …

predator78 22 Junior Poster

HAHAHAHA oh my not sure if this thread just took a turn for better or worse but I think I'm gettin closer to a heart attack now. :)

predator78 22 Junior Poster

Indeed seems proper. Seems this is somewhat of a new trend but catching on fast. If I ever have enough money to get suited up like you are presently I may have to go that route myself.

predator78 22 Junior Poster

My heart and soul may travel with you then brother lol.

predator78 22 Junior Poster

I have heard great things about this one but never used it. Might be worth checking out. Ethereal

predator78 22 Junior Poster

If you don't have an error I would definatly be suspicious of the time variables. Have you proven them to be providing the correct data? Also I have heard even in c++ global variables are not highly looked upon and you can clearly pass elasped to moveball() so you probably should.

predator78 22 Junior Poster

Nice job :) c++ is new for me to but it's slowly starting to look more like english.

predator78 22 Junior Poster

Ok let me explain a little further when I had you run that test it was because if an a is not found it will return -1 in most programming that return value means just that nothing was found or false. The reason I bold if that is your keyword. In your revised code line 21 is wrong don't use == that is for comparison. Try to read your program out in english first then translate to code. The problem is in your loop.

while x is less than the length of the string
//change back to what it was replpos = string1.find("a");
put the value of the funtion string.find() into the variable replpos
this line you are attempting replace i belive it was right the first time to
next add 1 to the value x
retarts loop

So what you are doing is saying for the entire length of the string loop and find "a" and replace it at this spot. The way I did it was using an if statement inside the loop. And I used the handy fact that -1 is thrown if it's not found as my comparison. Give it one more try with that info. If it's still making you want to pull your hair out after that I'll post code, but you will feel more rewarded doing it yourself.

@britanicus The only time I found this script to abort was if "a" is not found and …

predator78 22 Junior Poster

Yeah apperently sounds a little slow :). Still trying to find some better specs and reviews on these guys to but the company sure seems reputable and apperently you could go pick one up for about $60 bucks at walmart. Nas Adapter

So far it seems insane to me that they would still be using usb 2.0 what gives with that. Anyway might be another possible intrest for ya.

predator78 22 Junior Poster

If you need ideas for expanding a network for a company you are already taking the wrong approach. The people you need to be asking questions are the comany itself. Anybody could rattle off the greatest servers, wiring concepts, os's, security and yadda yadda yadda. But that means nothing you need to find out what their specific needs are. Some things you will probably want to know.

The most important of all questions before you even consider starting. What is the budget?

What are they going to need as far as servers go? Some examples... Are they going to be hosting their own website? Do they want voip for some type off messaging system? Are they going to need massive storage and database capabilities? How's our budget looking as this is probably the most expensive part of any networking project? Is there some technologies we can utialize to increase productivity or save the company money in other areas?

Ok now after we figure out all of that the next step would most likely be to consider the design of the network. If you don't already know how to do this I'm sure we can help out but god help that poor company.

After we have all the hardware, software, design process done then the real work begins. You can start running all your wires and if you are smart you will run 3 times the amount you think you need that way when you are ready …

predator78 22 Junior Poster

Yeah it definatly seems to not have many reviews to be seen. As you stated though it's fairly cheap and also fits your needs. It does seem to have a warranty associated with it which is good. Not sure if you have gone through newegg before, but just as a heads up be sure to keep everything including the box and review their policies well incase you want to request a refund. I'll try to do a little more pokin around and see if there is any other good deals for what you are looking at. I believe you have 30 days to request a full refund to so that should give you enough time if all goes well to give it a good test run and if you don't like it you can send it back.

predator78 22 Junior Poster

Would somethin like this work for you better then you wouldn't need wires or any of that hassle? USB ADAPTER

If that way just won't work for you this one was suggested in an similar request. It supports 3 USB 2.0 devices and seems to support your bit torrents and such as well as anything else I assume you might be using it for. NAS ADAPTER

predator78 22 Junior Poster

Not sure with the compile error what is wrong, maybe you were trying to build it with the program still running. As far as what your code you are very close. I won't give you the answer since you want to figure it out on your own but here is a hint.

#include <iostream>
#include <string>

using namespace std;

    string string1;
    int stringlen;
    int replpos;
    int a = 0;

int main(){
    
    cout << "Enter some text: ";
    getline(cin, string1);
    
    stringlen = string1.size();

    replpos = string1.find("a");
    cout << replpos;
    //run this part a few times first type something with an 'a' in it
    //what is the value and why? Now run again with something without an 'a'
    //what value are you at now? That should clear your understanding up a bit
         
    return 0;
    
}
predator78 22 Junior Poster

Socialism can be thought off as a middle area, or publicly owned corporations (here we call them crown corporations, but I don't know what they are called in the US). Where in certain areas the government owns either one of many competing companies or the only company (monopoly) in a certain area eg. broadcasting.

Alternatively, there are systems like the Canada Healthcare system where the government pays for a particular service on behalf of all citizens but lets the private sector (to differing degrees) provide the service. Note: this only works because it is illegal for anyone else to pay for it so the private companies cannot rip off the gov't.

So there are lots of variation and room for compromise, the best systems IMO treat things on a case by case basis to determine which set up is best for a particular area, since there are things that gov't is good at which are not the same as what free-markets are good at which aren't the same as what charities/NGOs are good at. Problems happen when we forget the strengths and weaknesses of each and someone over steps their bounds.

Yes totaly in agreement with this. And yeah Canadas health care system is a great example. And yeah the note you posted also takes me back to my thoughts that things like this can work, like you said in a case to case basis and also proper montering.

predator78 22 Junior Poster

Yes what you say is true. The rules for the key can of course be ajusted at the router, while the packet is still in packet "form". The server should maintain information about the key. Now that you have a clear picture let's look at some examples.

Client sends request to server
Server accepts the request and sends key
The rules of this key are to send data to the client unless the connection is timed out lets say 10 minutes of inactivity. At that point if the server has not had another request from the client authentication must take place again.
So server sends key and trasmits the data
Lets pretend it was a 9.50 min long video
The data is sent and the connection is still valid for 10 seconds incase of problems
After the 10 minutes the server dumps the key and the client must send a new request.

Now if we want to tighten up security on it we could possibly do something like.
Client sends request
Server recieves and sends key
Rules of this key will be that every 2 minutes the key must be renewed.
Here is our problem....
The client only requests the information once.
They push the button get authenticated and expect all the data to come at them.
One way possibly around this issue would be to install special software on the client which defines new …

predator78 22 Junior Poster

Or this havn't tested it as I am still going through it myself but I assume since it was proposed it should work. string::find

predator78 22 Junior Poster

Ok if you are just interested in how it works I can attempt to explain. The thing to realize here is that most of this is usually done automatically for us. Take for example youtube.com A client clicks the link to stream a video, when they click the link the request is sent to the server. The server recieves this and begins to send out the information requested. You seem to want to know what information is in the request packet. This explains the layout of a UDP request packet udp packet structure. So you see here there is no authentication feild in the packet. You could in theory construct your own but it's somewhat pointless. If you are interested in working with sockets and packets at the programming level that would also give you a better grasp on how they work and why. Python has great and easy networking capabilities that could help you set up a simple server and client architecture so you could run some experiments. If your main concern is what goes in the request packet the link provided in this post shows exactly what is inside a UDP request packet. If this gives you any thoughts or questions I'm glad to try and elaborate more.

predator78 22 Junior Poster

That would probably depend on what you are sending. What services does the server have that you will be sending out in UDP? Are you building your own sockets as an experiment? Are you providing voice over ip? Are you streaming video? I would have to know what you are trying to accomplish first. You say you want to know what the request is but you should already know. What is your client requesting then you can examine it at the the protocol levels.

predator78 22 Junior Poster

Yeah I'm pretty sure we can all agree that communism failed in the Soviet Union I don't think anyone could dispute that. And yes communism in it's viewed state is a far fetched ideology. Like he said that would only work in a perfect world which is far from the truth. But if there were somehow levels of that idea you could impliment in certain areas, there is a possiblility for a better "BALANCE". It's like the chinese theory of yin and yang, when we have to much of one way the other way will eventually be inevitable. If you go to far from one side cause and effect will apply and forceably shoot you to the other side of the spectrum. If however you learn to live near the center of this balance you don't get a swinging motion from extreme to extreme, you simply wobble slowly back and forth slightly in the middle.

predator78 22 Junior Poster

If you are very intent on doing this there may possibly be some extreme algorithms that you could set up in the stream of UDP packets where as they might attempt to authenicate, or realize the order they are being sent in. But to be honest that defeats the purpose of what they are being used for. If you need it secured that badly send it in tcp packets instead, example client first downloads the information in a secure connection and then they can use it when it's done downloading. If you need real-time though UDP is your freind and it can be done securely as mentioned.

predator78 22 Junior Poster

That is the point exactly. There will be no authentication done with the UDP packets. The authentication should be handled some where else before you start sending UDP packets if they are indeed that important to be secured. In fact if you try to authenicate the packets you will be setting yourself up for problems. If the packet that's authenticating doesn't reach the destination then the person it was intended for will be "shutdown". UDP packets will not authenicate, that should be the job of something else. If the client can't authenicate to the server simply do not send the information. If they can then there is no problem. I'll repeat it once more to get the point across UDP packets will not authenicate they are simply requested for and then sent in a stream, in real time for like video, voice, things of this nature.

predator78 22 Junior Poster

Not sure what you searched with google but I found this at the very top of the list. Just scanning over it looks like it's worthy of the top spot as well.
opengl coordinate system

predator78 22 Junior Poster

Depends on if you want to build a calculator to do this or simply use c++ as the calculator and produce an answer for you. A calculator is a great project for learning. I'm currently working on a small text based (for now anyway) card game and have learned much already. Just the writing of code sometimes gets you more familiarised with a language. To start make a few variables, and then preform the mathmatics on them, and have it print the results to the screen. If you don't know how try starting here tutorial.
Is a great tutorial I learned a great deal from it. They also have great refrences on libraries.

predator78 22 Junior Poster

HAHAHA ok that brings us the the mormon jokes hopefully no offence is taken as I am a non practicing mormon.

So God and a man are taking the tour of heaven. God takes the man to a hall way with doors on each side. They walk.... The man notices noises coming from one door. He turns to God and says "sounds like a party...". "Yes my son, that is the Christian's. Wild bunch." They continue on along the way God points to various other rooms with mild descriptions. Eventually God stops the man and replies "shhhh..." and begins tip toeing past a door. The man asks "God, what are y ou doing?" God replies "My son, this is a very special room." The man ponders "Well who is in there?" God states "This is where the mormons reside, we must be quite they think they are the only ones here.."

sergent commented: lol +0
predator78 22 Junior Poster

Heck I figure if we get an army of problem solvers which this community is vastly who knows what kind of idea might come about. Many of you do this for a living, and others of us stay up untill the unwaking hours of the night hacking away at problems until the solution presents itself. I think my vote for the next president is the geekyest dude they can find, and by that I surely don't mean Trump. lol :)

predator78 22 Junior Poster

I raised a similar topic some years ago with a mature(as in age) computer science student near the end of his studies. His reply to people being in similar wages for different jobs was that he had studied hard to get to where he was so when he finished he deserved a better wage. This point may have had some substance were we not (at the time) living in a country where secondary education was funded by the taxpayer. In effect the people who he thought he should earn more than funded the education which gave him that belief.:-O

Wow very interesting. Btw great replies from all. I was bored and wanting to get some wheels turning it looks like as though it may have worked after all. I was expecting either some really great responces like the ones we've got you guys are great. Or I was expecting people would shutdown right away and start screaming "blasphemy!!!". Yeah the whole idea is just to look at things that are wrong, possible solutions. I mean I think the USA has been the best system thus far don't get me wrong, but it's gaining alot of shortcoming very quickly as well. Don't forget what's goin on currently, it's probably a good time for a change as long as it's a good one.

predator78 22 Junior Poster

Ok yes that makes much more sence. The fact of the matter is that you can't be sure the packet will ever reach it's destination with UDP. So your solution will have to be either to authenticate with tcp and then use UDP protocol. Or a better solution would be a diffrent method of authenication all together before a user ever reaches the network, then all of your information will be in a secure state before, during, and even after the trasmission. Think of even a very suttle approach, if you encrypt the data to be sent on the machine it's being sent from, then send it out even if someone intersepts it it will be worthless to them depending on the strength of encryption. Ok now we have that it place we have one layer of security. All of our data is wrapped up in a nice encryption. Now lets take it a step further and look at the network design. The line is coming in and what does it hit first? I really hope our firewalls are in place here. There is another layer. What comes next? All incoming requests are sent to the authentication server everything from the user to network handshake, and packet examination can be done here. Depending on the level of security needed the authentication server may or may not be a part of the main network. So what happens exactly at our authentication server? Well the user logs in and if the login …

predator78 22 Junior Poster

Remind the administrator that messages going down the line are like vehicles on the road. Sometimes in order to speed some things up you have to slow others down. If all your clients are fighting to get to the mainline all at once, well there is your bottleneck. If they wait patiently like a queue and slowly work thier way to it once they get there it's all open road baby!!!

predator78 22 Junior Poster

Sounds like a possible bottleneck somewhere but the architecture of the network would have to be known to examine if this could be the cause or not. Could also check the routers to be sure the proper protocols and schemes are being used for efficiently. And yeah sure you can alway add more lines if you have the money but if you aren't using what you have efficiently why would one assume when you get more you will be in a better spot.

predator78 22 Junior Poster

It looks more like there is a valid address assigned to the wireless already. Why don't you try to disable the other connection so there are no conflicts.

predator78 22 Junior Poster

I think you are a bit confused. First of all you say you need network security, what exactly for? If you just need security for your personal pc then use your firewalls or run virtual pc when you are surfing the internet. UDP packets are hardly unreliable they are very efficient at what they do. The reason you may want to discard packets is because if there is some kind of delay you don't want to wait for the information. UDP will try to fill in the missing peices the best it can and move on, for instance if you have ever streamed live video over the network and notice a little blip that's because information was lost but the video continues to play reguardless. As far as the flow of request, it should not matter you don't need to check it. A request is made and packets start coming through if some errors are made like I said it will attempt to fix very quickly but it shouldn't get carried away cause the next packet is already arriving.

predator78 22 Junior Poster

Thanks yeah I just started classes a few days ago in c++ although I had a good grasp on them in python c++ seems more in depth on quite a few of the concepts im familiar with.

predator78 22 Junior Poster

Obviously that's not the kind of life I'm speaking of. And not taking away any rights from the people but more of putting money back into circulation rather than rotting away in someones personal bank accounts.

predator78 22 Junior Poster

Hopefully nano-tech will do just that and get rid of most of the worlds current major problems as they are today. I'm still like a kid in a candy store thinking about the possiblities of the technology and it's possibilities.

predator78 22 Junior Poster

I know was hoping nobody noticed glad moderator caught it quickly lmao. Hey I can repost it as a classes question in c++ right lmao.

predator78 22 Junior Poster

I'm hoping this will stir the pot a bit lol. But in all seriousness if you could get rid of the "need for greed" and "status", and yet not cross to many boundries. Don't you think that this could provide a more reasonable standard of living for everybody? My main thoughts were of people such as Oparah and Bill Gates which easily have enough money to supply everyone in the continental U.S. with over a million dollars each in their bank accounts. This of course would be catosrophic to the market if this were to happen all at once, but honestly 7% or whatever it is of the people control all the money and make all the decisions? Shouldn't the money be spread around better so that everybody can have a chance at a better life? Or maybe it should stay where it is collecting interest in an rediculously large account getting bigger by the moment. Any thoughts?

susheelsundar commented: it's not Just bill gates and Oparah everyone wants to Screw market, coz everyone wants to get rich like mad +0
predator78 22 Junior Poster

You might feel a little bit diffrent if it was something of "yours" in question though. If you say that 60% of the middle class makes more than you and your family currently. Then say you created something that could provide not only you but your entire family and possibly your grandchildren with a better life don't you think you would want to protect that? 2 sides to every coin...