Skip to content

Commit

Permalink
update20181119
Browse files Browse the repository at this point in the history
20181117 V1.0 正式版---
优化HTTP发包,将http header和body分开发送,在某些情况下可以绕过安全防护。
修复获取数据时,在某些情况下,由于选择列变少,排序列未更新,导致会出现程序排序异常的情况。
  • Loading branch information
shack2 committed Nov 19, 2018
1 parent 325337b commit 48f27f1
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 110 deletions.
41 changes: 37 additions & 4 deletions SuperSQLInjection/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
using System.Management;
using Microsoft.Win32;
using System.Drawing;
using System.Net.Sockets;
using System.Net.NetworkInformation;

namespace SuperSQLInjection
{
Expand Down Expand Up @@ -138,7 +140,7 @@ private void Main_Shown(object sender, EventArgs e)
{
new Thread(checkUpdate).Start();
}

}
public void HttpDownloadFile(string url, string path)
{
Expand Down Expand Up @@ -216,7 +218,7 @@ public static String getSid()
return sid;
}

public static int version = 20181117;
public static int version = 20181119;
public static string versionURL = "http://www.shack2.org/soft/getNewVersion?ENNAME=SSuperSQLInjection&NO=" + URLEncode.UrlEncode(getSid()) + "&VERSION=" + version;
//检查更新
public void checkUpdate()
Expand Down Expand Up @@ -2012,7 +2014,7 @@ public Boolean findKeyInBody(String payLoadStr)

public delegate void StringDelegate(String str);

delegate void showLogDelegate(String log,LogLevel level);
public delegate void showLogDelegate(String log,LogLevel level);
public void log(String log, LogLevel level)
{
if (config.isOpenInfoLog)
Expand Down Expand Up @@ -5233,6 +5235,7 @@ private void Main_FormClosing(object sender, FormClosingEventArgs e)
try
{
XML.saveConfig("lastConfig.xml", this.config);

}
catch (Exception ex)
{
Expand Down Expand Up @@ -5350,6 +5353,10 @@ private void data_tvw_dbs_AfterCheck(object sender, TreeViewEventArgs e)
if (dc.Text.Equals(cname))
{
this.data_dbs_lvw_data.Columns.Remove(dc);
if (data_dbs_lvw_lvwColumnSorter != null) {
data_dbs_lvw_lvwColumnSorter.OrderOfSort = SortOrder.None;
data_dbs_lvw_lvwColumnSorter.SortColumn = 0;
} ;
}

}
Expand All @@ -5371,6 +5378,7 @@ private void data_tvw_dbs_AfterCheck(object sender, TreeViewEventArgs e)

if (isColumn)
{

foreach (TreeNode tn in e.Node.Parent.Parent.Nodes)
{
if (tn.Checked && tn != e.Node.Parent)
Expand Down Expand Up @@ -6701,7 +6709,7 @@ public void scan()
}
else
{
this.Invoke(new showLogDelegate(log), url + "----此URL以检测过了,自动跳过!", LogLevel.info);
this.Invoke(new showLogDelegate(log), url + "----此URL以检测过了,自动跳过!", LogLevel.waring);
}
}
}
Expand Down Expand Up @@ -7783,5 +7791,30 @@ private void data_dbs_tsmi_selectReversSubNode_Click(object sender, EventArgs e)
}
}
}
private void readData(Object osockt)
{
this.Invoke(new showLogDelegate(log), "接受数据", LogLevel.info);
Socket socket = (Socket)osockt;

byte[] data = new byte[1024 * 1024];
//侦听端口号
String ctmp = "";
int sum = 0;
do
{

int len = socket.Receive(data,sum, 1024, SocketFlags.None);
if (len > 0)
{
sum += len;
}
ctmp = Encoding.UTF8.GetString(data);

} while ((ctmp.IndexOf("\r\n\r\n") == -1));
this.Invoke(new showLogDelegate(log), ctmp, LogLevel.info);


}

}
}
Loading

0 comments on commit 48f27f1

Please sign in to comment.