Developing the MP3 Thief program under ASP.net

Source: Internet
Author: User
Tags visual studio
Asp.net| Procedure | Thief program

Yesterday at this address: http://www.21cx.com/Software/Catalog21/43.html saw a very beautiful MP3 Flash player, really good-looking. But a debugging found that the song is too old, or can not hear. MP3 resources are on the Internet, sometimes can not hear is normal, but most bad use, it is not very useful. Careful analysis of its source code, originally read the directory under the 1.xml,2.xml. 4.xml files. I often listen to music in the tomato garden, that is, http://www.tomatolei.com, I would like to be able to put the tomato MP3 resources here to put it? Isn't that what everyone often says about the MP3 thief's function? Do what you say!

1, analysis of the Tomato Garden song Source: pageurl = "http://tomatolei.com/bbs/T_playlist.asx";

2, the target address: 1.xml

3, the use of program conversion format:

Front desk:

<%@ Page language= "C #" codebehind= "ReadAndWriteXml.aspx.cs" autoeventwireup= "false" inherits= " Read the tomato garden mp3.readandwritexml "validaterequest=false%>
! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en"
<HTML>
<HEAD>
<title> read the tomato garden MP3 list </title>
<meta content= "Microsoft Visual Studio. NET 7.1" name= "generator"
<meta content= "C #" Name= "Code_language"
<meta content= "JavaScript" name= "vs_defaultClientScript"
<meta content= "http://schemas.microsoft.com/intellisense/ie5" name= "Vs_targetschema"
</HEAD>
<body ms_positioning= "GridLayout"
<form id= "Form1" method= "POST" runat= "Server"
<font face= "Song Body"
<asp:textbox id= "TextBox1" style= "Z-INDEX:101; left:56px; Position:absolute; top:32px "runat=" Server "
Width= "312px" height= "240px" textmode= "MultiLine" > </asp:TextBox>
<asp:button id= "Button1" style= "z-index:102; left:160px; Position:absolute; top:288px "runat=" Server "
Width= "96px" text= "Fix ~" > </asp:Button> </FONT> </form>
</body>
</HTML>

Background:

using System;
Using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
Namespace read a summary description of the MP3
{
///


///WebForm1 in the tomato garden.
///
public class ReadAndWriteXml:System.Web.UI.Page
{
protected System.Web.UI.WebControls. TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;
private String pageurl = ";

private void Page_Load (object sender, System.EventArgs e)
{
Place user code here to initialize page
if (! IsPostBack)
{
First read the Tomato garden acx file (http://tomatolei.com/bbs/T_playlist.asx)
///
Pageurl = "http://tomatolei.com/bbs/T_playlist.asx";
WebClient WC = new WebClient ();
Wc. Credentials = CredentialCache.DefaultCredentials;
byte[] Pagedata = WC. Downloaddata (Pageurl);
string result = Encoding.Default.GetString (pagedata);
Textbox1.text=result;

}
}

Code generated #region the Web forms Designer
Override protected void OnInit (EventArgs e)
{
//
CodeGen: This call is required for the ASP.net Web forms Designer.
//
InitializeComponent ();
Base. OnInit (e);
}


Designer supports required methods-do not use the Code editor to modify
The contents of this method.

private void InitializeComponent ()
{
This. Button1.Click + = new System.EventHandler (this. Button1_Click);
This. Load + = new System.EventHandler (this. Page_Load);
}
#endregion

private void Button1_Click (object sender, System.EventArgs e)
{
String Temp=textbox1.text;
textbox1.text= " Textbox1.text+=temp;

Textbox1.text=textbox1.text.replace (" ", "");
Textbox1.text=textbox1.text.replace (" ", "");
Textbox1.text=textbox1.text.replace ("", "");

Textbox1.text=textbox1.text.replace ("", "");
Textbox1.text=textbox1.text.replace (" ", "");

Textbox1.text=textbox1.text.replace ("", " Textbox1.text=textbox1.text.replace ("", "\");
 
Textbox1.text=textbox1.text.replace ("

textbox1.text+= "";

Textbox1.text=textbox1.text.replace ("\ r \ n", "");
The following starts to generate 1.xml files
///
StreamWriter Swfromfilestreamutf8buffer=new StreamWriter (Server.MapPath ("./") + "1.xml", false, SYSTEM.TEXT.ENCODING.UTF8,512);
Swfromfilestreamutf8buffer.write (TextBox1.Text);
Swfromfilestreamutf8buffer.flush ();
Swfromfilestreamutf8buffer.close ();
}
}
}





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.