TW網站淪陷資料庫
不定期公佈被入侵的網站
遭入侵/值入惡意程式最頻繁之主機(大家可以連去看看)
if (length == 0)
strReturn = "";
else
{
if (intLen <= startIndex)
strReturn = "";
else
{
if (length > intSubLen)
length = intSubLen;
strReturn = strData.Substring(startIndex, length);
}
}
return strReturn;
}
public static double NoRound(double num, int post)
{
double nReturn;
double nPow;
if (post <= 0 )
{
nReturn = Math.Floor(num);
}
else
{
nPow = Math.Pow(10, post);
nReturn = Math.Floor(num * nPow)/nPow;
}
return nReturn;
}
public static string ConvertDateToString(string strDate) |
| public static string ConvertStringToDate(string strDate) { return DateTime.ParseExact(strDate, "yyyyMMdd", CultureInfo.CurrentCulture).ToString("yyyy/MM/dd"); } |
public static StreamReader FtpDownLoad(Uri UriFpt, string strUserName, string strPassword)
{
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(UriFpt);
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.Credentials = new NetworkCredential(strUserName, strPassword);
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream, Encoding.Default);
return reader;
}