知道用户名,破解密码应该可以,一般数据库密码是字母和数字组成,一般情况是5至10位,你用php语句取字母和数字组合成5至10的字符串,不断连接测试,当连接成功返回密码,这样测试有点慢,只不过两三天程序运行下来应该破解了吧,主要怕别人查到你过度的ip访问会封你的ip,还有mysql可以设置阅读权限,就是指定ip访问,就算你知道密码也不可以查阅或更改。我自己的网站就是设置固定ip访问,指定只有我的服务ip才可以访问。所以说很难的,希望那个外国的服务器没这么严谨吧,如果不知道用户名,基本不太可能。
第一个类:
package totabelaction;
import javaawteventActionEvent;
import javaawteventActionListener;
import javaxswingJOptionPane;
import topdfTableToPdf;
import totabelviewTabelData;
import totabelxlsExcelDemo;
public class TableAction implements ActionListener {
TabelData data;
public TableAction(TabelData data) {
thisdata = data;
}
public void actionPerformed(ActionEvent e) {
String str = egetActionCommand();
if ("添加"equals(str)) {
dataaddData();
} else if ("导出到Excel"equals(str)) {
ExcelDemo demo = new ExcelDemo();
demomethod(data);
} else if ("删除"equals(str)) {
if (datagetRow() != -1) {
datadelRow();
} else {
JOptionPaneshowMessageDialog(null, "请选择要删除的行!");
}
}else if("从Excel导入"equals(str)){
datagetXlsInfo();
}else if("从Excel导入到数据库"equals(str)){
datatoDb();
}else if("从table导出到pdf"equals(str)){
TableToPdf pdf=new TableToPdf();
pdfnewPage(data);
}else if("计算学分"equals(str)){
datagetXlsInfoToCredit();
}
}
}
第二个类:数据库连接
package totabeldb;
import javasqlConnection;
import javasqlDriverManager;
import javasqlResultSet;
import javasqlSQLException;
import javasqlStatement;
public class JdbcConnection {
private static JdbcConnection con;
public static JdbcConnection getCon() {
if (con == null) {
con = new JdbcConnection();
}
return con;
}
public Connection getConnection() {
Connection connection=null;
try {
ClassforName("oraclejdbcOracleDriver");
String url = "jdbc:oracle:thin:@127001:1521:oracle";
String user = "scott";
String password = "tiger";
connection = DriverManagergetConnection(url, user,
password);
} catch (ClassNotFoundException e) {
eprintStackTrace();
} catch (SQLException e) {
eprintStackTrace();
}
return connection;
}
// public static void main(String[] args) {
// JdbcConnection connection=new JdbcConnection();
// connectiongetConnection("asd", "99");
// }
}
第三个类:主类(入口)
package totabeldb;
import javasqlConnection;
import javasqlDriverManager;
import javasqlResultSet;
import javasqlSQLException;
import javasqlStatement;
public class JdbcConnection {
private static JdbcConnection con;
public static JdbcConnection getCon() {
if (con == null) {
con = new JdbcConnection();
}
return con;
}
public Connection getConnection() {
Connection connection=null;
try {
ClassforName("oraclejdbcOracleDriver");
String url = "jdbc:oracle:thin:@127001:1521:oracle";
String user = "scott";
String password = "tiger";
connection = DriverManagergetConnection(url, user,
password);
} catch (ClassNotFoundException e) {
eprintStackTrace();
} catch (SQLException e) {
eprintStackTrace();
}
return connection;
}
// public static void main(String[] args) {
// JdbcConnection connection=new JdbcConnection();
// connectiongetConnection("asd", "99");
// }
}
第四个类:
package totabelxls;
import javaioFile;
import javaioIOException;
import javautilVector;
import javautilregexMatcher;
import javautilregexPattern;
import javaxswingJOptionPane;
import totabelviewTabelData;
import jxlCell;
import jxlSheet;
import jxlWorkbook;
import jxlreadbiffBiffException;
import jxlwriteLabel;
import jxlwriteWritableSheet;
import jxlwriteWritableWorkbook;
import jxlwriteWriteException;
import jxlwritebiffRowsExceededException;
public class ExcelDemo {
/
@param args
/
private Vector title = new Vector();
private Vector[] array;
// public static void main(String[] args) {
// ExcelDemo demo = new ExcelDemo();
// demogetXlsInfo();
//
// }
public void method(TabelData table) {
int row = tablegetRowSize();
int column = tablegetColumnSize();
WritableWorkbook book = null;
Vector title = tablesetTitle();
Object[] str = titletoArray();
try {
book = WorkbookcreateWorkbook(new File("testxls"));
WritableSheet sheet = bookcreateSheet("成绩表", 0);
for (int i = 0; i < strlength; i++) {
sheetaddCell(new Label(i, 0, (String) str[i]));
}
for (int i = 1; i < row + 1; i++) {
for (int j = 1; j < column + 1; j++) {
sheetaddCell(new Label(j - 1, i, tablegetTableInfo(i - 1,
j - 1)));
}
}
bookwrite();
JOptionPaneshowMessageDialog(null, "导出完成!");
} catch (IOException e) {
eprintStackTrace();
} catch (RowsExceededException e) {
eprintStackTrace();
} catch (WriteException e) {
eprintStackTrace();
} finally {
try {
bookclose();
} catch (WriteException e) {
eprintStackTrace();
} catch (IOException e) {
eprintStackTrace();
}
}
}
/
输出Excel的数据到表单
@return
/
public Vector getXlsInfo() {
Vector v = new Vector();
jxlWorkbook rwb = null;
int index = 0;
try {
rwb = jxlWorkbookgetWorkbook(new File("testxls"));
Sheet[] sheet = rwbgetSheets();
for (int i = 0; i < sheetlength; i++) {
int rs = sheet[i]getRows();
array = new Vector[rs - 1];
for (int j = 1; j < rs; j++) {
Cell[] cell = sheet[i]getRow(j);
Vector info = new Vector();
for (int k = 0; k < celllength; k++) {
infoadd(cell[k]getContents());
}
array[index] = info;
index++;
vadd(info);
}
Cell[] titleCell = sheet[i]getRow(0);
for (int j = 0; j < titleCelllength; j++) {
titleadd(titleCell[j]getContents());
}
}
} catch (BiffException e) {
eprintStackTrace();
} catch (IOException e) {
eprintStackTrace();
} finally {
rwbclose();
}
return v;
}
public Vector getXlsInfoToCredit() {
Vector v = new Vector();
jxlWorkbook rwb = null;
try {
rwb = jxlWorkbookgetWorkbook(new File("d:/test/信科0821(南迁)xls"));
Sheet[] sheet = rwbgetSheets();
for (int i = 0; i < sheetlength; i++) {
int rs = sheet[i]getRows();
array = new Vector[rs - 1];
for (int j = 1; j < rs; j++) {
Cell[] cell = sheet[i]getRow(j);
Vector info = new Vector();
for (int k = 0; k < celllength; k++) {
// if(){
Pattern p = Patterncompile("[0-9]{1,}");
Matcher m = pmatcher(cell[k]getContents());
if (mmatches()) {
int score = IntegervalueOf(cell[k]getContents());
float result = getScore(score);
infoadd(result);
} else {
infoadd(cell[k]getContents());
}
}
vadd(info);
}
Cell[] titleCell = sheet[i]getRow(0);
for (int j = 0; j < titleCelllength; j++) {
titleadd(titleCell[j]getContents());
}
}
} catch (BiffException e) {
eprintStackTrace();
} catch (IOException e) {
eprintStackTrace();
} finally {
rwbclose();
}
return v;
}
public float getScore(int n) {
float score = n;
if (n < 60) {
score = 0;
return score;
} else {
if (n >= 60 && n <= 63) {
score = (float) 10;
} else if (n >= 64 && n <= 67) {
score = (float) 13;
} else if (n >= 68 && n <= 71) {
score = (float) 17;
} else if (n >= 72 && n <= 75) {
score = (float) 20;
} else if (n >= 76 && n <= 79) {
score = (float) 23;
} else if (n >= 80 && n <= 83) {
score = (float) 27;
} else if (n >= 84 && n <= 87) {
score = (float) 30;
} else if (n >= 88 && n <= 91) {
score = (float) 33;
} else if (n >= 92 && n <= 95) {
score = (float) 37;
} else if (n >= 96 && n <= 100) {
score = (float) 40;
}
return score;
}
}
public Vector getTitle() {
// getXlsInfo();
return title;
}
public Vector[] getArray() {
getXlsInfo();
return array;
}
}
因为时间问题就没有再写了,上面是我以前做的,不懂就q我
参考 3我啊,只想安稳地做个忍者,安稳地生活,和一个不美也不丑的女人安稳地结婚,安稳地生两个小孩,第一个是女孩,之后是男孩。等女儿结了婚,儿子独立后便退休,之后闲时和朋友下下象棋或围棋,过着悠哉悠哉的隐居生活,然后先太太一步离开这个世界,能有这种人生就好了。————鹿丸-
所谓“得到数据信息”,就是从页面返回的信息分析得出各个数据项了,是每次一行,还是一次能够获得多行?
所谓“下载到本地数据库”,其实就是将数据insert 到本地的对应表中(建表的工作应该预先完成吧)
对于数据库表的数据插入,你用delphi7建立数据连接(oledb或者其他),然后使用command执行insert语句就可以了。
以上就是关于知道sql数据库的IP、用户名和密码,怎样把远程网站的数据库下载到本地全部的内容,包括:知道sql数据库的IP、用户名和密码,怎样把远程网站的数据库下载到本地、java代码怎样将oracle数据库中数据下载本地,为.txt文件或者.excel文件。、我要学sql-server,我的教程都是用中文数据表,北风数据库那些表都是英文的,谁有商场数据库表下载等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)