<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[BackBox Indonesia - Python]]></title>
		<link>https://www.backboxindonesia.or.id/</link>
		<description><![CDATA[BackBox Indonesia - https://www.backboxindonesia.or.id]]></description>
		<pubDate>Thu, 25 Jun 2026 16:00:46 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Script Filter Email : Gmail, Yahoo & Hotmail]]></title>
			<link>https://www.backboxindonesia.or.id/thread-238.html</link>
			<pubDate>Wed, 07 Mar 2018 18:55:09 +0000</pubDate>
			<guid isPermaLink="false">https://www.backboxindonesia.or.id/thread-238.html</guid>
			<description><![CDATA[lama ane tidak terjun ke dunia fana ini hihi<br />
kali ini ane mau share script dan sdikit jelaskan tentang tools buatan ane mailfilter.py <br />
langsung aja cekidot ke source code nya : <br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/usr/bin/env python<br />
<br />
from optparse import OptionParser<br />
import os.path<br />
import re<br />
<br />
class warna():&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #ini definisikan warna<br />
    cetak = '&#92;033[0m'<br />
    ijo ='&#92;033[1;32m'<br />
    putih = '&#92;033[1;37m'<br />
    biru = '&#92;033[1;34m'<br />
    kuning = '&#92;033[1;33m'<br />
    abang = '&#92;033[1;31m'<br />
<br />
def author():&nbsp;&nbsp; <br />
    print('''%s&nbsp;&nbsp;#tanda %s untuk menentukan string warna<br />
______  ___      ___________________________________<br />
___   |/  /_____ ___(_)__  /___  ____/__(_)__  /_  /_____________<br />
__  /|_/ /_  __ `/_  /__  / __  /_   __  /__  /_  __/  _ &#92;_  ___/<br />
_  /  / / / /_/ /_  / _  /___  __/   _  / _  / / /_ /  __/  /<br />
/_/  /_/  &#92;__,_/ /_/  /_____/_/      /_/  /_/  &#92;__/ &#92;___//_/<br />
                                                       v.01<br />
%s<br />
[+] Author      : Ruitze<br />
[+] Tool        : MailFilter v.01<br />
[+] Description : Filter mailist Gmail, Yahoo, Hotmail<br />
[+] Usage       : python mailFilter.py nameMailist -o %s''' % (warna.ijo,warna.putih, warna.cetak))<br />
<br />
<br />
<br />
<br />
regex = re.compile(r'''(<br />
                   ([a-zA-Z0-9._%+-]+)<br />
                    @<br />
                    (gmail|yahoo|hotmail)<br />
                    (&#92;.com)<br />
                    )''', re.VERBOSE)<br />
<br />
def file_to_str(filename):<br />
    with open(filename) as f:<br />
        return f.read().lower()<br />
<br />
def get_emails(s):<br />
    return (email[0] for email in re.findall(regex, s) if not email[0].startswith('//'))<br />
<br />
def main():<br />
    parser = OptionParser()<br />
    parser.add_option('-o','--output',dest='output',help='output file to saveFile.txt', action='store_true')<br />
    (options, args) = parser.parse_args()<br />
    try:<br />
        if args and options.output:<br />
            for arg in args:<br />
                if os.path.isfile(arg):<br />
                    for email in get_emails(file_to_str(arg)):<br />
                        if 'gmail' in email:<br />
                            f =open('gmailFile.txt', 'a')<br />
                            f.write(email+'&#92;n')<br />
                            f.close()<br />
                        elif 'yahoo' in email:<br />
                            f = open('yahooFile.txt', 'a')<br />
                            f.write(email + '&#92;n')<br />
                            f.close()<br />
                        else:<br />
                            f = open('hotmailFile.txt', 'a')<br />
                            f.write(email + '&#92;n')<br />
                            f.close()<br />
                    author()<br />
                    print(warna.cetak)<br />
                    print('%s[+] Succes filter to gmailFile.txt   [+]%s' % (warna.biru, warna.cetak))<br />
                    print('%s[+] Succes filter to yahooFile.txt   [+]%s' % (warna.kuning, warna.cetak))<br />
                    print('%s[+] Succes filter to hotmailFile.txt [+]%s' % (warna.abang, warna.cetak))<br />
                else:<br />
                    print('"{}" is not a file.').format(arg)<br />
<br />
        else:<br />
            author()<br />
            print(warna.cetak)<br />
    except Exception as e:<br />
        print('Error Description', e)<br />
<br />
<br />
if __name__=='__main__':<br />
    main()</code></div></div>]]></description>
			<content:encoded><![CDATA[lama ane tidak terjun ke dunia fana ini hihi<br />
kali ini ane mau share script dan sdikit jelaskan tentang tools buatan ane mailfilter.py <br />
langsung aja cekidot ke source code nya : <br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/usr/bin/env python<br />
<br />
from optparse import OptionParser<br />
import os.path<br />
import re<br />
<br />
class warna():&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #ini definisikan warna<br />
    cetak = '&#92;033[0m'<br />
    ijo ='&#92;033[1;32m'<br />
    putih = '&#92;033[1;37m'<br />
    biru = '&#92;033[1;34m'<br />
    kuning = '&#92;033[1;33m'<br />
    abang = '&#92;033[1;31m'<br />
<br />
def author():&nbsp;&nbsp; <br />
    print('''%s&nbsp;&nbsp;#tanda %s untuk menentukan string warna<br />
______  ___      ___________________________________<br />
___   |/  /_____ ___(_)__  /___  ____/__(_)__  /_  /_____________<br />
__  /|_/ /_  __ `/_  /__  / __  /_   __  /__  /_  __/  _ &#92;_  ___/<br />
_  /  / / / /_/ /_  / _  /___  __/   _  / _  / / /_ /  __/  /<br />
/_/  /_/  &#92;__,_/ /_/  /_____/_/      /_/  /_/  &#92;__/ &#92;___//_/<br />
                                                       v.01<br />
%s<br />
[+] Author      : Ruitze<br />
[+] Tool        : MailFilter v.01<br />
[+] Description : Filter mailist Gmail, Yahoo, Hotmail<br />
[+] Usage       : python mailFilter.py nameMailist -o %s''' % (warna.ijo,warna.putih, warna.cetak))<br />
<br />
<br />
<br />
<br />
regex = re.compile(r'''(<br />
                   ([a-zA-Z0-9._%+-]+)<br />
                    @<br />
                    (gmail|yahoo|hotmail)<br />
                    (&#92;.com)<br />
                    )''', re.VERBOSE)<br />
<br />
def file_to_str(filename):<br />
    with open(filename) as f:<br />
        return f.read().lower()<br />
<br />
def get_emails(s):<br />
    return (email[0] for email in re.findall(regex, s) if not email[0].startswith('//'))<br />
<br />
def main():<br />
    parser = OptionParser()<br />
    parser.add_option('-o','--output',dest='output',help='output file to saveFile.txt', action='store_true')<br />
    (options, args) = parser.parse_args()<br />
    try:<br />
        if args and options.output:<br />
            for arg in args:<br />
                if os.path.isfile(arg):<br />
                    for email in get_emails(file_to_str(arg)):<br />
                        if 'gmail' in email:<br />
                            f =open('gmailFile.txt', 'a')<br />
                            f.write(email+'&#92;n')<br />
                            f.close()<br />
                        elif 'yahoo' in email:<br />
                            f = open('yahooFile.txt', 'a')<br />
                            f.write(email + '&#92;n')<br />
                            f.close()<br />
                        else:<br />
                            f = open('hotmailFile.txt', 'a')<br />
                            f.write(email + '&#92;n')<br />
                            f.close()<br />
                    author()<br />
                    print(warna.cetak)<br />
                    print('%s[+] Succes filter to gmailFile.txt   [+]%s' % (warna.biru, warna.cetak))<br />
                    print('%s[+] Succes filter to yahooFile.txt   [+]%s' % (warna.kuning, warna.cetak))<br />
                    print('%s[+] Succes filter to hotmailFile.txt [+]%s' % (warna.abang, warna.cetak))<br />
                else:<br />
                    print('"{}" is not a file.').format(arg)<br />
<br />
        else:<br />
            author()<br />
            print(warna.cetak)<br />
    except Exception as e:<br />
        print('Error Description', e)<br />
<br />
<br />
if __name__=='__main__':<br />
    main()</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[WRITEUP] Cyber Jawara 2016 Offline - stupidxor]]></title>
			<link>https://www.backboxindonesia.or.id/thread-174.html</link>
			<pubDate>Mon, 31 Oct 2016 07:58:50 +0000</pubDate>
			<guid isPermaLink="false">https://www.backboxindonesia.or.id/thread-174.html</guid>
			<description><![CDATA[hello guys, oke kali ini ijinin ane bahas soal offline cyber jawara 2016 yang <span style="font-weight: bold;" class="mycode_b">stupidxor </span>..<br />
<ul class="mycode_list">
</li>
<li>jadi di soal ini kita dikasih 2 file, yaitu sebuah xor cipher dan sebuah source code python yang digunakan untuk encrypt/decrypt xor nya<br />
<br />
<img src="http://i.imgur.com/PUbyRPD.png" width="437" height="259" alt="[Image: PUbyRPD.png]" class="mycode_img" /><br />
<br />
<br />
</li>
<li>file xor cipher<br />
<br />
<img src="http://i.imgur.com/8cygD2n.png" width="436" height="258" alt="[Image: 8cygD2n.png]" class="mycode_img" /><br />
<br />
<br />
</li>
<li>script stupidxor.py<br />
<br />
<img src="http://i.imgur.com/rj2DDRt.png" width="433" height="257" alt="[Image: rj2DDRt.png]" class="mycode_img" /><br />
<br />
<br />
</li>
<li>sesuai dengan nama soalnya stupidxor, maka coba gunakan script python tersebut untuk decode encrypted text, dengan kunci yang sama pula :D berikut script solve nya <br />
<br />
<img src="http://i.imgur.com/EwF0EHk.png" width="434" height="257" alt="[Image: EwF0EHk.png]" class="mycode_img" /><br />
<br />
</li>
<li>jalankan, dan bingo !! dapat flagnya :D <br />
<br />
<img src="http://i.imgur.com/0jHbrv2.png" alt="[Image: 0jHbrv2.png]" class="mycode_img" /><br />
<br />
</li></ul>
thanks, sekian pembahasan kali ini maaf kalo ada salah salah kata yaa ..]]></description>
			<content:encoded><![CDATA[hello guys, oke kali ini ijinin ane bahas soal offline cyber jawara 2016 yang <span style="font-weight: bold;" class="mycode_b">stupidxor </span>..<br />
<ul class="mycode_list">
</li>
<li>jadi di soal ini kita dikasih 2 file, yaitu sebuah xor cipher dan sebuah source code python yang digunakan untuk encrypt/decrypt xor nya<br />
<br />
<img src="http://i.imgur.com/PUbyRPD.png" width="437" height="259" alt="[Image: PUbyRPD.png]" class="mycode_img" /><br />
<br />
<br />
</li>
<li>file xor cipher<br />
<br />
<img src="http://i.imgur.com/8cygD2n.png" width="436" height="258" alt="[Image: 8cygD2n.png]" class="mycode_img" /><br />
<br />
<br />
</li>
<li>script stupidxor.py<br />
<br />
<img src="http://i.imgur.com/rj2DDRt.png" width="433" height="257" alt="[Image: rj2DDRt.png]" class="mycode_img" /><br />
<br />
<br />
</li>
<li>sesuai dengan nama soalnya stupidxor, maka coba gunakan script python tersebut untuk decode encrypted text, dengan kunci yang sama pula :D berikut script solve nya <br />
<br />
<img src="http://i.imgur.com/EwF0EHk.png" width="434" height="257" alt="[Image: EwF0EHk.png]" class="mycode_img" /><br />
<br />
</li>
<li>jalankan, dan bingo !! dapat flagnya :D <br />
<br />
<img src="http://i.imgur.com/0jHbrv2.png" alt="[Image: 0jHbrv2.png]" class="mycode_img" /><br />
<br />
</li></ul>
thanks, sekian pembahasan kali ini maaf kalo ada salah salah kata yaa ..]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Checking Imap With Python]]></title>
			<link>https://www.backboxindonesia.or.id/thread-73.html</link>
			<pubDate>Sun, 20 Mar 2016 13:21:07 +0000</pubDate>
			<guid isPermaLink="false">https://www.backboxindonesia.or.id/thread-73.html</guid>
			<description><![CDATA[To check the unread mail count in my IMAP account, i created a little Python sript. But because i don’t want to query the server every second, I’m caching the value in a file and update it every 30 seconds. Create a cronjob or similiar to update the file.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/usr/bin/env python<br />
<br />
import imaplib<br />
<br />
obj = imaplib.IMAP4_SSL('xxx.xxx.xxx.xxx', '993')<br />
obj.login('user', 'password')<br />
obj.select()<br />
print len(obj.search(None, 'UnSeen')[1][0].split())</code></div></div><br />
Originally posted on <a href="https://rndtx.id/notes/Python-Check-Imap" target="_blank" class="mycode_url">my blog</a>]]></description>
			<content:encoded><![CDATA[To check the unread mail count in my IMAP account, i created a little Python sript. But because i don’t want to query the server every second, I’m caching the value in a file and update it every 30 seconds. Create a cronjob or similiar to update the file.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/usr/bin/env python<br />
<br />
import imaplib<br />
<br />
obj = imaplib.IMAP4_SSL('xxx.xxx.xxx.xxx', '993')<br />
obj.login('user', 'password')<br />
obj.select()<br />
print len(obj.search(None, 'UnSeen')[1][0].split())</code></div></div><br />
Originally posted on <a href="https://rndtx.id/notes/Python-Check-Imap" target="_blank" class="mycode_url">my blog</a>]]></content:encoded>
		</item>
	</channel>
</rss>