Skip to content

Instantly share code, notes, and snippets.

View ebubekirbastama's full-sized avatar
🏠
Yaşamaya devam be Usta <hr>

Ebubekir Bastama ebubekirbastama

🏠
Yaşamaya devam be Usta <hr>
View GitHub Profile
using System;
using System.Diagnostics;
class Program
{
static void Main()
{
// İşlemi başlatma
Process process = new Process();
process.StartInfo.FileName = "notepad.exe";
using NetFwTypeLib;
Type tNetFwPolicy2 = Type.GetTypeFromProgID("HNetCfg.FwPolicy2");
INetFwPolicy2 fwPolicy2 = (INetFwPolicy2)Activator.CreateInstance(tNetFwPolicy2);
var currentProfiles = fwPolicy2.CurrentProfileTypes;
INetFwRule firewallRule = fwPolicy2.Rules.OfType<INetFwRule>().Where(
x => x.Name == textBoxX2.Text)
.FirstOrDefault(); // Eklemek istediğiniz kuralın kayıtlı olup olmadığını kontrol ediyoruz
if (firewallRule == null)
using System;
using System.Collections;
using System.Windows.Forms;
namespace Space_Clear
{
public partial class Form1 : Form
{
public Form1()
{
private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
//Bu örnek ile listbox'a copy Paste ile veri ekleyebilirsiniz.
//www.ebubekirbastama.com
//Abone ol:https://t.co/wZznpvQ7Ti
if (e.Control && e.KeyCode == Keys.V)
{
string clipboardText = Clipboard.GetText(); // Panodaki metni al
if (!string.IsNullOrEmpty(clipboardText))
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class Injector
{
// Kernel32 DLL'ini yükleme
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
Notepad++ Özel Arama
Düzenli İfadeler Seçiyoruz:
^.{0,24}$ //Bu kod ile 25'den az harf olan verileri buluyoruz.
//tagname - Tüm belgedeki belirli bir etiketi seçer.
Örnek:
$x("//h2");
$x("//div");
$x("//h1");
$x("//input");
------------------------------------------------------------------------------------------------------------------------------------
//tagname[@attribute='value'] - Belirli bir öznitelik değerine sahip bir etiketi seçer.
Örnek:
$x("//span[@class='ebs']");
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Remote;
using System;
using System.IO;
using System.Threading;
using System.Web;
using System.Windows.Forms;
namespace GridWhatsapp
private void Form1_DragDrop(object sender, DragEventArgs e)
{
string[] file = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string f in file)
{
try
{
using (StreamReader sr = new StreamReader(f))
{
richTextBox1.Text = sr.ReadToEnd();
private void Form1_Load(object sender, EventArgs e)
{
this.AllowDrop = true;
this.DragEnter += new DragEventHandler(Form1_DragEnter);
this.DragDrop += new DragEventHandler(Form1_DragDrop);
}
private void Form1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))