This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.table.DefaultTableModel; | |
import java.sql.*; | |
/** | |
* | |
* @author zikri | |
*/ | |
public class DataMhs extends javax.swing.JFrame { | |
private DefaultTableModel model; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Bootstrap] | |
HideEula=1 | |
Logo=1 | |
NativeProgress=true | |
ProgressBarColor=221,72,20 | |
ProgressFrameColor=207,208,211 | |
ProgressPosition=60,260 | |
ProgressSize=319,10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def spam(): | |
eggs = 'spam local' | |
print(eggs) # prints 'spam local' | |
def bacon(): | |
eggs = 'bacon local' | |
print(eggs) # prints 'bacon local' | |
spam() | |
print(eggs) # prints 'bacon local' | |
eggs = 'global' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def spam(): | |
global eggs | |
eggs = 'spam' | |
eggs = 'global' | |
spam() | |
print(eggs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-nn : tidak melakukan resolve ip address dan port address | |
-x : melakukan print untuk setiap header packet | |
-s0 : spesifikasi ukuran paket yang akan di-capture 0 untuk meng-capture seluruh paket | |
-S : sequence paket, untuk mendapatkan jika ada output reset | |
-i : mengacu pada interface yang ingin di-capture(bisa berupa interface fiski atau VLAN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcpdump -nni VLANxx -s0 host (client, virtual_server, server dan floating ip_address) and port xxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcpdump -nni VLANxx -s0 host (non-floating ip_address) and host (server ip address) and port xxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcpdump -ni <interface>:<noise> | |
tcpdump -ni 0.0:nnnp -s0 host xxxx and port xxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import os | |
with open(os.devnull, "wb") as limbo: | |
for n in xrange(1, 10): | |
ip="10.1.1.{0}".format(n) | |
result=subprocess.Popen(["ping", "-c", "1", "-n", "-W", "2", ip], | |
stdout=limbo, stderr=limbo).wait() | |
if result: | |
print ip, "inactive" | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ipaddress | |
from subprocess import Popen, PIPE | |
net4 = ipaddress.ip_network('10.1.1.0/24') | |
for x in net4.hosts(): | |
x = str(x) | |
hostup = Popen(["ping", "-c1", x], stdout=PIPE) | |
output = hostup.communicate()[0] | |
val1 = hostup.returncode | |
if val1 == 0: |
OlderNewer