Skip to content

Instantly share code, notes, and snippets.

View mrhalix's full-sized avatar
💭
Call me on telegram

SM. Amin Aleahmad mrhalix

💭
Call me on telegram
View GitHub Profile
@mrhalix
mrhalix / utmToLatLng.py
Created July 15, 2017 19:10 — forked from javierwilson/utmToLatLng.py
Converts UTM to Latitude, Longitude
#!/usr/bin/python
# taken from http://stackoverflow.com/a/344083/1170404
# usage: cat filemame.txt | ./utmToLatLng.py
import math
import fileinput
# zone = 16 (Nicaragua)
def utmToLatLng(easting, northing, northernHemisphere=True, zone=16):
@mrhalix
mrhalix / hotgramproxy.py
Created June 9, 2018 22:14
HotGram Proxy Leecher for telegram + Send proxy to telegram channel
import telebot, requests, json, base64
# ------ CONFIG
API_TOKEN = "GOFUCKYOURSELF=)))))"
CHANNEL_ID = "@MrHalix"
def get_proxy():
response = requests.get("http://lh58.hotgram.ir/v1/proxy?slt=77799000&appId=3")
return json.loads(response.text)
@mrhalix
mrhalix / tgtweetbot.py
Created June 12, 2018 07:04
a bot which tweets what it receives. JUST change the "PUT HERE" parts with your own information and run the code!
#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests, telebot, json, sys
reload(sys)
sys.setdefaultencoding('utf8')
"""
#########################
JUST change the "PUT HERE" parts with your own information and run the code!
@mrhalix
mrhalix / rjcli.py
Last active September 25, 2019 16:44
RadioJavan basic command line client
import requests, json
query = input("Enter song name: ")
print("[*]Searching for " + query + "...")
# make a request to rj API to search the query
jssearch = requests.get("https://app1.rjapp.cc/api2/search?query=" + query)
jdatsearch = json.loads(jssearch.text)
# add song IDs to a list(songsIDs) and print the results
@mrhalix
mrhalix / template.txt
Created May 28, 2019 11:08
Telegram instantview template used for https://aminaleahmad.ir, adding some changes might get it to work for you too!
# Use Instant View version 2.0
~version: "2.0"
@datetime(-2): /html/head/meta[11]
published_date: $@
# Get article text in <article>
body: //article
import telebot
# Replace API_TOKEN with your token, which can be gotten through @botfather .
API_TOKEN = 'XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
bot = telebot.TeleBot(API_TOKEN)
@bot.message_handler(commands=['help', 'start'])
def send_welcome(message):
bot.reply_to(message, "Hi there, I am EchoBot.")
@mrhalix
mrhalix / carpino_cli.py
Created October 31, 2021 18:57
# Iranian Map And Taxi Services APIs
import requests, json
class Carpino:
def __init__(self):
pass
def price(self, org_lat, org_lng, dest_lat, dest_lng):
cookies = {}
headers = {
'Authorization': 'Bearer eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..C8VYlbDlko521a7a.vaxGIHrj9BoiZynCZ4YuBjqrs3ecCmvSD2WNYTZHbuwNFPJ-HKhDO05qUKxu_QMjBXKyHvlc568vTO20Dor0FaUPwSB_dTlMKmpZfmNegm-x0C2eQotbloMf_KSLCoYXjVwBcON-BqjEIn_ggsaHOfoYbSAsiDNStUNoQuhNgwZRoMgSNNHgduA1-hKFgdTJsu1bNSbZG8O8XNjHYnOqo0f__jonmEErf0YdAqwU5p3GOjjtwxda4S88Q-sGSr6jEvxa4_iTD3ZiaR4XcdGUfB8O6WMQ0mWgZM02wzt1JdYs66con0ud2sfyjFELqqrb4VkMoip5diEZmx1qlHQF1Y7eZ4Q43WRZyPKhntX7q5L4TIL_AM7JiZUGFUal7vzPuM4lg7beh8luOryI3yrIo6k3Jlfpf7cZ9e5vYZeIGy3Xc9_zstcBIqml1KkjoMY6Riah3ALxf4kq-rnjxQtIPzhwvTgzG7rE-wO_ZsWh4hHTb-IKGcLuaAW6Nn-AH1ZNXxeRc7QzV0cZdmF8wdoNMu7mqVbR2BzqLbGH2A1tKH2kA3CgCdApARxlItM5KIJbillR95xE_BdgjsANhG5s.SeBwY6OaOC3oSd4rCOqmqQ',
'Accept-Language': 'fa',
'Connection': 'Keep-Alive',
@mrhalix
mrhalix / outline_manager.py
Created October 31, 2021 20:42
Outline VPN Manager for Python as a Telegram Bot!
#!/usr/bin/python
"""
Outline VPN Manager for Python as a Telegram Bot!
Simply change API_TOKEN, SERVER_MANAGEMENT_BASE_URL and YOUR_ID to your own options.
"""
import telebot
import requests
import json
from telebot import types
API_TOKEN = 'YOURTOKEN'
@mrhalix
mrhalix / functions.py
Created October 31, 2021 20:49
Raspberry Pi, Python 2 Music player from RadioJavan, Controlled by a Flask Webserver
import requests, json, os, subprocess, vlc, sys
from os.path import basename
def mp3fromURL(url):
"""
Catch MP3 file from spotify share url.
"""
try:
print "Downloading MP3 File ..."
response = requests.get("http://receiverdl.com/api/extract/action.php?link=" + url + "&isNoFilter=1")
#response = """{"status":"ok","message":"it's ok","groups":[{"title":"Musics","items":[{"title":"Imagine Dragons - Believer.mp3","link":"http:\/\/receiverdl.com\/api\/extract\/music\/Imagine%20Dragons%20-%20Believer.mp3"}]}]}"""
@mrhalix
mrhalix / nassaabfreer.py
Created October 31, 2021 20:56
one-click Download and Sideload any app no matter if you purchased it from nassaab.com !! :)
"""
Steps to use this script:
1. Jailbreak your iOS device
2. Install a proper terminal on your device
3. Install Python3 on your device
4. Change email addresses in this code to the email that has the app purchased. for example admin's email of the whole system :))
5. Run the code
6. Fill the information you're asked for
7. Click on install button
8. Wait for Installation process to finish