Probably the Firewall from Client A which is preventing this. FTP also requires a data channel to send its information
How to list directory content of remote FTP, recursively?
PMA23:57
IT can do almost everything bash can do, albeit remotely.
$ lftp mirror.3fl.net.au lftp mirror.3fl.net.au:~> ls drwxr-xr-x 14 root root 4096 Nov 27 2007 games drwx------ 2 root root 16384 Apr 13 2006 lost+found drwxr-xr-x 15 mirror mirror 4096 Jul 15 05:20 pub lftp mirror.3fl.net.au:/> cd games/misc lftp mirror.3fl.net.au:/games/misc>find ./ ./dreamchess/ ./dreamchess/full_game/ ./dreamchess/full_game/dreamchess-0.2.0-win32.exe ./frets_on_fire/ ./frets_on_fire/full_game/ ./frets_on_fire/full_game/FretsOnFire-1.2.451-macosx.zip ./frets_on_fire/full_game/FretsOnFire-1.2.512-win32.zip ./frets_on_fire/full_game/FretsOnFire_ghc_mod.zip ./gametap_setup.exe ...... lftp mirror.3fl.net.au:/games/misc> du gametap_setup.exe 32442 gametap_setup.exe lftp mirror.3fl.net.au:/games/misc> du -sh gametap_setup.exe 32M gametap_setup.exe lftp mirror.3fl.net.au:/games/misc>
Difference between active and passive FTP?
PMA23:55
Active and passive are the two modes that FTP can run in. FTP uses two channels between client and server, the command channel and the data channel, which are actually separate TCP connections. The command channel is for commands and responses, the data channel is for actually transferring files. It's a nifty way of sending commands to the server without having to wait for the current data transfer to finish.
In active mode, the client establishes the command channel (from client port
X
to server port 21
(b)) but the server establishes the data channel (from server port 20
(b) to client port Y
, where Y
has been supplied by the client).In passive mode, the client establishes both channels. In that case, the server tells the client which port should be used for the data channel.
Passive mode is generally used in situations where the FTP server is not able to establish the data channel. One of the major reasons for this is network firewalls. While you may have a firewall rule which allows you to open up FTP channels to
ftp.microsoft.com
, Microsoft's servers may not have the power to open up the data channel back through your firewall.Active mode:
- Client opens up command channel from client port 2000(a) to server port 21(b).
- Client sends
PORT 2001
(a) to server and server acknowledges on command channel. - Server opens up data channel from server port 20(b) to client port 2001(a).
- Client acknowledges on data channel.
- Client opens up command channel from client port 2000(a) to server port 21(b).
- Client sends
PASV
to server on command channel. - Server sends back (on command channel)
PORT 1234
(a) after starting to listen on that port. - Client opens up data channel from client 2001(a) to server port 1234(a).
- Server acknowledges on data channel.
Multiple array in php
PMA23:42
If the ID, topic and description are all
in the correct order in each comma delimited string you are supplying to
the script, you could use the following to create a single array key'd
by the ID:
|
SQL Injection Prevention
PMA23:40
the value should only be a positive integer value, since it's an id
number. We do sometimes use other variables that could be a letter, or a
string of text, for example, the search results pages.
$variable = "0";
if (isset($HTTP_GET_VARS["id"])) {
$variable = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS["id"] : addslashes($HTTP_GET_VARS["id"]);
}
Should I be using mysql_real_escape_string
basic SEO factors
PMA03:34
It is quite easy to learn the basic SEO factors if you spend a
couple hours researching on the web. Here is a quick summary of
them:
-You need to have unique and useful content.
-You need to have quality and relevant backlinks.
-Your title tags should be unique and contain your main keywords.
-Your permalinks should be based on keywords rather than symbols.
-Your website shouldn't have many folders, and its pages should
be interlinked.
If you follow these guidelines soon you'll start getting a decent
amount of traffic from Google.
You should be careful, however, to not become greedy and start
over-optimizing your website, which is a mistake I see many new
bloggers and webmasters doing.
Here are the most common forms of search engine over-optimization I
see around:
1. Repeating the main keywords over and over again in the body
of the article to increase the keyword density.
2. Using the bold and italic typefaces over and over again on the
main keywords of the page.
3. Creating footer links with optimized and unnatural anchor texts
pointing to internal pages.
4. Getting backlinks from low quality sources (e.g., web directories
and dofollow blogs) with optimized and unnatural anchor texts.
5. Getting too many backlinks with the same anchor text.
6. Exchanging with or buying links form low quality or unrelated
websites.
These tactics might work in the short term, as the person applying
them might see an increase in the search rankings and organic
traffic.
couple hours researching on the web. Here is a quick summary of
them:
-You need to have unique and useful content.
-You need to have quality and relevant backlinks.
-Your title tags should be unique and contain your main keywords.
-Your permalinks should be based on keywords rather than symbols.
-Your website shouldn't have many folders, and its pages should
be interlinked.
If you follow these guidelines soon you'll start getting a decent
amount of traffic from Google.
You should be careful, however, to not become greedy and start
over-optimizing your website, which is a mistake I see many new
bloggers and webmasters doing.
Here are the most common forms of search engine over-optimization I
see around:
1. Repeating the main keywords over and over again in the body
of the article to increase the keyword density.
2. Using the bold and italic typefaces over and over again on the
main keywords of the page.
3. Creating footer links with optimized and unnatural anchor texts
pointing to internal pages.
4. Getting backlinks from low quality sources (e.g., web directories
and dofollow blogs) with optimized and unnatural anchor texts.
5. Getting too many backlinks with the same anchor text.
6. Exchanging with or buying links form low quality or unrelated
websites.
These tactics might work in the short term, as the person applying
them might see an increase in the search rankings and organic
traffic.
SQL Injection Attacks
PMA03:12
This appeared to be an entirely custom application, and we had no
prior knowledge of the application nor access to the source code:
this was a "blind" attack.
A bit of poking showed that this server ran Microsoft's IIS 6 along
with ASP.NET, and this suggested that the database was Microsoft's
SQL server: we believe that these techniques can apply to nearly
any web application backed by any SQL server.
The login page had a traditional username-and-password form, but also an email-me-my-password link; the latter proved to be the downfall of the whole system.
When entering an email address, the system presumably looked in the user database for that email address, and mailed something to that address. Since my email address is not found, it wasn't going to send me anything.
So the first test in any SQL-ish form is to enter a single quote as part of the data: the intention is to see if they construct an SQL string literally without sanitizing. When submitting the form with a quote in the email address, we get a 500 error (server failure), and this suggests that the "broken" input is actually being parsed literally. Bingo.
We speculate that the underlying SQL code looks something like this:
The login page had a traditional username-and-password form, but also an email-me-my-password link; the latter proved to be the downfall of the whole system.
When entering an email address, the system presumably looked in the user database for that email address, and mailed something to that address. Since my email address is not found, it wasn't going to send me anything.
So the first test in any SQL-ish form is to enter a single quote as part of the data: the intention is to see if they construct an SQL string literally without sanitizing. When submitting the form with a quote in the email address, we get a 500 error (server failure), and this suggests that the "broken" input is actually being parsed literally. Bingo.
We speculate that the underlying SQL code looks something like this:
SELECT fieldlist
FROM table
WHERE field = '$EMAIL';
PHP operators are characters
PMA06:22
Artithmetic Operators
Operator | Description |
---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulus (remainder of a division) |
++ | Increment |
-- | Decrement |
Assignment Operator
Operator | Description |
---|---|
= | Assign |
+= | Increments, then assigns |
+= | Decrements, then assigns |
*= | Multiplies, then assigns |
+= | Increments, then assigns |
/= | Divides, then assigns |
%= | Modulus, then assigns |
Comparison Operators
Operator | Description |
---|---|
== | Is equal to |
!= | Is not equal to |
> | Greater than |
>= | Greater than or equal to |
< | Less than |
<= | Less than or equal to |
Logical Operators
Operator | Description |
---|---|
&& | And operator. Performs a logical conjunction on two expressions (if both expressions evaluate to True, result is True. If either expression evaluates to False, result is False) |
|| | Or operator. Performs a logical disjunction on two expressions (if either or both expressions evaluate to True, result is True). |
! | Not operator. Performs logical negation on an expression. |
Concatenation Operators
Operator | Description |
---|---|
. | Concatenate (join two strings together) |
Apache-Specific Functions
PMA01:32
These functions enable you to access Apache internal
features—they form a high-level interface to some Apache API functions.
Consequently, these functions are available only if you have compiled PHP as an
Apache module. It's important to remember that these functions are
case-sensitive. Functions such as apache_note() make a distinction
between uppercase and lowercase variables, just like normal PHP variables.
apache_lookup_uri
class apache_lookup_uri(string URI)
Opens an Apache subrequest to look up
status information for a URI (Uniform Resource Identifier).
Returns:
Class containing a list of status information for a URI
Description:
If you have installed PHP as an Apache module, you can use this
function to get information about a URI. Just as with virtual() or an
SSI-include, the function opens an Apache subrequest; therefore, you can specify
only a local document URI as the parameter.
apache_note
mixed apache_note(string key, [string value])
Returns:
Value of the Apache note corresponding to the key specified as
the first argument; FALSE if no entry was found for the specified
key
Your Favorite Journalist
PMA04:23