Jump to content

TheNavigator

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by TheNavigator

  1. I'm trying to install subversion onto my server in a smooth way, I found that the best way is SVNManager, however, even SVNManager isn't easy enough for a "1 click" thing. It's something I got used to, it's Linux world. However, I had few problems with it, including SMTP mailing (which is solved now), now I have another problem. When I try to edit privileges, this error appears I can't even understand what is that to be honest. Any help is appreciated of course. Thanks.
  2. Forgot that to be honest. It looks like that's the main reason joymax just discontinued it. Thanks then. I won't add that.
  3. I understand what you wrote there, but what I need to achieve is to prevent those Javascripts to reveal the password thing. Joymax site seems like they've removed this feature though :| Maybe it's not that much needed?
  4. I don't know how that's made to be honest, maybe it's not even Javascript, but I saw that at www.joymax.com When the refresh button is pressed, or any link is pressed, or even a Javascript was activated in the URL box, the password field is cleared. This is to prevent those scripts that reveal password fields and etc, while (of course), the data is still received by the php script behind. My question is, any hints on how to do so? All what I can do with Javascript is read it to be honest, so I need some help on what to do to achieve such objective. Any help is greatly appreciated. Thanks
  5. Never mind, I got it I thought that any user can access any directories, thankfully, by default, everything's secured I know it's stupid, but I didn't know so because I rarely used a Linux system with multiple users
  6. After searching for sometime, what I want to do is something like a chroot jail, or an rSSH. Locking the user to a specified directory. chroot looks fine but it's much more than what I actually need. I've also seen Jailkit, but I can't figure out how to make that work on CentOS I guess I need more experience :|
  7. How to make a user and certain its permissions not to access other directories? The user I use, although it's a sudoer, but without using sudo commands it can play with stuff, make files here and there, delete some files, etc. How can I prevent this so the only directory the user can access is the one I specify it for him?
  8. Sorry for the late reply. It's something very advanced and complicated (as reported by experts who are responsible for the informatic olympiads here. For me it wasn't that hard). An algorithm server. Ever heard about Codeforces, TopCoder, USACO, Z-Training, etc. ? The international olympiad for informatics? For your reply, that means I need to turn that "python script" into a service then. True?
  9. How to limit a user to a directory then? And would that work with nohup ?
  10. I'm making a way of communication between a site and a server. User uploads a python file, the server then compiles it and returns the output. Everything works perfectly. The only problem is that script file can access other directories and mess with things. The script deals with only 2 files, "input" and "output". How can I make such thing? Any instructions? Any help is much appreciated Thanks.
  11. I've contacted namecheap support regarding this. They gave some help. The server works perfectly with another client. There's something wrong with php. Moreover, resp = (connect.recv(65535)).strip() print resp # And there could be a lot more here! if I deleted that resp = (connect.recv(65535)).strip() , the second one, php script works fine Can someone help?
  12. I've made an SSL connection between a web server and a CentOS server using python and php. The 2 server communicate perfectly, however. after the first reply from the client, which is the php, the client isn't able to send any other data. Here's the code. <?php echo "<h2>TCP/IP Connection</h2>\n"; $fp = fsockopen("ssl://unlicrea.zapto.org", 21098, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "START"; fwrite($fp, $out); $in = fgets($fp, 128); echo $in.="<br />"; $out = "TEST"; fwrite($fp, $out); fclose($fp); } ?> For the server: #!/usr/bin/python # Server example import socket from OpenSSL import crypto, SSL context = SSL.Context(SSL.SSLv23_METHOD) context.use_privatekey_file('key') context.use_certificate_file('cert') # Establish a TCP/IP socket s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s = SSL.Connection(context, s) # Bind to TCP port No. 17642 ... s.bind(("",21098)) # ... and listen for anyone to contact you # queueing up to five requests if you get a backlog s.listen(1) # Servers are "infinite" loops handling requests while True: # Wait for a connection connect, address = s.accept() # Typically fork at this point # Receive up to 1024 bytes resp = (connect.recv(65535)).strip() # And if the user has sent a "SHUTDOWN" # instruction, do so (ouch! just a demo) print resp if resp == "START": connect.send("AUTHENTICATION DETAILS REQUIRED") else : connect.send("Error") resp = (connect.recv(65535)).strip() print resp # And there could be a lot more here! # When done with a connection close it connect.close() print "done",address # And loop for / wait for another client The python thing is set to print any received data to the console. "START" is received successfully, however, "TEST" isn't. I received some errors at the PHP side. error_log file, here they are. Any help is appreciated. Thanks.
  13. Okay I've fixed this and php is running perfectly now The left thing is the cURL thing, so I'll search for it. If anyone has got a better link than the php manual then please post it. I'll update the topic with anything new.
  14. kicken and recurse recommend cURL, so it looks like that's what I'll go with (or try) as that python thing has a lot of errors. I installed php and httpd on the server, however, when I go to the browser, enter the IP there, nothing appears. recurse asked me to edit /etc/httpd/conf.d/httpd.conf but it wasn't there. Only mod_dnssd.conf, README and welcome.conf were there. The service is started and running, just saying.
  15. Well, I guess that finally I've found something to work with. I'll work with sockets. That's what I need. I found some ways to connect through php, but I don't know how to install a socket server on a CentOS server. What's the best programming language to use? Anything to start from?
  16. I got your point. Okay I'll make this topic a little bit more specific. I want to making something like SMTP, I send a request, with username and password, the server verifies, I send a request of mail, I receive a boolean if it's successful or not, and then everything's disconnected. I want to know how to let the server authenticate the username and password, how to make a php script that sends that information, and how to tell the server and the php (disconnect when you receive/send bla bla bla) However, I didn't read about OAuth yet. I will now.
  17. I've just read about Ideone, the only problem I've found is that the posted code can be accessed by anyone, which I don't need. At all. Can we use the same protocol to make the same thing? As I said before, I know nothing about communication so please be simple.
  18. The second server is because that the web is hosted on a shared hosting account. The server is for compiling the code and returning the result. Have you ever used TopCoder, USACO or something like so? They have a server for compiling the code, and a website. We can't put the website on the server because of the low internet connection, and we can't put the compiling thing on the web hosting because of permissions and stability too. I don't know how to describe this simpler to be honest. It's just an "upload file" on a website, the website sends the file to the server with some arguments, and receives an argument which it directly displays. That's all. About XML or JSON, I've already used them before in Objective-C but they won't be really helpful here. I would go for defining my own protocol. For the OS, actually it would be different for installing scripts, etc. For Windows (for example) installing apache is much more different than Linux, so I wanted to point that out. So, how to start making such protocol? I need to open a port first, right?
  19. This is my problem actually. I know nothing about protocols and therefore I don't know what shall I do or why shall I use X and not Y. I don't know what programming language to use to write the responder on the server, and I don't know how to make that protocol secured. That's the point. I know nothing about communication :|
  20. Okay, again. A php script that opens a connection with a server, sends it a string (X), an integer (n), (n) strings ( Y[ ] ) and a last string ( Z ). X is the code, n is the number of inputs needed, and Y is an array of that input and Z is the expected output. The server just returns a string containing "0" or "1". 0 if the output didn't match the sent 1, and 1 if it did. If an error happened, it returns an error string containing "0" then followed by the error. Here's an example of a C code passed into the website script, although I want to deal with python, but I know C more than I know python. A user will upload a file, say test.c containing the following. #include <stdio.h> #include <stdlib.h> int main() { int x; int y; scanf("%d", &x); scanf("%d", &y); x = x+y; printf("%d", x); return 0; } So the php script will get that code from a file, say test.c, so here's a pseudo code of what would happen. Please note that the number of input and the input things will be statically saved, probably in a SQL database and the database will be queried for that. String code = test.c; string result = getResultFromServer(code, 2, 1, 3, 4); For the server side, compile test.c; open (compiled file); 1 3 get output; if (output == 4) return "1"; else return "0"; However, how can a "connection" be made to do this? How can the server make such stuff? I know nothing about how this can be actually implemented.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.