This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As the shell created when you chroot is a login shell, so .bashrc does not works. | |
Hence, cp the .bashrc to .bash_profile and it will work. Keep the .bashrc as well in the case that you need to spawn another bash instance | |
http://stackoverflow.com/questions/13570558/user-environment-is-not-sourced-with-chroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cp `which $1` /var/chroot/sshd/bin/;\ | |
ldd `which $1`|awk '{print $3}'|grep -e '^/'|xargs -I{} cp -v --parent '{}' /var/chroot/sshd/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.debian.org/doc/manuals/securing-debian-howto/ap-chroot-ssh-env.en.html | |
http://stephan.paukner.cc/syslog/archives/332-SSH-daemon-in-a-chroot-on-Debian-lenny.html | |
http://www.gelato.unsw.edu.au/IA64wiki/DebianSSHChroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp /bin/sh /var/chroot/sshd/bin/;\ | |
ldd /bin/sh|awk '{print $3}'|grep -e '^/'|xargs -I{} cp -v --parent '{}' /var/chroot/sshd/ | |
Credits to: http://blog.jandorsman.com/2011/10/copying-a-binary-and-its-shared-libraries-to-a-chrooted-directory/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
// http://w3.tbd.my/thread-14121-post-163114.html#pid163114 | |
//$key = "3"; // 3 = 51, "=" = 61 | |
//echo "Original Algo: \n"; | |
//var_dump(algo2($key)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://web.archive.org/web/20080703153358/http://taossa.com/index.php/2007/01/03/attacking-delete-and-delete-in-c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strcat.S: No such file or directory | |
Its either you didn't include <string.h> or <cstring>, or the buffer size is too small so try to allocate the string into another string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. The socket's file descriptor must be global(if you wanted to share the socket) | |
2. You must pass the sizeof the destination length(sizeof(client_addr)) into the thread in pthread_create as if you do not then you won't get a correct result as the client_addr is a pointer to sockaddr_in instead of sockaddr_in, so the return value of sizeof() won't be the one that we wanted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To empty the string(set strlen() to 0): | |
string[0] = '\0'; | |
To empty the string till the first null character: | |
memset(string, 0, strlen(string)); | |
To empty the string from the start till the end(for static array): | |
memset(string, 0, sizeof(string)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcb_xv vout display error: no available XVideo adaptor | |
Set Video Output to X11 Video Output(XCB) |